Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return DASH manifest as data URI #77

Merged
merged 1 commit into from
Oct 3, 2021
Merged

Conversation

TpmKranz
Copy link
Contributor

@TpmKranz TpmKranz commented Oct 2, 2021

This is a workaround for cases when the manifest is not a JSON object but a b64-encoded DASH manifest. The data scheme allows to keep the interface of get_file_url unchanged. Clients that can't deal with data URIs would've choked on the JSONDecodeError anyway and those that do will just consume them like URLs. Tested with ffmpeg/ffplay and Clementine, both of which don't mind playing data URIs. MPV, for example, doesn't like them.

Linting failed due to files unchanged by me, so I had to turn it off. Sorry about that.

@wvffle wvffle requested a review from JuniorJPDJ October 2, 2021 21:58
Copy link
Contributor

@JuniorJPDJ JuniorJPDJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good idea btw ;)
Thanks for your contribution.

tidal_async/api.py Outdated Show resolved Hide resolved
@JuniorJPDJ
Copy link
Contributor

Linting failed due to files unchanged by me, so I had to turn it off. Sorry about that.

Thanks, good to know. I'll take care about it in a moment.

@JuniorJPDJ
Copy link
Contributor

JuniorJPDJ commented Oct 3, 2021

@TpmKranz could you rebase on top of master?
linter and test errors should be fixed now

@JuniorJPDJ
Copy link
Contributor

JuniorJPDJ commented Oct 3, 2021

Also would be cool if you could reword commit message to conform with conventional commits. Our git log is good example of how it should look like.

If you can't do it I can, just say ;)

If a track's manifest is not a JSON object but a DASH manifest,
get_file_url throws.
This fix encodes the DASH manifest in a data: URI to allow compatible
players to play the track regardless.
This is technically not a URL, but compatible players usually don't
mind.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants