-
-
Notifications
You must be signed in to change notification settings - Fork 217
Allow episodes with youtube-dl compatible URLs #949
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
Conversation
|
interesting 👍 |
|
Commit 386afb1 is not correct. I'm not sure what you are trying to do with it but both regex are identical, the first is checked against episode.url and second against episode.link. Compiling the regex is good idea though. |
386afb1 to
f197483
Compare
|
I must have been asleep when I made the previous push, it should work now. But, is checking episode.link really necessary? PodcastEpisode.from_podcastparser_entry() in model.py does not create an episode object without a verified episode.url. Testing the 'link' property when creating the downloader would be then useless, unless episodes are created some other way. |
|
I don't know why the As for the force default download, does that mean youtube-dl won't be used to download a DRM video that uses a known mime type? |
|
@elelay youtube-dl supports URLs to downloadable files, so it will be always used as a downloader unless some kind of filtering is used. The commit was a quick fix to use the default downloader for the usual media file mime types. On second thought it's better to make this filtering in the extension itself. Suggestions on what mime types, extensions etc. should and should not be downloaded by youtube-dl would be welcome. |
0406835 to
295f83a
Compare
|
The extension now rejects downloads which would use the Generic youtube-dl extractor. This is a bit slow way to check for suitable URLs (0.3 s on my i5 laptop), but works as intended, so that normal media files are downloaded with the default downloader. Prefiltering by mime type or file extension from URL could be still implemented on top of this. I tried to look if there are places in gpodder code where episodes without a valid 'url' attribute are be created, but could not find any, so I removed support for URLs in episode.link. If code creating episodes without an 'url' is there, I think it's better to treat it as buggy. Also rebased to current master. |
|
This PR currently contains basically two changes:
The second change is arguably a bit hacky, but would the first change be acceptable? I can split these two into separate PRs if so. |
|
What feeds does this PR fix? |
|
I'm using this to follow radio and tv shows from the Finnish broadcaster Yle. The feeds are at https://feeds.yle.fi/ (example: https://feeds.yle.fi/areena/v1/series/1-50697851.rss). There are some feeds there with normal media enclosures, but most are only accessible from the streaming service at areena.yle.fi via the episode link. |
elelay
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also split out the player handling (and update to player.audio) in a separate PR.
13348c3 to
9220be6
Compare
Disable support for URLs which use youtube-dl's 'Generic' extractor.
9220be6 to
11407b0
Compare
|
Rebased to master. @elelay are there further issues with the code? |
|
LGTM, but I can't test the improvement it brings |
|
I agree, the code looks good but https://feeds.yle.fi/areena/v1/series/1-50697851.rss still doesn't contain any episodes. |
Skip image and application URLs in enclosure if media with audio or video is found, or if a CustomDownloader exists for episode.link URL.
|
The YLE feeds are a bad example, since they need a patched youtube-dl, but that's what I use this PR for. There are 3rd party feeds for the BBC iPlayer which work, modulo geoblocking (and the server is really slow). Then there is RSS-bridge which has feeds for lots of things, like Bandcamp (example). These feeds have images in enclosures, so I changed the feed parsing to reject them in favor of episode.link, when there is something to download there. Also, the youtube-dl extension needs improving in format handling, but here's quick hack if anyone wants to test the feeds above: |
|
Merged, thanks |
|
Thanks for merging. I have some ideas to improve #963 so that streaming can be made to work for ytdl-links as well. |
|
Thanks, I've seen your comment above about improving format handling in the youtube-dl extension. |
This PR allows subscribing to feeds with links to youtube-dl compatible content and a config var to enable streaming of unrecognized episode URLs with the configured video player.
Specifically:
Downloads with youtube-dl work if a suitable format string is set to youtube.preferred_fmt_ids, but this setting is a bit non-obvious for my taste.