pukkandan [Sun, 30 May 2021 16:34:31 +0000 (22:04 +0530)]
[hls,dash] When using `concurrent_fragment_downloads`, do not keep the fragment content in memory
Partial fix for #359
This is a temporary solution until #364 can be implemented
pukkandan [Fri, 28 May 2021 20:09:07 +0000 (01:39 +0530)]
[embedthumbnail] Correctly escape filename
Closes #352
The approach in [1] is faulty as can be seen in the test cases
1. https://github.com/ytdl-org/youtube-dl/commit/bff857a8af696e701482208617bf0b7564951326
pukkandan [Sat, 22 May 2021 18:28:11 +0000 (23:58 +0530)]
[extractor] Always prefer native hls downloader by default
When the manifest is not downloadable by native downloader, it already is able to detect it and switch to `ffmpeg`. So there doesn't seem to be a reason anymore to use ffmpeg as the preferred downloader
pukkandan [Tue, 25 May 2021 19:43:34 +0000 (01:13 +0530)]
[update] Replace self without launching a subprocess in windows
Closes: #335, https://github.com/ytdl-org/youtube-dl/issues/28488, https://github.com/ytdl-org/youtube-dl/issues/5810, https://github.com/ytdl-org/youtube-dl/issues/5994
In windows, a running executable cannot be replaced. So, the old updater worked by launching a batch script and then exiting, so that the batch script can replace the executable. However, this caused the above-mentioned issues.
The new method takes advantage of the fact that while the executable cannot be replaced or deleted, it can still be renamed. The current update process on windows is as follows:
1. Delete `yt-dlp.exe.old` if it exists
2. Download the new version as `yt-dlp.exe.new`
3. Rename the running exe to `yt-dlp.exe.old`
4. Rename `yt-dlp.exe.new` to `yt-dlp.exe`
5. Open a shell that deletes `yt-dlp.exe.old` and terminate
While we still use a subprocess, the actual update is already done before the app terminates and the batch script does not print anything to stdout/stderr. So this solves all the above issues
pukkandan [Tue, 25 May 2021 19:43:08 +0000 (01:13 +0530)]
[cleanup] Refactor updater
The updater now uses `.update.run_update` and not `.update.update_self`.
Although I don't expect anyone to be using the updater via API, a wrapper `update_self` is provided for compatibility just in case
louie-github [Fri, 21 May 2021 18:09:48 +0000 (02:09 +0800)]
[ThumbnailsConvertor] Support conversion to `png` and make it the default (#333)
PNG, being a lossless format, should be a better default here compared to JPG since we won't be compressing to a lossy format and losing some of the original image data
PNG is also supported for embedding in all the formats similar to JPEG
pukkandan [Thu, 20 May 2021 12:32:58 +0000 (18:02 +0530)]
[cleanup] See desc
* Remove struct from `embedthumbnail`
* Use bullet lists in readme where numbered list don't make sense
* Fix error introduced in 9c2b75b5616f058c3970e54c664e9543f86b9f0c when `ie_result` is `None`
pukkandan [Tue, 18 May 2021 18:25:32 +0000 (23:55 +0530)]
[test] Fix `test_YoutubeDL.TestYoutubeDL`
Test `test_ignoreerrors_for_playlist_with_url_transparent_iterable_entries` was broken due to `__original_infodict` being added to the dict
pukkandan [Mon, 17 May 2021 11:45:33 +0000 (17:15 +0530)]
Write thumbnail of playlist
Related: https://github.com/ytdl-org/youtube-dl/pull/28872, https://github.com/ytdl-org/youtube-dl/pull/28860
This is slightly different from the above PRs in that this downloads the playlist's thumbnail instead of the uploader's profile picture. But for youtube channel URLs these are the same
pukkandan [Thu, 6 May 2021 15:26:19 +0000 (20:56 +0530)]
Fix `playlist_index` and add `playlist_autonumber` (#302)
Now `playlist_index` is always the position of the video in the actual playlist and `playlist_autonumber` is the position of the item in the playlist queue
pukkandan [Mon, 3 May 2021 17:06:03 +0000 (22:36 +0530)]
Improve output template internal formatting
* Allow slicing lists/strings using `field.start:end:step`
* A field can also be used as offset like `field1+num+field2`
* A default value can be given using `field|default`
* Capture all format strings and set it to `None` if invalid. This prevents invalid fields from causing errors