Incorrect TV Show matches

Any questions? Need some help?
Post Reply
LexLolly
Posts: 7
Joined: 03 Nov 2013, 11:42

Incorrect TV Show matches

Post by LexLolly »

Dear Support, I have noticed that Filebot renames unknown shows randomly to any other show within the same folder. I have used the GUI as well as written an apple script however both with the same results.

I would prefer if the unrecognized show is left as is. Is there a way doing this? - see attached screen shot (demo show).

Here my Apple Script:

-----Start
set ProgramPath to "/Applications/FileBot.app/Contents/MacOS/filebot"
set FilePath to "/Users/myname/Desktop/Temp Work/Ready to Upload"
set FormatFile to "{n}.{s00e00} - {t}"

do shell script (quoted form of ProgramPath) & " -rename " & (quoted form of FilePath) & " --db TheTVDB --conflict skip --log all --format " & (quoted form of FormatFile) & " -non-strict"
-----End
User avatar
rednoah
The Source
Posts: 23927
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Incorrect TV Show matches

Post by rednoah »

It's not a bug, it's a feature! (Seriously!) :D

If you pass a set of files filebot will assume that the files may belong together (unless otherwise indicated by another valid match).

Why not call filebot on each individual file? That way files can't affect each other and you won't even need to use -non-strict.
:idea: Please read the FAQ and How to Request Help.
LexLolly
Posts: 7
Joined: 03 Nov 2013, 11:42

Re: Incorrect TV Show matches

Post by LexLolly »

Not sure how to do that. I am using Hazel to move the files into a folder. I then rename them with FileBot and then have Hazel move them onto my NAS for Plex to index.
That means at any given time there could be more than one file in the folder causing above mentioned issue (feature). So not using the -non-strict would mean that the renaming stops (or am I wrong in this assumption?).
User avatar
rednoah
The Source
Posts: 23927
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Incorrect TV Show matches

Post by rednoah »

You should use -rename only on files from the same series, in default strict mode it will abort if there's multiple files from multiple shows. If you call it on a single file it can only belong to a single series, so you need -non-strict only if you wanna deal with bad numbering, not because you wanna deal with multiple shows.

You already have your apple script. How hard can it be to run a command for each file?


With FileBot scripting it'd look like this:

Code: Select all

args.getFiles{ it.isVideo() }.each{
	rename(file:it)
}
And then just call:

Code: Select all

filebot -script myscript.groovy --db thetvdb ...
:idea: Please read the FAQ and How to Request Help.
LexLolly
Posts: 7
Joined: 03 Nov 2013, 11:42

Re: Incorrect TV Show matches

Post by LexLolly »

Hi Rednoah,
when executing blow script (matching file by file) I run into issues when filebot cannot make an absolute positive match (with me it "Grimm.SxxExx.avi") and the script fails. Any Idea on this?


---- Begin - TVShowsFileNames is a list with all files names in my folder
repeat with TVShow in TVShowFileNames
set RenameFile to FilePath & TVShow
do shell script (quoted form of ProgramPath) & " -rename " & (quoted form of RenameFile) & " --db TheTVDB --conflict skip --format " & (quoted form of FormatFile)
end repeat
User avatar
rednoah
The Source
Posts: 23927
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Incorrect TV Show matches

Post by rednoah »

it's strict mode, sure it failed, that's why it can't get it wrong :P

i guess you still need -non-strict then for those files ;)
:idea: Please read the FAQ and How to Request Help.
LexLolly
Posts: 7
Joined: 03 Nov 2013, 11:42

Re: Incorrect TV Show matches

Post by LexLolly »

Hey, here is what I came up with in the end - this actually works now.
1. I download the files into a "Complete" folder and use HAZEL to extract and unarchive all the media files (excluding samples,..) and move those files to the "Ready to Upload" folder. Here HAZEL triggers and renames the download file(s) with FILEBOT (see script below) and then moves the renamed file(s) to another folder on my local drive before HAZEL then moves the files into predefined folders on my NAS where PLEX indexes the shows for viewing.


-------------------Apple Script Start
set ProgramPath to "/Applications/FileBot.app/Contents/MacOS/filebot"
set FilePath to "/Users/name/Desktop/Ready to Upload/"
set FileTestPath to "Macintosh HD:Users:name:Desktop:Ready to Upload:" as alias
set FormatFile to "{n}.{s00e00} - {t}"

tell application "Finder"
set TVShowFileNames to name of every file in FileTestPath
end tell

repeat with TVShow in TVShowFileNames
try
set RenameFile to FilePath & TVShow
do shell script (quoted form of ProgramPath) & " -rename " & (quoted form of RenameFile) & " --db TheTVDB --conflict skip -non-strict --format " & (quoted form of FormatFile)
on error
--do nothing
end try
end repeat
---------------end script

I had to add the "on error" as the script will fail if filebot cannot find a match.
Rednoah, thanks again for the pointers.
LeLo
Post Reply