Failed to fetch : How to exclude years from tvdb search ?

Any questions? Need some help?
Post Reply
User avatar
rednoah
The Source
Posts: 24625
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Failed to fetch : How to exclude years from tvdb search ?

Post by rednoah »

Sorry, the current behaviour is required for some use cases go actually get the correct match. Oddly enough, the examples here work exactly the other way around.

:arrow: Best to report the issue on the TheTVDB Forums so they can fix the issue in their search engine or alternatively add the necessary alias names.


EDIT:

Oddly enough, it works for me:

Code: Select all

filebot -rename *.mp4 -non-strict --log INFO --action TEST
[TEST] from [Avenue.5.2020.S01E06.VO.HDTV.x264.mp4] to [Avenue 5 - 1x06 - Was It Your Ears.mp4]
[TEST] from [The.Magicians.US.S05E08.VO.WEBRip.x264.mp4] to [The Magicians (2015) - 5x08 - Garden Variety Homicide.mp4]
[TEST] from [Traces.2019.S01E02.VO.HDTV.x264.mp4] to [Traces - 1x02 - Episode 2.mp4]
Perhaps try the latest beta for good measure?
viewtopic.php?t=1609
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 24625
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Failed to fetch : How to exclude years from tvdb search ?

Post by rednoah »

Different series. Different file path. Different problem. There'll always be a corner case that doesn't work.


Typically, I would recommend using the --filter option to fine-tune things for your specific use case, e.g. since you're only processing recently aired episodes, the age filter approach might work well for you:
viewtopic.php?t=2127


However, in this case, it does work correctly out-of-the-box for me here:

Code: Select all

$ filebot -rename *.mp4 -non-strict --action TEST --log INFO
[TEST] from [Monsterland.S01E01.WEBRip.x264.mp4] to [Monsterland - 1x01 - Port Fourchon, Louisiana.mp4]
[TEST] from [The.Good.Lord.Bird.S01E01.WEBRip.x264.mp4] to [The Good Lord Bird - 1x01 - Meet the Lord.mp4]
[TEST] from [The.Queens.Gambit.S01E01.WEBRip.x264.mp4] to [The Queen's Gambit - 1x01 - Openings.mp4]
[TEST] from [The.Right.Stuff.S01E04.WEBRip.x264.mp4] to [The Right Stuff - 1x04 - Advent.mp4]

:!: If you process a series / episode before the series / episode information is available in the database, then FileBot will end up with the "next best" match as per -non-strict matching. This may be a possible explanation, but we can't say for sure without reproducing the issue. Processing files 2-3 days after release, instead of immediately, may alleviate this particular issue.


:!: If you're running tests on previously incorrectly renamed files, then you'll want to check and clear xattr, otherwise FileBot will tend to prefer the previous match. Please read Metadata and Extended Attributes for details.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 24625
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Failed to fetch : How to exclude years from tvdb search ?

Post by rednoah »

:!: :!: :!: -no-xattr has no effect on new files, because new files don't have xattr. :!: :!: :!:


:idea: If -no-xattr has an effect, then that just means the file has previously been processed and tagged by FileBot already, and so -no-xattr merely enables a clean test case, but won't have any special effect on new untagged files.


:idea: Note that you should use filebot -revert to revert files to their original file names if you find mismatched files. If you manually revert file paths, then you will likely forget to clear xattr, which can then negatively affect future filebot runs. If you correctly revert files, then this won't be an issue.


:idea: If files are xattr tagged correctly, then that will positively affect future filebot runs. So you generally want FileBot to write xattr because if you disable xattr you will later regret it for one reason or another.


:idea: Please read Metadata and Extended Attributes for details.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 24625
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Failed to fetch : How to exclude years from tvdb search ?

Post by rednoah »

1.
We would expect a search for monsterland 2020 to yield at least 1 good result. TheTVDB search incorrectly doesn't yield any good results for a perfectly good search query. It might start working after a while though.

In this case --db TheMovieDB::TV performs better:

Code: Select all

filebot -rename *.mp4 --db TheMovieDB::TV -non-strict --action TEST --log INFO
[TEST] from [Monsterland.2020.S01E01.WEBRip.x264.mp4] to [Monsterland - 1x01 - Port Fourchon, LA.mp4]


2.
If all your files follow the Name.Year naming pattern, then you can use --q query expressions to select the query string from the filename via your own custom code:
viewtopic.php?t=12043

Code: Select all

filebot -rename *.mp4 --q "{fn.before(/[0-9]{4}/)}" --db TheTVDB -non-strict --action TEST --log INFO
[TEST] from [Monsterland.2020.S01E01.WEBRip.x264.mp4] to [Monsterland - 1x01 - Port Fourchon, Louisiana.mp4]


3.
rednoah wrote: 26 Oct 2020, 02:48 Typically, I would recommend using the --filter option to fine-tune things for your specific use case, e.g. since you're only processing recently aired episodes, the age filter approach might work well for you:
viewtopic.php?t=2127
The generic answer for any kind of mismatch is to use --filter to make the problem space smaller:
rednoah wrote: 27 Oct 2014, 20:54 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.

Code: Select all

--filter "age < 7"
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 24625
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Failed to fetch : How to exclude years from tvdb search ?

Post by rednoah »

Your query expression will probably need to clean up the search query as well, e.g. replace dot with space:

Code: Select all

--q "{fn.before(/[0-9]{4}/).replace('.', ' ').trim()}"

:!: Note that you do not need to use --q at all if you are using --db TheMovieDB::TV because the latter allows for (and yields better results with) Name Year search queries.
:idea: Please read the FAQ and How to Request Help.
Post Reply