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

Support parsing youtube.com/{live,shorts} URLs shared from other apps #1010

Closed
wants to merge 2 commits into from

Conversation

peat-psuwit
Copy link

YouTube now use the new format for live streams and shorts. The pattern
is https://www.youtube.com/{live,shorts}/<video id>. But other than
pattern change, the video ID is otherwise completely compatible with the
old format.

Since this pattern is similar to https://youtu.be/ format, re-use that
code by re-shuffle the conditions a bit. The change is applied to both
default and Invidious plugins.

Fixes: #966

YouTube now use the new format for live streams and shorts. The pattern
is https://www.youtube.com/{live,shorts}/<video id>. But other than
pattern change, the video ID is otherwise completely compatible with the
old format.

Since this pattern is similar to https://youtu.be/ format, re-use that
code by re-shuffle the conditions a bit. The change is applied to both
default and Invidious plugins.

Fixes: xbmc#966
@MoojMidge
Copy link

@peat-psuwit - plugin.video.youtube supports loading a variety of different YouTube urls using the following plugin url format
plugin://plugin.video.youtube/uri2addon/?uri=PERCENT_ENCODED_ORIGINAL_YOUTUBE_URL

All you would need to do is check whether the host ends with youtube.com or youtu.be (there are other hosts that are used and supported, but those two would cover the majority of shared urls), and then send the original url as a percent encoded value using the uri2addon plugin endpoint.

This allows a number of additional urls (channels/users, clips, embeds, etc.) to be supported, including shorts and live streams, without needing to parse the url in Kore.

@peat-psuwit
Copy link
Author

@MoojMidge's idea is now implemented in #1019. Closing this PR in favor of that one. Thank you.

@peat-psuwit peat-psuwit closed this Sep 5, 2024
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.

Sending live Youtube videos to Kodi doesn't work
2 participants