jely2002 / youtube-dl-gui

A cross-platform GUI for youtube-dl made in Electron and node.js
GNU Affero General Public License v3.0
6.41k stars 443 forks source link

Same FileName Saving #461

Closed Zenodeon closed 1 year ago

Zenodeon commented 1 year ago

Fixes #455

PR Fixes files not being saved when a file with the same name exists in the download folder.

It is fixed by creating a new temp folder (named by the unique identifier) in the download folder for each video.

Then all the embedding and processing are done in this folder and once done, the final file (be it mp4, opus, or whatever the user has requested) will be moved out of the temp folder.

While moving it out, it checks for any pre-existing file with the same name, and if it exists, it adds "(n)" to the file name where n represents the duplicate file name count.

After Moving the processed file, the temp folder is forced Deleted.

Zenodeon commented 1 year ago

@StefanLobbenmeier

StefanLobbenmeier commented 1 year ago

Hey :) I don’t own this repo, you will have to create the pr in my fork

StefanLobbenmeier commented 1 year ago

https://github.com/StefanLobbenmeier/youtube-dl-gui/pulls

Zenodeon commented 1 year ago

oh i did not know they stopped maintaining this project, will pr in your fork

Zenodeon commented 1 year ago

Done