Renaming bug

All your suggestions, requests and ideas for future development
Post Reply
Al3x
Posts: 19
Joined: 19 Aug 2014, 19:32

Renaming bug

Post by Al3x »

Filename before: "American Dad S11E07.mp4", filename after "American Dad! - S11E02 - A Boy Named Michael.mp4"

Same with a few other American Dad episodes.

Here's the script:

filebot -script fn:amc --output "X:/Media" --log-file amc.log --action copy --conflict auto -non-strict "X:/Downloads/American.Dad.S11E07.HDTV.x264-KILLERS" --def music=y subtitles=en artwork=y storeReport=y deleteAfterExtract=y clean=y unsorted=y "movieFormat=X:/Media/Movies/{n} ({y}) {imdb.rating} {source} {resolution}/{n} ({y}) {imdb.rating} {source} {resolution}" "seriesFormat=X:/Media/TV/{n}/{'Season '+s}/{n} - {s00e00} - {t}"
User avatar
rednoah
The Source
Posts: 19584
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Renaming bug

Post by rednoah »

Please provide a link to the correct episode data.

What is the expected result? Episode S11E07 does not exist, thus the result is undefined.

@see http://thetvdb.com/?tab=season&seriesid ... 7232&lid=7

If you have issues like this I recommend NOT using -non-strict which prevents processing of incorrectly named files.
:idea: Please read the FAQ and How to Request Help.
skullzy
Power User
Posts: 50
Joined: 07 Jan 2015, 22:19

Re: Renaming bug

Post by skullzy »

rednoah wrote:Please provide a link to the correct episode data.

What is the expected result? Episode S11E07 does not exist, thus the result is undefined.

@see http://thetvdb.com/?tab=season&seriesid ... 7232&lid=7

If you have issues like this I recommend NOT using -non-strict which prevents processing of incorrectly named files.
Perhaps one of the most aggravating things is that filebot relies on TheTVDB for accurate data, removed -non-strict and as expected I received this.

Code: Select all

Group: [tvs:american dad] => [American.Dad.S11E14.720p.HDTV.X264-DIMENSION.mkv]
Rename episodes using [TheTVDB]
Auto-detected query: [American Dad]
Fetching episode data for [American Dad!]
CmdlineException: Unable to match files to episode data
Clean temporary extracted files
The issue is that DaniMB the person who added the series data has done so incorrectly which is causing issue. Example, "Big Stan on campus" is S11E04, but DaniMB has set it as S12E04.

What would be the best way around this? imdb has the episodes listed correctly.
User avatar
rednoah
The Source
Posts: 19584
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Renaming bug

Post by rednoah »

1)
It fails because "American.Dad" doesn't exactly match "American Dad!" (which could be fixed) but if that worked it'd still fail (as it is supposed to) since S11E14 doesn't match anything (which can't be fixed).

2)
IMDB ToS disallow scraping, and there's no API, so no IMDB data. Besides, that's not a solution to the problem, and it'd probably be "wrong" for exactly the same reasons just as often.

The solution is simple, but it varies depending on your setup:
AMC wrote:Advanced Fine-Tuning
You can use your own --filter rules to fine-tune matching to your needs and avoid mismatches. For example, if one show is confused with another due to bad naming or missing data you can simply exclude the bad one, or if you only process recently aired episodes you could exclude any episode of any show that has been aired for more than a few days.

e.g. if you only process recently aired episodes you can virtually guarantee 100% auto-detection accuracy by adding simple filter rules:

Code: Select all

--filter "age < 7" --def "ut_label=TV"
There's no way anyone could match "American Dad S11E14" to "American Dad "S12E04" based on that piece of information alone. But if you were to exclude all potentially misleading matches right away then S11E14 would naturally end up matching the best (and only) option which is S12E04.
:idea: Please read the FAQ and How to Request Help.
skullzy
Power User
Posts: 50
Joined: 07 Jan 2015, 22:19

