mhogomchungu / media-downloader

Media Downloader is a Qt/C++ front end to yt-dlp, youtube-dl, gallery-dl, lux, you-get, svtplay-dl, aria2c, wget and safari books..
GNU General Public License v2.0
1.35k stars 104 forks source link

Can I rename it? #228

Closed StrollStars closed 1 year ago

StrollStars commented 1 year ago

If a file with the same name exists in the same directory, the program will display:

file already exists, skipping

Can I continue downloading by renaming? Where should I set it up?

mhogomchungu commented 1 year ago

It is not possible. yt-dlp by default adds "id" to make it harder for file names to collide and if it still happens then you can add "epoch" variable to the "-o" option to make it even harder for file names to collide.

If you want the file name to automatically be renamed then open a feature request with yt-dlp and make a request there and it will be easier for Media Downloader to support the behavior by adding a relevant option.

StrollStars commented 1 year ago

I use lux, can you support it as yt-dlp?

mhogomchungu commented 1 year ago

Lux is supported, install this extension to support it. Instructions of how to install are here

Lux also do not have an option to automatically rename a file if it already exist.

Why do you want to redownload an existing file?

StrollStars commented 1 year ago

@mhogomchungu Thank you for your reply. I used the Lux xtension to download videos from a website, and found that the downloaded files all have the same name. I give feedback there.

mhogomchungu commented 1 year ago

For the reference, the issue you opened is this one.

mhogomchungu commented 1 year ago

Do you use Linux or Windows version of Media Downloader?

Lux has "-O" option that allows settings of a file name and the next version of Media Downloader will use this option to allow you to set a file name of your choice together with a unique value that will serve a purpose of making sure each file has a unique name.

Currently supported unique identifiers are:-

  1. %(autonumber)s. This variable will be replaced by a number that is equal to the position of the media entry in the UI.
  2. %(id)s. This variable will be replaced with a unique id.
  3. %(title)s. This variable will be replaced by the media title.

Below images show how above three options can be added and how the final file name will be in the UI.

Will keep this feature request open until after i made another release.

Screenshot_20221122_151415

StrollStars commented 1 year ago

@mhogomchungu I use Windows version of Media Downloader. I know the -O parameter, so I wrote a batch file to call it to download. I look forward to the new version of Media Downloader, thanks.

mhogomchungu commented 1 year ago

New version is out and it has a solution for this problem.

To make sure you do not get identical file names, do the following:-

  1. Go to configure->engine's default options.
  2. Select "lux" in the engines drop down list
  3. In the "Options To Add" text field, add "-O %(title)s-%(id)s"
  4. Click "Add".
  5. Right click the entry you just added and set is as default.

A bad thing about this solutions is file names ending with a bunch of characters that makes no sense. These characters are supposed to be unique and are what makes file names unique. You can also add "%(autonumber)s" to make it possible to know file was at what position in the UI.