alexta69 / metube

Self-hosted YouTube downloader (web UI for youtube-dl / yt-dlp)
GNU Affero General Public License v3.0
3.97k stars 264 forks source link

[Question] Can you skip the download if the file is already in the folder? #328

Closed TheWicklowWolf closed 8 months ago

TheWicklowWolf commented 8 months ago

Is there a skip option?

PikuZheng commented 8 months ago

maybe set 'overwrites' to false in ytdl_options?

TheWicklowWolf commented 8 months ago

If I set overwrites:false is still downloads the file to the temporary directory and I get this in the logs:

WARNING: Cannot move file "/downloads/a.mp3" out of temporary directory since "/downloads/Folder/a.mp3" already exists.

So I think overwrites:false will still download the file but it just won't overwrite it if there is an existing file.

I then tried this option but it didn't work either:

"break_on_existing":true

break_on_existing: Stop the download process after attempting to download a file that is in the archive

I think the archive in this case is not the directory list...

Don't think there is a way

tnarik commented 8 months ago

In theory you could use the download_archive, so that yt-dlp itself skips it. but the archive file needs to be there in the first place.

42Craft commented 4 months ago

Has anyone managed to get this working on Metube? I'm currently using Metube with Docker.

As per the documentation, using the command download_archive my_archive.txt should enable writing downloaded entries to a file. It should automatically skip a video if it has already been found in the file. This is my _YTDLOPTIONS: - 'YTDL_OPTIONS={"download_archive":"archive_downloads.txt","updatetime":false,"postprocessors":[{"key":"Exec","exec_cmd":"chmod 0664","when":"after_move"},{"key":"FFmpegMetadata","add_chapters":true}]}'

However, for some reason, Metube does not create the file.

Any insights or solutions would be greatly appreciated. Thank you!

PikuZheng commented 4 months ago

Has anyone managed to get this working on Metube? I'm currently using Metube with Docker.

As per the documentation, using the command download_archive my_archive.txt should enable writing downloaded entries to a file. It should automatically skip a video if it has already been found in the file. This is my _YTDLOPTIONS: - 'YTDL_OPTIONS={"download_archive":"archive_downloads.txt","updatetime":false,"postprocessors":[{"key":"Exec","exec_cmd":"chmod 0664","when":"after_move"},{"key":"FFmpegMetadata","add_chapters":true}]}'

However, for some reason, Metube does not create the file.

Any insights or solutions would be greatly appreciated. Thank you!

It works and you'll find it IN THE CONTAINER /app/archive_downloads.txt maybe you can get it with docker cp metube:/app/archive_downloads.txt ./