Help Tracking Down a Few Annoying Script Issues

Support for Windows users
Post Reply
tolagarf
Posts: 18
Joined: 20 Sep 2017, 08:02

Help Tracking Down a Few Annoying Script Issues

Post by tolagarf »

Hey there folks.

I've been running Filebot for quite some time now, and with the help of the community here I've managed to have an almost automated system going, with a few daily hiccups though. I'm not sure if those issues are related to Filebots scraping or general features and I'm just not using them right. Please have a look at my script and let me know if you spot any glaring issues that should be solved.

The issues I'm having are as follows:

1. 9 out of 10 downloaded movie will go into the 'Unsorted' dir. I suspect this has to do with the way I handle the 7 day timeout of TV episodes, but for some reason it just doesn't work well with movies.
2. Sometimes when downloading a movie Filebot will mistake it for a TV show, something of a similar name, and then create a new folder under TV Shows. Then I have to delete that, then find the movie under the download folder and move it into Movies in its proper folder. I find it odd this is happening, as movies don't ever include a S00E00 naming scheme, why would it mistake it for a TV show in the first place?
3. TV episodes being renamed to the most released episode number, within the same TV show. Example: I download an entire season, let's say 10 episodes of the same show but in 10 different torrents. If episode 10 was just released within that 7 day window, Filebot will rename all the first 9 episodes to S0XE10 until it fails because it keep trying to create a file with the same filename, and then an email pops up with "Failure", but no details at all. However this does not happen if I download an entire season of a show within the same torrent, lets say 10 episodes again. Filebot will correctly find the show and rename the episodes properly, or sometimes just dump them all unnamed into 'Unsorted'.

I hope someone has a keen eye and able to spot if I made some mistakes in the script, thanks :)

Code: Select all

cmd /c START /MIN cmd /c filebot.exe -script fn:amc --output "F:/Downloads" --action copy --conflict skip -non-strict "F:/!torrent" --log-file "F:/Downloads/amc.log" --def excludeList=amc.txt --def movieFormat="{genres.contains(/Documentary/) ? 'D:/Docus/' : 'E:/Movies/'}/{plex.name}/{plex.name}{'.'+vf}{'.'+vc}{'.'+ac}{'-'+group}" seriesFormat="{genres.contains(/Documentary/) ? 'D:/Docus/' : 'D:/TV Shows/'}{plex.tail}{'.'+source}{'.'+vf}{'.'+vc}{'.'+ac}{'-'+group}" animeFormat="D:/TV Shows/'}{plex.tail}{'.'+source}{'.'+vf}{'.'+vc}{'.'+ac}{'-'+group}" musicFormat="D:/Musik/{albumartist}/{album}/{t}" unsorted=y music=y extractFolder="F:/Downloads/Unsorted" artwork=n deleteAfterExtract=y clean=y reportError=y gmail=xxxxxx:xxxxxx --filter "age < 7 || !model.any{ it.age < 7 }" --def "ut_label=TV"
User avatar
rednoah
The Source
Posts: 22974
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Help Tracking Down a Few Annoying Script Issues

Post by rednoah »

Do you have test cases for each of these corner cases? Maybe logs that show FileBot misbehaving?


:!: --def "ut_label=TV" means you're strongly hinting that whatever is passed in, is a TV show, i.e. you're forcing series mode.
:idea: Please read the FAQ and How to Request Help.
tolagarf
Posts: 18
Joined: 20 Sep 2017, 08:02

Re: Help Tracking Down a Few Annoying Script Issues

Post by tolagarf »

rednoah wrote: 20 Jan 2019, 12:06 Do you have test cases for each of these corner cases? Maybe logs that show FileBot misbehaving?


:!: --def "ut_label=TV" means you're strongly hinting that whatever is passed in, is a TV show, i.e. you're forcing series mode.
Not sure I have logs, but I might be able to produce some. Where would I look for those?

And regarding the --def "ut_label=TV" I had to use that in order to limit how many false hits I would get on TV episodes. Not sure there's a way around this? Not something I have tested though
User avatar
rednoah
The Source
Posts: 22974
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Help Tracking Down a Few Annoying Script Issues

Post by rednoah »

:arrow: If you give me a few example file paths, then I can run things myself and see what's happening.

You will find the logs here:

Code: Select all

--log-file "F:/Downloads/amc.log"
If you already know that you're only gonna be processing TV Shows, then setting --def "ut_label=TV" makes things work much better obviously, since FileBot has to guess less.

Typically, a user would manually (or automatically if possible) tag movies, series, etc as such in the upstream program, and then that hint would be passed on to filebot via the --def ut_label option.
:idea: Please read the FAQ and How to Request Help.
tolagarf
Posts: 18
Joined: 20 Sep 2017, 08:02

Re: Help Tracking Down a Few Annoying Script Issues

Post by tolagarf »

Ok I do have that log, I will have to get back to you. Might take some days, and else I will just have to force a new set of fails, as it's easy for me to reproduce (mostly)
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Help Tracking Down a Few Annoying Script Issues

Post by kim »

sounds like this does more harm than good

Code: Select all

--filter "age < 7 || !model.any{ it.age < 7 }"
only use it on single NEW episodes NOT movies or seasons
If you only process recently aired episodes you could exclude any episode of any show that has been aired more than a few days ago, immediately eliminating any and all potential mismatches with similarly named TV Shows aired at different times.
viewtopic.php?t=2127
User avatar
rednoah
The Source
Posts: 22974
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Help Tracking Down a Few Annoying Script Issues

Post by rednoah »

tolagarf wrote: 20 Jan 2019, 10:57 Example: I download an entire season, let's say 10 episodes of the same show but in 10 different torrents. If episode 10 was just released within that 7 day window, Filebot will rename all the first 9 episodes to S0XE10
Indeed, this is caused by your custom --filter option, which effectively forces FileBot to find a match within recently aired episodes only, which won't work if the episodes you are processing aren't recently aired.
:idea: Please read the FAQ and How to Request Help.
tolagarf
Posts: 18
Joined: 20 Sep 2017, 08:02

Re: Help Tracking Down a Few Annoying Script Issues

Post by tolagarf »

Hey all.

Just an update on this issue, which now seems to be fixed. It was indeed that --filter option that screwed it all up, and the fault is mine for failing to read instructions properly :)
I mean the only issue I've encountered this last week was "Les Misérables (2018)" (TheTVDB ID 354256) being mistaken for "The Miserables (2007)" (TheTVDB ID 167841), but that's really about it.

Thank you all again for the help.
Post Reply