levic92 / LCExtractor

Deluge extractor plugin
GNU General Public License v3.0
45 stars 13 forks source link

Archive containing archive which overwrites other archive #11

Open micke opened 6 years ago

micke commented 6 years ago

I've come upon a pretty annoying edge-case where a torrent contains two archives. The first archive is an archive with the subtitles and a nested archive within itself. The second archive is an archive of the movie. Because unrar is run with -o+ the movie archive gets overwritten resulting in the movie being lost.

Best illustrated like this:

The big question is why would someone do it like this and i don't really have an answer to that but it has happened to me enough times to be a problem.

One way to resolve this would be to run unrar with the -or flag which renames files that would otherwise overwrite another file. In the above example ubuntu.rar would become ubuntu (1).rar

As for the other commands i haven't really looked into alternatives to rename instead of overwrite.

levic92 commented 6 years ago

That is strange that someone would create an archive like that. I haven't run into any torrents that do this yet. Thank you for reporting the issue, I will look into it when I have some extra time

micke commented 6 years ago

Yeah, really strange and really annoying. Took me a while to understand why half of my downloads failed. Apparently a lot of torrents on torrentleech are like that...

In the meantime i've been running my fix without any issues from here https://github.com/lisinge/LCExtractor/commit/cf8243041fdbd890c4a40a9e7bd39c4feb8ccd0d. It's only fixed for rars though.

dabear commented 6 years ago

I hit this problem as well today. I had to disable the plugin, recheck+download and manually extract as a workaround. Will try micke's fix now. I can provide an example torrent if contacted privately on gitter. Running on linux

arcmodo commented 5 years ago

I'm seeing this as well. It's extremely frustrating. I'll try micke's fix as well until we see something from @levic92 (great plugin, by the way!)