FEATURE REQUEST: User defined dataset for mapping to series

All your suggestions, requests and ideas for future development
Post Reply
Posts: 2
Joined: 11 Jan 2020, 14:24

FEATURE REQUEST: User defined dataset for mapping to series

Post by the1337moderate »

As I persevere through my days with the living, I continually grow tired of performing repetitive, mundane tasks over, and over, and over, and over, and o...

The bulk of my file renaming work is airing Anime/TV shows. Nearly everyday I am renaming files that are just another episode to a show that I already renamed an episode for the week prior. So what is my biggest disappointment with Filebot as a product?

Having to pick the the correct match in the damn "Failed to identify some of the following files" prompt for the same shows, every week, every fucking time.

There are some shows that will not match using FileBot regardless of Match Mode [Opportunistic | Strict] and/or the source [TVDB|AniDB|TVMaze|TheMovieDB] used. Sometimes Filebot won't even match the name in the file because who the hell knows; I can type the name in the "Enter series name" text input box and then it'll match just fine.

Here's what I asking for. Give me a place where I can define the following three things:
  1. Regex query
  2. Match Source
  3. Match ID
And when I tell Filebot to match something, have it look against that dataset first for matches before going out and querying the online match source.

Here's some examples

Code: Select all

[SubsPlease] Detective Conan - 1002 (1080p) [4E17060B].mkv
If I try to match the first file in that list, Filebot prompts me with a Failed to identify some of the following files: Select best match for "Case Closed" prompt window. Of which "Case Closed" is not even in the name of the original file, so wtf on that. Even if I click the skip button, it'll still match just fine to the series i would have expected. If there was a way to define that that file should be matched to a specific ID, I wouldn't have to answer/skip/close the stupid prompt every time. With the second file in the list, this would also allow for automatic matching for shows whose names are ambiguous when matching in Opportunistic Match Mode. When I try to match the second file, I am given the same Failed to identify some of the following files: Select best match for "The Flash" prompt window which contains results for 4 different versions of The Flash. And when I select the one I want I get prompted with almost the same prompt again, Failed to identify some of the following files: Select best match for "the flash 2014"

The entries I would put in the requested dataset feature for the files listed above:

Code: Select all

(?i)(?:\[subsplease\] )??detective conan(?: |-)*[0-9]+
I would also like an icon to show in the New Names pane when an file is matched against the manual dataset. Similar to the gold [ABC] icon when you double click -> Edit Name on an match entry. When the mouse is hovered over that entry, it should give a tooltip under the cursor stating what entry in the dataset it matched. This would greatly help with troubleshooting a bad regex entry.

Reading through many of the threads in this forum board, this feature would go a long way to solving the "My thing is matching a that instead of this" issues that come up from time to time. By allowing the user to create their own rules, the user can adapt the application to their specific use edge cases. Obviously, this isn't going to matter much for someone who only matches/renames a whole series or season in one sitting, But for those that are using FileBot on a consistent basis via GUI or via CLI this could be of great benefit. Especially when renaming a single file from many different series in one sitting or show with a name that just doesn't match using FileBot's current logic.

@rednoah How much pizza and beer do I have to buy you to sponsor development?
User avatar
The Source
Posts: 20074
Joined: 16 Nov 2011, 08:59

Re: FEATURE REQUEST: User defined dataset for mapping to series

Post by rednoah »

Have you tried the ImageImage toggle yet? It's not a golden bullet for all edge cases, but it does work well for the examples given above.

:arrow: https://www.youtube.com/watch?v=_crO68ayYks


:idea: You can further use Presets to set up predefined input / database / format / etc configurations to further streamline things if you use different settings for different files.
(NOTE: Presets do not allow you to predefine a Series ID)

If you need full control and full automation, then the command-line tools have got you covered:

e.g. find files where the file name maches /The.Flash/ and then process these files against TheTVDB Series 279121:

Code: Select all

filebot -rename -r . --file-filter "fn =~ /The.Flash/" --q 279121 --db TheTVDB --action TEST --log INFO
[TEST] from [The.Flash.2014.S07E07.Growing.Pains.1080p.AMZN.WEB-DL.DDP5.1.H.264-NTb.mkv] to [The Flash (2014) - 7x07 - Growing Pains.mkv]
:arrow: You can then build your own system on top of that, i.e. create a shell script and call filebot multiple times with different --file-filter --q --db options for each of your edge cases.

