Page 1 of 1
utorrent-postprocess.groovy Extract override duplicate Input
Posted: 05 Aug 2012, 16:00
by verysofttoiletpaper
Code: Select all
Extract archive [how.i.nailed.your.mom.618.720p-dimension.rar] to [/mnt/media/Media/Deluge/completed/How.I.Met.Your.Mother.S06E18.720p.HDTV.X264-DIMENSION/.]
Extracting files [How.I.Met.Your.Mother.S06E18.720p.HDTV.X264-DIMENSION.mkv]
Input: /mnt/media/Media/Deluge/completed/How.I.Met.Your.Mother.S06E18.720p.HDTV.X264-DIMENSION/How.I.Met.Your.Mother.S06E18.720p.HDTV.X264-DIMENSION.mkv
Input: /mnt/media/Media/Deluge/completed/How.I.Met.Your.Mother.S06E18.720p.HDTV.X264-DIMENSION/./How.I.Met.Your.Mother.S06E18.720p.HDTV.X264-DIMENSION.mkv
If a file with the same name already exists, and the option override is set in the extract command like it is by default in utorrent-postprocess.groovy, the script tries to process the same file twice.
The is specially a problem if --conflict is set to fail, because it will try to copy the same file to the same location twice, and fail.
Re: utorrent-postprocess.groovy Extract override duplicate I
Posted: 06 Aug 2012, 05:02
by rednoah
How could that happen? If it overrides the file there is still only one file. Plus it should only process it once per "download complete".
If you download the same episode twice that's just expected behaviour then.
EDIT: Just noticed. The exact same path is twice in the input list. Already fixed that in newer revisions by adding a .unique()
Re: utorrent-postprocess.groovy Extract override duplicate I
Posted: 06 Aug 2012, 15:51
by verysofttoiletpaper
It's because of the way the extract command works.
Because it set to extract to . it returns the path for the extracted file with a ./ in the middle which points to the same file as the path without the ./ which already existed in the file list.
This only happens of course if the downloaded file was already extracted before for some reason, like filebot failed to match, etc..
Re: utorrent-postprocess.groovy Extract override duplicate I
Posted: 07 Aug 2012, 01:15
by rednoah
Ah, also the newer revisions don't use "." as output path but auto-create a folder with the name of the archive. Should work.
Re: utorrent-postprocess.groovy Extract override duplicate I
Posted: 07 Aug 2012, 11:07
by rednoah
This will get rid of everything that might cause problems:
Code: Select all
// sanitize input
input = input.findAll{ it.exists() }.collect{ it.canonicalFile }.unique()
Re: utorrent-postprocess.groovy Extract override duplicate I
Posted: 07 Aug 2012, 15:15
by verysofttoiletpaper
That should do it
