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

Use yt_dlp.get_postprocessors() #655

Merged
merged 5 commits into from
Jan 29, 2025
Merged

Conversation

tcely
Copy link
Contributor

@tcely tcely commented Jan 27, 2025

Fixes #412 #645

@tcely tcely marked this pull request as draft January 28, 2025 05:08
@meeb
Copy link
Owner

meeb commented Jan 28, 2025

Looks reasonable to me.

I realise the media item instance isn't passed to download_media(...) but that string check could match if the video title contains (for example) av1- for some reason, however unlikely that might be.

Perhaps the media item instance should be passed to download_media(...)? Then you could use the actual codec match from media.source..... This could also simplify the args for download_media(...) which have grown quite a lot lately. I think in very early drafts download_media(...) was called in a worker that couldn't be passed a media instance without an extra lookup but that seems pretty moot now given it's called from where a media instance is already created.

I'm pretty sure download_media(...) is only called in two places so it's not a massive refactor, once in models.py as download_youtube_media(...) and once in signals.py if I remember. Both can just have self or instance added as the first arg most likely.

@tcely
Copy link
Contributor Author

tcely commented Jan 28, 2025

Refactoring it would be a good idea. Especially when we start asking for yt-dlp to select the format for us.

I'd like to get away from passing a format and handling fallbacks, if possible.

@tcely tcely marked this pull request as ready for review January 29, 2025 06:05
@meeb
Copy link
Owner

meeb commented Jan 29, 2025

Thanks!

@meeb meeb merged commit 0eb7a4d into meeb:main Jan 29, 2025
@tcely tcely deleted the issue-645-sponsorblock branch January 29, 2025 07:52
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.

Embed Metadata / Thumbnail does not seem to be working
2 participants