Write all thumbnails to disk #2269

wants to merge 2 commits into


None yet
2 participants

MikeCol commented Jan 29, 2014

Many extractors return a thumbnail in thumbnail or a list of them in thumbnails (in form of a list of dicts each with an url key).

The proposed change uses both sources to write one or all of them to disk, depending how many the user has asked for: one with --write-thumbnail or all with the new --write-all-thumbnails.

If the user only requests one, the content of thumbnail is returned, or if not present, the first entry from the list.

If the user requests all, the content of thumbnail (if present) is prepended to the list, if it is not already in there.

If only one file is to be written, the normal naming schema is used.
If more than one files are being wirtten, a counter is appended to the file name (e.g. _1, _2 or _01, _02, depending on the number of files in the list).

The download part is the same as before, it only now iterates over the array.

I hope I found all place in youtube-dl where additional command line parameters have to be documented.

phihag closed this in ec82d85 Jan 25, 2015


phihag commented Jan 25, 2015

Thank you very much! I've simplified and updated the implementation in ec82d85.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment