[REQ] AMC Script Improvement: Reference Series

All your suggestions, requests and ideas for future development
Post Reply
Damokles
Posts: 5
Joined: 17 Jul 2013, 20:42

[REQ] AMC Script Improvement: Reference Series

Post by Damokles »

Hi,

it would be cool if Filebot could analyze the target directory or optionally a reference directory for names of series,
this way the Filebot could improve the matching of candidates. For example if it has three alternatives and one is
in already known in the reference series then it will probably be this series, especially if it is not S01E01 but a higher episode.
User avatar
rednoah
The Source
Posts: 19140
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [REQ] AMC Script Improvement: Reference Series

Post by rednoah »

Send me the original paths that aren't working and i'll have a look what the best fix might be.


PS: You can probably build that logic with a more complicated --filter expression already to some degree.
:idea: Please read the FAQ and How to Request Help.
Damokles
Posts: 5
Joined: 17 Jul 2013, 20:42

Re: [REQ] AMC Script Improvement: Reference Series

Post by Damokles »

Hi,

it is currently working in non-strict mode.
I currently have a Task that runs every 5 mins with strict settings, and if files can't be matched I manually trigger the script with non-strict.
So my idea is to improve the matching by using the reference folders as additional input thus not requiring non-strict.
Maybe I'm a bit paranoid since I don't really understand the algorithm behind non-strict matching and thus don't trust it in an unattended mode.
User avatar
rednoah
The Source
Posts: 19140
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [REQ] AMC Script Improvement: Reference Series

Post by rednoah »

Don't worry, at this point it's so intricate even i don't understand the details.

Have you tried --filter like this?

Code: Select all

--filter "new File('D:/output/TV Shows').listFiles()*.name.contains(n)"
This will only allow episodes from shows where there is already a folder named n to be passed onto the matching process.

PS: Don't repeat running the script when there's files lying around all the time. You're wasting resources bugging the DBs all the time. Make sure AMC only runs on each file only once (or twice if the second is manually).
:idea: Please read the FAQ and How to Request Help.
Damokles
Posts: 5
Joined: 17 Jul 2013, 20:42

Re: [REQ] AMC Script Improvement: Reference Series

Post by Damokles »

Hi,

yes the filter works thanks.

About your PS:
My setup is that my mediaserver has an incoming directory which I scan every 5min for new files.
It would be great if filebot could watch the directory and move the files on its own, alternatively if filebot/amc
could move non matched files to another directory would be ok too. Or how would you approach this issue?

On a side note, I saw Ehcache in the filebot source for DB Request, so am I really hitting the DBs again and again?
User avatar
rednoah
The Source
Posts: 19140
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [REQ] AMC Script Improvement: Reference Series

Post by rednoah »

Well, you'll be hitting the DB again and again once every 2 days after the cache times out. :D

The "move unmatched files" options might work best. Though you'd have to modify the script a bit. It's easy, you have the input paths and at the end of amc you just move everything that hasn't been moved already (i.e. File.exists)
:idea: Please read the FAQ and How to Request Help.
Damokles
Posts: 5
Joined: 17 Jul 2013, 20:42

Re: [REQ] AMC Script Improvement: Reference Series

Post by Damokles »

I've added move unmatched to amc (https://gist.github.com/leonard84/6090943) but I always run into this exception before I even get there any ideas.

Exception: Unable to match files to episode data

P.S. I would be happy if we could add this to the embedded amc
User avatar
rednoah
The Source
Posts: 19140
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [REQ] AMC Script Improvement: Reference Series

Post by rednoah »

Won't do any development for a month so this won't happen anytime soon.

I'm guess you get Exception: Unable to match files to episode data on new shows? Keep in mind that the filter excludes all episode data as specified by you. If there's no episode data left it'll fail of course. So with your "Reference folder" --filter you'll have to sort the first episode manually.
:idea: Please read the FAQ and How to Request Help.
Damokles
Posts: 5
Joined: 17 Jul 2013, 20:42

Re: [REQ] AMC Script Improvement: Reference Series

Post by Damokles »

So I can't move unmatched files because of the exception... Could you tell me which function in the script throws this exception so I can wrap it in tryCatch/Quietly?

And is there an option to tell clean option only to delete everything inside the sourcefolder but not the sourcefolder itself?
User avatar
rednoah
The Source
Posts: 19140
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [REQ] AMC Script Improvement: Reference Series

Post by rednoah »

1.
It is catching all exceptions. If something goes wrong during the rename() call things get logged to stderr and ignored.

Looking at your code, it not working has nothing to do with any failures in the calls before but you're checking the wrong list. tempFiles is for keeping track of newly extracted/downloaded files during the call. You wanna check what files of input still exist after the rename() calls.

2.
Yep, read the docs on the cleaner script. I think it's --def root=y|n
:idea: Please read the FAQ and How to Request Help.
Post Reply