RAR files being duplicated

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
snowybunting
Posts: 15
Joined: 19 Sep 2019, 17:17

RAR files being duplicated

Post by snowybunting »

I have an AMC script running via cron that works well with un-rared movies, but rar-ed files get duplicated and both files are moved to the location as <movie>-CD1.mkv and <movie>-CD2.mkv.

Here is the scripts I use:

Code: Select all

filebot -script fn:amc /mnt/media/Downloads/Movies --output /mnt/media --action move --def movieDB -non-strict --conflict auto  --def clean=y --def deleteAfterExtract=y  --def "ut_label=MOVIE" --log-file /mnt/media/Logs/movie.log

Here is relevant log file entries:

Code: Select all

Run script [fn:amc] at [Sun Aug 24 23:09:03 EDT 2025]
Parameter: clean = y
Parameter: deleteAfterExtract = y
Parameter: ut_label = MOVIE
Argument[0]: /mnt/media/Downloads/Movies
Ignore hidden: /mnt/media/Downloads/Movies/.stfolder
Ignore hidden: /mnt/media/Downloads/Movies/Come and See (1985)/.syncthing.Come and See (1985).mkv.tmp
Input: /mnt/media/Downloads/Movies/Threads (1984)/Threads (1984).mkv
Input: /mnt/media/Downloads/Movies/Threads.1984.1080p.BluRay.REMUX.AVC.FLAC.2.0-EPSiLON.mkv
Process as Movie [MOVIE]
Group: {Movie=true} => [Threads (1984).mkv, Threads.1984.1080p.BluRay.REMUX.AVC.FLAC.2.0-EPSiLON.mkv]
Rename movies using [TheMovieDB]
Auto-detect movie from context [/mnt/media/Downloads/Movies/Threads (1984)/Threads (1984).mkv]
Auto-detect movie from context [/mnt/media/Downloads/Movies/Threads.1984.1080p.BluRay.REMUX.AVC.FLAC.2.0-EPSiLON.mkv]
[MOVE] from [/mnt/media/Downloads/Movies/Threads (1984)/Threads (1984).mkv] to [/mnt/media/Movies/Threads (1984)/Threads (1984) - CD1.mkv]
[MOVE] from [/mnt/media/Downloads/Movies/Threads.1984.1080p.BluRay.REMUX.AVC.FLAC.2.0-EPSiLON.mkv] to [/mnt/media/Movies/Threads (1984)/Threads (1984) - CD2.mkv]
Processed 2 files
From what I can see, filebot is extracting the files to /mnt/media/Downloads/Movies/<downloaded file name> as well as /mnt/media/Downloads/Movies/<found movie filename>, then moves both to the properly created movie directory - one with CD1.mkv and the other with CD2.mkv. I'll start digging around the Forums here, but if someone can point to where I have something incorrect I would appreciate it.
User avatar
rednoah
The Source
Posts: 24105
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: RAR files being duplicated

Post by rednoah »

:idea: According to the log, FileBot is not extracting any archives. No *.rar archive is passed as input in the first place. Instead, 2 *.mkv files are passed as input which the amc script then processes as instructed:

Code: Select all

Input: /mnt/media/Downloads/Movies/Threads (1984)/Threads (1984).mkv
Input: /mnt/media/Downloads/Movies/Threads.1984.1080p.BluRay.REMUX.AVC.FLAC.2.0-EPSiLON.mkv

:!: Looks like you have some other tools running which are already extracting the files and deleting the archives followed by organising / duplicating (hopefully using hardlinks) the extracted files in your Downloads folder long before filebot is called by your cron scheduled task.



:idea: The CD1 / CD2 naming is a side-effect of processing the same file (i.e. same codec, same resolution, similar duration, etc) within a single batch, which typically means that we have a multi-part movie at hand. If you processes different encodes of the same movie (e.g. a 720p version and a 1080p version) then the CD1 / CD2 multi-part movie detection would not happen.





EDIT:

:!: --def movieDB has no effect because you're not specifying a parameter value. The correct usage would be --def movieDB=TheMovieDB but since that's default anyway, that wouldn't have any effect either. I would remove command-line arguments that don't do anything as to reduce unnecessary complexity.
:idea: Please read the FAQ and How to Request Help.
snowybunting
Posts: 15
Joined: 19 Sep 2019, 17:17

Re: RAR files being duplicated

Post by snowybunting »

Thank you for the reply. Since I don't have any other tools running that would unrar the file I started looking at my process, I found a cronjob that is supposed to clean up the /mnt/media/Downloads directory was skipping over the Movies directory so the .mkv was getting processed over and over. I cleaned all that up, it's working properly now. Thank you for the kick in the correct direction.

Also thanks for the help with the --def movieDB error. I've removed that section.
Post Reply