pukkandan [Sun, 6 Jun 2021 09:35:07 +0000 (15:05 +0530)]
[extractor] Fix pre-checking archive for some extractors
The `id` regex group must be present for `_match_id` and pre-checking archive to work correctly
felix [Sun, 2 May 2021 09:10:35 +0000 (11:10 +0200)]
[common] Fix FourCC fallback when parsing ISM (#372)
In some DASH manifests, the FourCC attribute is actually present,
but empty. We thus apply the same fallback to 'AACL' that we do
when the attribute is entirely absent.
pukkandan [Tue, 1 Jun 2021 12:35:41 +0000 (18:05 +0530)]
[utils] Escape URLs in `sanitized_Request`, not `sanitize_url` d2558234cf5dd12d6896eed5427b7dcdb3ab7b5a added escaping of URLs while sanitizing. However, `sanitize_url` may not always receive an actual URL.
Eg: When using `yt-dlp "search query" --default-search ytsearch`, `search query` gets escaped to `search%20query` before being prefixed with `ytsearch:` which is not the intended behavior. So the escaping is moved to `sanitized_Request` instead.
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