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

[core] Only ensure playlist thumbnail dir if writing thumbs #8373

Merged
merged 1 commit into from Oct 22, 2023

Conversation

bashonly
Copy link
Member

@bashonly bashonly commented Oct 18, 2023

Only create directories for playlist thumbs when they have been requested for download

Bugfix for 2acd1d5

Closes #8372

Template

Before submitting a pull request make sure you have:

In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check all of the following options that apply:

  • I am the original author of this code and I am willing to release it under Unlicense
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

Copilot Summary

🤖 Generated by Copilot at 8c07484

Summary

🐛🚫🗂️

Prevent creating empty directories for thumbnails when none are available or requested. Add a check for empty thumbnails list in yt_dlp/YoutubeDL.py.

No thumbnails, no dir
_ensure_dir_exists waits
Empty folders, gone

Walkthrough

  • Prevent creating empty directories for thumbnails when none are available or requested (link)

Bugfix for 2acd1d5

Closes yt-dlp#8372
Authored by: bashonly
@bashonly bashonly added bug Bug that is not site-specific regression Works in youtube-dl/older yt-dlp labels Oct 18, 2023
@bashonly bashonly mentioned this pull request Oct 18, 2023
10 tasks
@bashonly bashonly changed the title [core] Fix playlist thumb directory bug [core] Only ensure playlist thumb dirs if writing thumbs Oct 18, 2023
@bashonly bashonly changed the title [core] Only ensure playlist thumb dirs if writing thumbs [core] Only ensure playlist thumbnail dir if writing thumbs Oct 18, 2023
@bashonly bashonly added the pending-review PR needs a review label Oct 21, 2023
@bashonly bashonly removed the pending-review PR needs a review label Oct 22, 2023
@bashonly bashonly self-assigned this Oct 22, 2023
@bashonly bashonly merged commit a40e0b3 into yt-dlp:master Oct 22, 2023
17 checks passed
@Riteo
Copy link
Contributor

Riteo commented Oct 24, 2023

oops, sorry!

@bashonly
Copy link
Member Author

@Riteo all good, I missed it in original PR's code review too

@bashonly bashonly deleted the fix/thumbs-dir branch December 7, 2023 15:09
aalsuwaidi pushed a commit to aalsuwaidi/yt-dlp that referenced this pull request Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug that is not site-specific regression Works in youtube-dl/older yt-dlp
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2023.10.13 creating empty folders
4 participants