Closed jgreco closed 5 years ago
Fixed the pattern matching code, fixed finding youtube-dl on windows.
Also added ytdl blacklist code and an optional gallery_worker.conf to go with it. (Personally I think this feature is superfluous, but ytdl_hook has it so maybe somebody somewhere has a good use for it...)
gallery-thumbgen.lua checks to see if the input_path starts with https?://. If so, it uses youtube-dl to attempt to resolve a url to a thumbnail (i.e. the thumbnail used on the website.) This works for any site for which youtube-dl can find thumbnails.
In the special case of a link to youtube proper, youtube-dl is not used because it's slow. Instead the URL is parsed to pull out the video ID and a URL to the thumbnail for that particular ID is generated. This is much faster than waiting for youtube-dl, but perhaps more brittle.
If any of the above fails, then the original input_path is returned and thumbnailing proceeds as usual.