Re: Renaming bug

Post by skullzy »

tvdb has American Dad! and American Dad both with the same show ID so no matter which one you click you are directed at the same series. But the issue is that the user who added the show has messed up the episodes, season 12 hasn't yet been released, all the episodes the user has added have been added in correctly.

So if I'm going to try and get this resolved in tvdb, if I can then it will prevent myself and others from adding more code to our set-up. well that's the hope.

Thanks for the reply though and as always appreciate your hard work :)
User avatar
rednoah
The Source
Posts: 19584
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Renaming bug

Post by rednoah »

Well, if it's actually an error then just raise the issue in the TheTVDB forums.

I just assumed both TheTVDB and IMDb are correct but different. There's plenty of shows where there's different opinions on how exactly the episodes should be numbered.
:idea: Please read the FAQ and How to Request Help.
skullzy
Power User
Posts: 50
Joined: 07 Jan 2015, 22:19

Re: Renaming bug

Post by skullzy »

I use to think the same, but season 12 hasn't been aired yet, imdb, tvrage and tv.com all have the same episode data, but I've contacted them and hopefully I can get it sorted soon :)

Edit - okay so I'm in the wrong here, tvdb is correct and the other sites are in fact wrong as tvdb got their data for the series directly from tbs. I don't understand how hard it could be for these website to retrieve the correct data for the the shows available, I somewhat understand why imdb may be wrong as they're main focus is movies but it bewilders me when almost every website that provides data on a series provides different info.

So looks like the filtering is the only way through this :/ it's one huge pain in the butt.

Anyway thanks for the help.
User avatar
rednoah
The Source
Posts: 19584
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Renaming bug

Post by rednoah »

Just make sure that your "weekly" TV show downloads get automatically assigned some tag and then you can set --filter dynamically.
:idea: Please read the FAQ and How to Request Help.
skullzy
Power User
Posts: 50
Joined: 07 Jan 2015, 22:19

Re: Renaming bug

Post by skullzy »

rednoah wrote:Just make sure that your "weekly" TV show downloads get automatically assigned some tag and then you can set --filter dynamically.
Cheers dude, the thing that's confusing me at the moment is how to approach this.. because on torrent sites they are (from the looks of things) using imdb's data for American dad but we need to filter it so that it renames the episode correctly.

Example: IMDB Season 1 has 23 episodes, now obviously season 1 has 7 episodes and the remainder is from season 2, but I'm facing the dilemma of how would I apply something to the filter so that if in case the future seasons have less or more episodes that it was intended to have, how could I apply filter to it so example..

So for some episodes s11e04 gets translated to s12e04, but let's say there was a s11e23 and needed this to translate to s13e01 how would I go about doing something like that?
User avatar
rednoah
The Source
Posts: 19584
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Renaming bug

Post by rednoah »

By forcing filebot to select a match from the most recently aired episodes. As described above. ;)

The assumption being that there is only one episode per week and that you process that episode within a week of being aired.

Just need to make sure that this behaviour is not applied to movies and TV episodes that haven't been aired recently.
:idea: Please read the FAQ and How to Request Help.
skullzy
Power User
Posts: 50
Joined: 07 Jan 2015, 22:19

Re: Renaming bug

Post by skullzy »

I can see a lot of headaches in my future lol, thanks for the help :)

Edit - Okay so found the solution thanks to other topics in the forum, although I had to make a small modification to the original code. Now this code will run for all, I found that in other posts included "n != SeriesName", that it would search through all non seriesnames.

Code: Select all

-non-strict --filter "(now.time - airdate.timeStamp < 604800000)"

Code: Select all