However, in this particular case, a generic filebot -rename call works just fine out of the box, so forcing the ID is not strictly necessary here:

Code: Select all

filebot -rename -r . --db TheTVDB -non-strict --action TEST --log INFO
[TEST] from [The.Flash.2014.S07E07.Growing.Pains.1080p.AMZN.WEB-DL.DDP5.1.H.264-NTb.mkv] to [The Flash (2014) - 7x07 - Growing Pains.mkv]
[TEST] from [[SubsPlease] Detective Conan - 1002 (1080p) [4E17060B].mkv] to [Detective Conan - 10x02 - The 14th Round of the Matsue Tamazo Linked Verse Contest (Part 2).mkv]
:idea: Please read the FAQ and How to Request Help.
Posts: 58
Joined: 19 Jul 2020, 15:05

Re: FEATURE REQUEST: User defined dataset for mapping to series

Post by rv23 »

Re: generic filebot -rename above
So as to add some info , Episode 1002 of detective Conan is actually S29E12 via airdate order and not S10x02.

Re: Feature Request
#2 above is in general the facility that is geared towards both situations and users who need "more". rednoah even provides and maintains a few scripts including the excellent CLI based AMC script - viewtopic.php?t=215 & https://github.com/filebot/scripts/blob ... amc.groovy

AMC is an excellent script which does a good job of matching *most* things using primarily TheMovieDB & TheTVDB & AniDB and is a good fit for those with a mix of movies & TV and don't have a particular aversion to using the Movie or TV Database names/ordering.

I use filebot almost exclusively for Anime, and my API lookup of choice is AniDB .. and like you I was not satisfied with the results for my specific requirements and ended up writing my own script that works only for Anime and uses AniDB lookups for everything.

re: Case Closed
Anime is a pandora's box for matching. Case Closed is the Official English name for Meitantei Conan (English Romanization of the Japanese name for the show). Detective Conan is however an official name, but I guess not technically for the US market (licensing I expect). https://anidb.net/anime/266

When you get to theTVDB, however Case Closed maps to this https://www.thetvdb.com/series/386451-case-closed , which at first glance I'm not sure where that fits into .. while detective conan maps to the "right" one here https://www.thetvdb.com/series/detective-conan , which ALSO lists case closed as one of it's aliases.

Totally annoying :)

I would like for the Feature you request to be added to one of the scripts that are officially supported, but that's also because I totally want to steal that code to add that functionality for *my* script :)
User avatar
The Source
Posts: 20074
Joined: 16 Nov 2011, 08:59

Re: FEATURE REQUEST: User defined dataset for mapping to series

Post by rednoah »

Let's wait and see what corner cases other users find. At this point, any additional logic I can think of is too specific to Detective Conan (i.e. more than 1000 episodes, multiple series ids with overlapping names, etc) for a general use case script ...

The "Failed to identify some of the following files" original topic (i.e. series selection) should have resolved itself by now though, for our example files at the very least.


If you're dealing with newly released files, then you can just single those out, and match them against whatever the most recent episode might be, ignoring the episode numbers completely.

:idea: Find media files that were encoded in the last week according to container metadata:

Code: Select all

--file-filter "media.EncodedDate =~ /2021/ && age < 7"
:idea: Force FileBot to match an episode from within the last week:

Code: Select all

--filter "age < 7"


Code: Select all

$ filebot -rename -r /input --file-filter "media.EncodedDate =~ /2021/ && age < 7" --filter "age < 7" --db TheTVDB -non-strict
Rename episodes using [TheTVDB] with [Airdate]
Lookup via [Case Closed, detective conan]
Fetching episode data for [Case Closed]
Fetching episode data for [Detective Conan]
Apply filter [age < 7] on [1289] options
Include [Detective Conan - 29x15]
[1] options remaining
[MOVE] from [Detective Conan - 1007.mkv] to [Detective Conan - 29x15.mkv]
:idea: Please read the FAQ and How to Request Help.
Post Reply