Prerequisites
Bug Description
When download_archive is set in the global config (YTDL_OPTIONS / ytdl-options.json), it works correctly — previously archived videos are skipped before any download begins.
However, if download_archive is moved out of the global config and into a preset instead, the archive check no longer gates the download. The video is fully downloaded before yt-dlp determines it was already in the archive, at which point the download is effectively wasted. This defeats the purpose of the archive entirely when used via presets or per-download overrides. This appears to be caused by the timing of when the YoutubeDL instance is constructed relative to when preset options are merged in.
I discovered this while trying to work around another issue / limitation: there seems to be no way to override the download_archive on a per-download/per-profile basis if it is set in the global config (i.e., ytdl-options.json). The yt-dlp API has no equivalent to the CLI's --no-download-archive flag — there is no value that, when passed via a preset or the per-download Custom Options field, causes yt-dlp to skip the archive check for that invocation. Setting "download_archive": "/dev/null" (or to Null, None does not suppress the check. Again, it seems to be due to the order / manner in which the options are constructed.
Expected Behaviour:
-
download_archive set via a preset should check the archive before beginning the download, consistent with how it behaves in the global config.
-
It should be possible to disable download_archive on a per-download basis (e.g. via a Preset or Per-Download Overrides) when it is set in the global config — for example, by supporting a "download_archive": null sentinel or a dedicated "no_download_archive": true key that instructs MeTube to omit the archive key entirely when constructing the options for that download.
yt-dlp Direct Test Results
ytdlp https://www.youtube.com/shorts/nNcS2C84Cqc
[download] nNcS2C84Cqc: has already been recorded in the archive
Environment & Configuration
Running latest version of docker container (ghcr.io/alexta69/metube) in unRAID
ytdl-options.json:
{
"updatetime": false,
"writethumbnail": true,
"writeinfojson": true,
"ratelimit": 1875000,
"writesubtitles":true,
"subtitleslangs":["en","-live_chat"],
"postprocessors":[
{"key":"Exec","exec_cmd":"chmod 0664","when":"after_move"},
{"key":"FFmpegEmbedSubtitle","already_have_subtitle":false},
{"key":"FFmpegMetadata","add_chapters":true}]
}
ytdl-options-presets.json
{
"Archive": {
"download_archive": "/config/archive.txt"
},
Paths and variables are all correctly defined in container config and all other general functionality is verified working. Have isolated this specific issue with dedicated testing.
Additional Context
No response
Prerequisites
Bug Description
When download_archive is set in the global config (YTDL_OPTIONS / ytdl-options.json), it works correctly — previously archived videos are skipped before any download begins.
However, if download_archive is moved out of the global config and into a preset instead, the archive check no longer gates the download. The video is fully downloaded before yt-dlp determines it was already in the archive, at which point the download is effectively wasted. This defeats the purpose of the archive entirely when used via presets or per-download overrides. This appears to be caused by the timing of when the YoutubeDL instance is constructed relative to when preset options are merged in.
I discovered this while trying to work around another issue / limitation: there seems to be no way to override the download_archive on a per-download/per-profile basis if it is set in the global config (i.e., ytdl-options.json). The yt-dlp API has no equivalent to the CLI's
--no-download-archiveflag — there is no value that, when passed via a preset or the per-download Custom Options field, causes yt-dlp to skip the archive check for that invocation. Setting"download_archive": "/dev/null"(or toNull,Nonedoes not suppress the check. Again, it seems to be due to the order / manner in which the options are constructed.Expected Behaviour:
download_archiveset via a preset should check the archive before beginning the download, consistent with how it behaves in the global config.It should be possible to disable
download_archiveon a per-download basis (e.g. via a Preset or Per-Download Overrides) when it is set in the global config — for example, by supporting a"download_archive": nullsentinel or a dedicated"no_download_archive": truekey that instructs MeTube to omit the archive key entirely when constructing the options for that download.yt-dlp Direct Test Results
Environment & Configuration
Running latest version of docker container (ghcr.io/alexta69/metube) in unRAID
ytdl-options.json:
ytdl-options-presets.json
Paths and variables are all correctly defined in container config and all other general functionality is verified working. Have isolated this specific issue with dedicated testing.
Additional Context
No response