Input: D:\Torrent\American.Dad.S11E14.720p.HDTV.X264-DIMENSION\American.Dad.S11E14.720p.HDTV.X264-DIMENSION.mkv
Group: [tvs:american dad] => [American.Dad.S11E14.720p.HDTV.X264-DIMENSION.mkv]
Rename episodes using [TheTVDB]
Auto-detected query: [American Dad]
Fetching episode data for [American Dad!]
Apply Filter: {(now.time - airdate.timeStamp < 604800000)}
Include [American Dad! - 12x14 - American Fung]
Include [American Dad! - 12x15 - Seizures Suit Stanny]
[TEST] Rename [D:\Torrent\American.Dad.S11E14.720p.HDTV.X264-DIMENSION\American.Dad.S11E14.720p.HDTV.X264-DIMENSION.mkv] to [D:\Media\Tv\American Dad!\Season 12\American Dad! - S12E14 - American Fung.mkv]

Code: Select all

Input: D:\Torrent\Bones S10E20 720p HDTV X264-DIMENSION\Bones S10E20 720p HDTV X264-DIMENSION.mkv
Group: [tvs:bones] => [Bones S10E20 720p HDTV X264-DIMENSION.mkv]
Rename episodes using [TheTVDB]
Auto-detected query: [Bones]
Fetching episode data for [Bones]
Apply Filter: {(now.time - airdate.timeStamp < 604800000)}
Include [Bones - 10x20 - The Woman in the Whirlpool]
Include [Bones - 10x21 - The Life in the Light]
Include [Bones - 10x22 - The End in the End]
Skipped [D:\Torrent\Bones S10E20 720p HDTV X264-DIMENSION\Bones S10E20 720p HDTV X264-DIMENSION.mkv] because [D:\Media\Tv\Bones\Season 10\Bones - S10E20 - The Woman in the Whirlpool.mkv] already exists
Processed 1 files

But if I used the following code I would get the following result.

Code: Select all

--filter "(n != 'American Dad!' || now.time - airdate.timeStamp < 604800000)"

Code: Select all

Input: D:\Torrent\Bones S10E20 720p HDTV X264-DIMENSION\Bones S10E20 720p HDTV X264-DIMENSION.mkv
Group: [tvs:bones] => [Bones S10E20 720p HDTV X264-DIMENSION.mkv]
Rename episodes using [TheTVDB]
Auto-detected query: [Bones]
Fetching episode data for [Bones]
Apply Filter: {(n != 'American Dad!' || now.time - airdate.timeStamp < 604800000)}
Include [Bones - 1x01 - Pilot]
Include [Bones - 1x02 - The Man in the S.U.V.]
Include [Bones - 1x03 - A Boy in a Tree]
Include [Bones - 1x04 - The Man in the Bear]
Include [Bones - 1x05 - A Boy in a Bush]
Include [Bones - 1x06 - The Man in the Wall]
Include [Bones - 1x07 - The Man on Death Row]
...
So it's best to use -non-strict --filter "(now.time - airdate.timeStamp < 604800000) as long as your script grabs TV shows only this will work fine. Although you could create two scripts and do a simple "if label = tv filebot -filter". 604800000 = a week, although I might set it for 48-72 hours since all my shows will be grabbed within the first 24 hours after it is aired.

Anyway you need to have -non-strict set in order for the filter to work, if you don't then stuff like this will happen.

Code: Select all

Input: D:\Torrent\American.Dad.S11E14.720p.HDTV.X264-DIMENSION\American.Dad.S11E14.720p.HDTV.X264-DIMENSION.mkv
Group: [tvs:american dad] => [American.Dad.S11E14.720p.HDTV.X264-DIMENSION.mkv]
Rename episodes using [TheTVDB]
Auto-detected query: [American Dad]
Fetching episode data for [American Dad!]
Apply Filter: {(now.time - airdate.timeStamp < 604800000)}
Include [American Dad! - 12x14 - American Fung]
Include [American Dad! - 12x15 - Seizures Suit Stanny]
CmdlineException: Unable to match files to episode data
Finished without processing any files
Failure (°_°)
Post Reply