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.
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.