Skip to content

Include query params in oneclick playlist requests#492

Merged
DeadlyKitten merged 1 commit intobsmg:masterfrom
Top-Cat:playlist-query-params
Oct 28, 2024
Merged

Include query params in oneclick playlist requests#492
DeadlyKitten merged 1 commit intobsmg:masterfrom
Top-Cat:playlist-query-params

Conversation

@Top-Cat
Copy link
Contributor

@Top-Cat Top-Cat commented Jan 19, 2023

Passes query parameters through from bsplaylist:// url handler
This allows for the creation of signed urls for private playlists

@DeadlyKitten DeadlyKitten merged commit be6fa51 into bsmg:master Oct 28, 2024
@BaliBalo
Copy link

BaliBalo commented May 7, 2025

@Top-Cat @DeadlyKitten Just a note that this broke the handling of encoded URLs - changing things on my side to accommodate for this, but I think when nesting an url in another having the inner one encoded is cleaner.
For example instead of bsplaylist://playlist/https://example.com/?id=123, it seems a bit more standard to use bsplaylist://playlist/https%3A%2F%2Fexample.com%2F%3Fid%3D123 (which can be constructed for example in JS via 'bsplaylist://playlist/' + encodeURIComponent(url))

If we ever want to allow those again while keeping the query string to allow for non-encoded urls, we can either:

  • Use uri.LocalPath.Trim('/') + uri.Query (equivalent to PathAndQuery but uses LocalPath instead of AbsolutePath)
  • Manually unescape with Uri.UnescapeDataString(uri.PathAndQuery.Trim('/')), although this has the effect of also decoding the query string for non-encoded source urls, which might not be desirable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants