Page 1 of 1

Force 'non absolute' numbering from TheTVDB

Posted: 01 Dec 2013, 08:07
by Ithiel
Hi guys,

I'm having an odd issue with renaming TV Shows where it is grabbing the absolute number in preference over the normal number, even though I've told it to use the normal episode number instead.

Example: This is what I'm using...

Code: Select all

{norm = {it.upperInitial().lowerTrail().replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/)}; norm(n)}{if (norm(n) != norm(primaryTitle)) ' ('+norm(primaryTitle)+')'} ({y}{" $certification"})/{episode.special ? 'Special' : 'Season '+s.pad(2)}/{norm(n)} {episode.special ? 'S00E'+special.pad(2) : s00e00} {norm(t)}{" [$vf $vc $ac $af]"}
Working Episode: http://thetvdb.com/?tab=episode&seriesi ... 5651&lid=7
Not Working Episode: http://thetvdb.com/?tab=episode&seriesi ... 1121&lid=7

For S03E02 of White Collar (which does not include an absolute number on TheTVDB), it correctly puts it in a folder called 'Season 03', and includes 'S03E02' in the name.
i.e. "X:\TV Shows\White Collar (2009 TV-14)\Season 03\White Collar S03E02 Where There's A Will [360p XviD MP3 2ch].avi"

For S03E01 of White Collar (which DOES include an absolute number on TheTVDB), it shows it as 'E31' and throws it in the root show directory.
i.e. "X:\TV Shows\White Collar (2009 TV-14)\White Collar E31 On Guard [360p XviD MP3 2ch]"

Then, for shows where every episode also lists an absolute number (like The Walking Dead - http://thetvdb.com/?tab=seasonall&id=153021&lid=7), it wants to do the latter for all of them.
i.e. What should be this: "X:\TV Shows\Walking Dead, The (2010 TV-14)\Season 04\Walking Dead, The S04E04 Indifference [720p x264 AC3 6ch].mkv"
Instead becomes this: "X:\TV Shows\Walking Dead, The (2010 TV-14)\Walking Dead, The E39 Indifference [720p x264 AC3 6ch].mkv"

Absolute numbering is great for Animes where I want absolute numbering, but for TV Shows, I need the season based number (which I thought is what I set it to get), lol.

Any idea what's going on here, or how to fix it? :-/

~Ithiel

Re: Force 'non absolute' numbering from TheTVDB

Posted: 01 Dec 2013, 11:54
by rednoah
Works for me:
http://snag.gy/inFNa.jpg

I'm testing with empty files so the media info is missing.

Make sure to set "Preferred Episode Order" to "Airdate Order".

AniDB will always default to Absolute Order. TheTVDB will sometimes default to "Airdate Order" if "Absolute Order" data is not available. That's what's happening in the above I think.

Re: Force 'non absolute' numbering from TheTVDB

Posted: 02 Dec 2013, 00:43
by Ithiel
Hi Red,

It's identified that as "Talking Dead", not "The Walking Dead", lol.

Here's what I get: http://snag.gy/GbjHl.jpg

~Ithiel


Edit:
Make sure to set "Preferred Episode Order" to "Airdate Order".
Sonofa.... lol.. OK, yeah - that worked. My bad >.<

*feels like an idiot right about now*

Re: Force 'non absolute' numbering from TheTVDB

Posted: 02 Dec 2013, 02:22
by rednoah
Ah, I guess it ran out of numbers for "The Walking Dead" so it thinks the episode must be "Talking Dead" since there's still episodes left where the numbers fit and that haven't been assigned to files yet.

Re: Force 'non absolute' numbering from TheTVDB

Posted: 02 Dec 2013, 09:37
by Ithiel
Not sure, but when it searches 'Walking Dead', it finds 'Talking Dead', but when I hold shift and manually specify "The Walking Dead", it figures out what I'm on about :-/

Re: Force 'non absolute' numbering from TheTVDB

Posted: 02 Dec 2013, 14:42
by rednoah
The wrong was is actually more similar (in terms of edit distance) than the correct match. :D

Fixed with r1894.

Re: Force 'non absolute' numbering from TheTVDB

Posted: 03 Dec 2013, 12:48
by Ithiel
awesome, thanks mate.

I had also noticed that when I had a folder filled with single episodes from dozens of different shows (i.e. a week or two's worth of downloads extracted into one folder that hadn't been sorted yet), it seemed to have a total freakout in identifying them. I ended up using theRenamer to get them into folders, and then FileBot to get them into the correct folder names with the correct file names.

This is kind of tangent to the op, so I'll try and run a similar test next time I build up a bunch of shows that need to be sorted (which might take a while now since their is -nothing- airing at the moment, lol) and will then post in a new thread. :-)

Re: Force 'non absolute' numbering from TheTVDB

Posted: 03 Dec 2013, 12:57
by rednoah
If you send me the filenames next time I can have a look. If the files are badly named, then it may use information from file of the same set to compensate missing info in other files.

I'd work if you do files one by one. Though I guess you'd wanna script that. :D

It's easy to have a script process each file one by one:

Code: Select all

args.getFiles().each{ rename(file:it) }

Re: Force 'non absolute' numbering from TheTVDB

Posted: 06 Dec 2013, 23:45
by Ithiel

Code: Select all

args.getFiles().each{ rename(file:it) }
Yuup... I officially have no idea what to do with that information, lol.

Re: Force 'non absolute' numbering from TheTVDB

Posted: 07 Dec 2013, 06:58
by rednoah
Sorry, renaming file by file only works for cmdline. Doing in the GUI is a bit cumbersome.

If you have a batch of files that don't work if you match them in one go just send me the paths and i'll have a look.

Re: Force 'non absolute' numbering from TheTVDB

Posted: 18 Dec 2013, 22:18
by Ithiel
Not sure if you tweaked things in a recent update, if this particular collection of episodes was just a little more agreeable, or if the program had learned from last time - but with the exception of one show that it couldn't find, my bulk 'scan the directory which 50 random episodes from different shows' session this time worked pretty much flawlessly via the GUI :-)

Re: Force 'non absolute' numbering from TheTVDB

Posted: 19 Dec 2013, 05:10
by rednoah
Not sure which particular tweak might have caused that, but glad it all came to together and just work. :D