Fixed Sharing feature from returning incorrect URL #1127
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Remove any URL reformatting as Airsonic returns it properly. Should be tested with Subsonic.
Issue Reference: #978
This check must have been in for a reason, therefore it may be possible that it breaks sharing on some Subsonic/Airsonic servers
In particular, this commit to libresonic (released v6.2.1) seems to have changed how share names were created:
airsonic/airsonic@f7bd431
Subsonic introduced the Share feature in Subsonic REST API v1.6.0. Example:
http://www.subsonic.org/pages/inc/api/examples/shares_example_1.xml
That said, I am running this fine with Airsonic-Advanced 11.0.0-SNAPSHOT.20220625052932 and subsonic-rest-api v1.15.
Unfortunately, I do not have a Subsonic server up and running to test from and I could not find any identifying ways to determine if DSub is connected to an Subsonic or Airsonic server (methods I found reported ServerInfo.isStockSubsonic() to true), only what subsonic-rest-api I was dealing with (v1.15). I would love to know if Subsonic is returning the same long URL as it does in the 1.6.0 example or is returning the same values that we see here with Airsonic.
This might be something that needs to be looked into on the Airsonic server side if Subsonic is offering the short URL for shares. Either this code was warranted and people do not use the share function through DSub or one side (client/server) is providing inconsistent results. Any help with testing this would be very welcome.
I have uploaded a build to my fork for testing: https://github.com/mwielgosz/Subsonic/releases/tag/5.5.3-share-fix
This will require that you UNINSTALL your old DSub app as they are not signed with the same keystores.