kzahel / jstorrent

JavaScript Torrent Client primarily for ChromeOS and the Chrome Web Store
https://www.jstorrent.com
Other
408 stars 114 forks source link

Download overwrites files on same folder #176

Open ertaboy356b opened 5 years ago

ertaboy356b commented 5 years ago

When downloading torrent files that uses the same folder as output, the files are overwritten by the other torrent download.

For example, if I am downloading episodes 1 and 2 on separate torrent files and they both happend to store on the same folder, episodes 1 and 2 will overwrite each other even though the file names are different.

kzahel commented 5 years ago

If a torrent is a multifile torrent, it uses the "name" of the torrent as the folder in which it stores all files.

i could see where two separate torrents share the same "name". But that would be really unusual.

ertaboy356b commented 5 years ago

The torrent is not a multifile torrent though. It contains a single file inside a specific folder. Unfortunately, other related torrent files will share this folder name. For example if I download Naruto.S01E01 and Naruto.S01E02 with a pre-programmed 'Naruto' folder, both will go to the 'Naruto' folder but will overwrite each other even though the file filenames are different. Inside the 'Naruto' folder, I will get Naruto.S01E01.mkv and Naruto.S01E02.mkv but with the data of Naruto.S01E02.mkv on both files.

I've tried it with more than 2 files and it happens every time.

kawika543 commented 5 years ago

try renaming the folder it is downloaded to. as in one per episode.