Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I rename it? #228

Closed
StrollStars opened this issue Nov 17, 2022 · 8 comments
Closed

Can I rename it? #228

StrollStars opened this issue Nov 17, 2022 · 8 comments

Comments

@StrollStars
Copy link

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
Copy link
Owner

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
Copy link
Author

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

@mhogomchungu
Copy link
Owner

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
Copy link
Author

@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
Copy link
Owner

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

@mhogomchungu mhogomchungu reopened this Nov 21, 2022
@mhogomchungu
Copy link
Owner

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
Copy link
Author

StrollStars commented Nov 22, 2022

@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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants