ytmdl icon indicating copy to clipboard operation
ytmdl copied to clipboard

Parameter to automatically skip file overwrite when downloading lists

Open mdotgru opened this issue 2 years ago • 6 comments

Feature Request

Checklist

  • [X] I've searched the bugtracker for similar feature requests including closed ones.
  • [X] I will add the enhancement label to the issue.

Description

It occurred to me that in the process of downloading a complete youtube playlist, the download stops for various reasons. Then, after the restart it always asks for overwrite confirmation for each file that was already downloaded. An option to default overwrite to y or n without user prompt would be good.

mdotgru avatar Mar 19 '22 18:03 mdotgru

The thing is before the metadata step is completed, it is hard to determine whether the file that is being downloaded is already in the directory. Add to that the complexity of users wanting to download music in their own way (creating directory with album name, artist and then the song) etc.

A quick fix for this is to use the --download-archive file. This file should include the youtube-id's of the songs that were already downloaded and then later on while going through the playlist, if the ID is present in this file, it will be skipped.

At this point, ytmdl does not support writing to this file directly though now that I think about it, something like using a flag to write the ID's of songs being downloaded automatically through ytmdl makes a lot of sense.

Let me know if that is a feature you'd find useful!

deepjyoti30 avatar Apr 03 '22 11:04 deepjyoti30

this can be in config to overwrite or skip or prompt as optoin. So instead of maintating list to skip or not its just a settings to configure to either overwtite skip or promp and user configurable.

vortex91 avatar May 07 '23 01:05 vortex91

Okay, a simple flag that will disable the overwrite prompt is doable. I will add support for this in both as a flag and as a config value.

deepjyoti30 avatar Jun 13 '23 17:06 deepjyoti30

Yes. Sometimes I just wanna download the playlist silently, without need to be awake just tu punch y/n. This need a feature to add parameter to just either replace or skip. Then the ending verbose should list all the those skipped/replaced songs. +1 for this enhancement

purnadika avatar Nov 30 '23 03:11 purnadika

This is already supported using the --nolocal flag. This flag is not supported through config.

The prompt shows up because ytmdl searches locally for the song before downloading it and accordingly prompts the user to confirm if they want to continue. Using the above flag, that behaviour is disabled.

deepjyoti30 avatar Dec 03 '23 10:12 deepjyoti30

At this point, ytmdl does not support writing to this file directly though now that I think about it, something like using a flag to write the ID's of songs being downloaded automatically through ytmdl makes a lot of sense.

Sounds like a very useful idea.

oliversalzburg avatar Dec 26 '23 08:12 oliversalzburg