Can you disable CD[0-9] naming scheme in AMC script?
-
- Posts: 35
- Joined: 14 Jul 2018, 17:22
Can you disable CD[0-9] naming scheme in AMC script?
is it possible to turn off the CD[0-9] naming scheme in the AMC script? I never deal with actual files that are for CD1 or CD2, usually, AMC will name files this way when there is a duplicate or a file has been downloaded twice and the download script has appended a .1 or .2 to the file.
Re: Can you disable CD[0-9] naming scheme in AMC script?
1.
Logs and example file paths, please?
2.
You can use custom formats, and then simply not include the movie part index bit.
Logs and example file paths, please?
2.
You can use custom formats, and then simply not include the movie part index bit.
-
- Posts: 35
- Joined: 14 Jul 2018, 17:22
Re: Can you disable CD[0-9] naming scheme in AMC script?
Ok, I looked back through my available logs and found this example.
The 2 files being processed are actually identical. I think he NZB tool has somehow downloaded two of the same file, and then renamed the 2nd one with a (1) appended at the end in an effort not to overwrite the original.
So my issue could be a timing issue - maybe I need to process downloads more frequently to reduce the likelihood of a duplicate file showing up in this manner. Or maybe it is caused due to the NZB software extracting from archives with obfuscated names and then renaming the resulting file to the original name.
In any case, filebot is processing both files at the same time, but does not see that they are duplicate. it then appends CD1 and CD2 to the files. When they show up in Plex, Plex thinks these are part of a single movie (as it should based upon name).
Code: Select all
Input: /mnt/downloads/sabnzbd/movies/X-Men First Class (2011)/x-men.first.class.2011.multi.1080p.bluray.x264.dts(1).mkv
Input: /mnt/downloads/sabnzbd/movies/X-Men First Class (2011)/x-men.first.class.2011.multi.1080p.bluray.x264.dts.mkv
Group: [mov:x men first class 2011] => [x-men.first.class.2011.multi.1080p.bluray.x264.dts(1).mkv, x-men.first.class.2011.multi.1080p.bluray.x264.dts.mkv]
Get [English] subtitles for 2 files
Looking up subtitles by hash via OpenSubtitles
No matching subtitles found: /mnt/downloads/sabnzbd/movies/X-Men First Class (2011)/x-men.first.class.2011.multi.1080p.bluray.x264.dts(1).mkv
No matching subtitles found: /mnt/downloads/sabnzbd/movies/X-Men First Class (2011)/x-men.first.class.2011.multi.1080p.bluray.x264.dts.mkv
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/mnt/downloads/sabnzbd/movies/X-Men First Class (2011)/x-men.first.class.2011.multi.1080p.bluray.x264.dts(1).mkv]
Auto-detect movie from context: [/mnt/downloads/sabnzbd/movies/X-Men First Class (2011)/x-men.first.class.2011.multi.1080p.bluray.x264.dts.mkv]
[MOVE] from [/mnt/downloads/sabnzbd/movies/X-Men First Class (2011)/x-men.first.class.2011.multi.1080p.bluray.x264.dts(1).mkv] to [/mnt/move/movies/X-Men - First Class (2011)/X-Men - First Class (2011) CD1 [HD, 1080p, x264, 6ch, DTS 5.1, BluRay].mkv]
[MOVE] from [/mnt/downloads/sabnzbd/movies/X-Men First Class (2011)/x-men.first.class.2011.multi.1080p.bluray.x264.dts.mkv] to [/mnt/move/movies/X-Men - First Class (2011)/X-Men - First Class (2011) CD2 [HD, 1080p, x264, 6ch, DTS 5.1, BluRay].mkv]
Processed 2 files
So my issue could be a timing issue - maybe I need to process downloads more frequently to reduce the likelihood of a duplicate file showing up in this manner. Or maybe it is caused due to the NZB software extracting from archives with obfuscated names and then renaming the resulting file to the original name.
In any case, filebot is processing both files at the same time, but does not see that they are duplicate. it then appends CD1 and CD2 to the files. When they show up in Plex, Plex thinks these are part of a single movie (as it should based upon name).
Re: Can you disable CD[0-9] naming scheme in AMC script?
Are you calling FileBot manually? Or are you calling filebot periodically? Or is sabnzbd calling filebot?
Ideally, you'd hook the amc script up with your NZB tool, and call the amc script on your newly downloaded file, instead of periodically calling filebot on folder that already has multiple files in it.
Here's an example of how it works with nzbget:
https://github.com/filebot/plugins/blob ... process.sh
Here's the docs on how to write sabnzbd post-processing scripts:
https://sabnzbd.org/wiki/scripts/post-p ... ng-scripts
There's no official example for sabnzbd integration, so I can help you write one, if you can help me test it.
Ideally, you'd hook the amc script up with your NZB tool, and call the amc script on your newly downloaded file, instead of periodically calling filebot on folder that already has multiple files in it.
Here's an example of how it works with nzbget:
https://github.com/filebot/plugins/blob ... process.sh
Here's the docs on how to write sabnzbd post-processing scripts:
https://sabnzbd.org/wiki/scripts/post-p ... ng-scripts

-
- Posts: 35
- Joined: 14 Jul 2018, 17:22
Re: Can you disable CD[0-9] naming scheme in AMC script?
I call filebot from a cron schedule from my host OS. The reason I do this is that all the parts of my media workflow run from separate docker containers, and I haven't figured out how to call filebot via script from another container.
So as a workaround I schedule filebot to run every 30 mins with various params to process movies and tv from different download folders.
So as a workaround I schedule filebot to run every 30 mins with various params to process movies and tv from different download folders.
Re: Can you disable CD[0-9] naming scheme in AMC script?
You could do something like this, to call filebot on each file, so there's guaranteed to be only one movie match for that one file:
Typical filebot options omitted. Can use amc script instead of -rename if you want, but the latter will be much faster for rapid calls.
Code: Select all
find /path/to/files -type f -iname "*.mkv" -exec filebot -rename {} ';'
