AMC Renaming of American Dad! seemingly completely random?

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

AMC Renaming of American Dad! seemingly completely random?

Post by Al3x »

This is my batch script, that runs and works well for 99% of things, but for "American Dad!" it seems to assign it randomly.

Code: Select all

filebot -script fn:amc --output "X:/Media" --log-file amc.log --action copy --conflict auto -non-strict %variable% --def music=y subtitles=en artwork=y plex=localhost storeReport=y deleteAfterExtract=n 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}"
Here is the relevant XML history of several episodes I've recently downloaded. I was on an older version. I don't know how old, but I just updated after opening the GUI and receiving the prompt...so this may have been resolved already.

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<history>
    <sequence date="2016-06-13T20:57:08.763-07:00">
        <rename dir="X:\Downloads\American.Dad.S12E20.XviD-AFG" from="American.Dad.S12E20.XviD-AFG.avi" to="X:\Media\TV\American Dad!\Season 12\American Dad! - S12E09 - My Affair Lady.avi"/>
    </sequence>
    <sequence date="2016-06-13T20:58:36.519-07:00">
        <rename dir="X:\Downloads\American.Dad.S12E19.HDTV.x264-KILLERS\american.dad.s12e19.hdtv.x264-killers\American.Dad.S12E19.HDTV.x264-KILLERS" from="American.Dad.S12E19.HDTV.x264-KILLERS.mkv" to="X:\Media\TV\American Dad!\Season 5\American Dad! - S05E19 - Daddy Queerest.mkv"/>
    </sequence>
    <sequence date="2016-06-13T21:04:02.825-07:00">
        <rename dir="X:\Downloads\American.Dad.S13E17.720p.HDTV.x264-FLEET\american.dad.s13e17.720p.hdtv.x264-fleet\American.Dad.S13E17.720p.HDTV.x264-FLEET" from="American.Dad.S13E17.720p.HDTV.x264-FLEET.mkv" to="X:\Media\TV\American Dad!\Season 13\American Dad! - S13E17 - Criss-Cross Applesauce The Ballad of Billy Jesusworth.mkv"/>
    </sequence>
    <sequence date="2016-06-13T21:05:16.491-07:00">
        <rename dir="X:\Downloads\American.Dad.S12E16.XviD-AFG" from="American.Dad.S12E16.XviD-AFG.avi" to="X:\Media\TV\American Dad!\Season 5\American Dad! - S05E16 - Delorean Story-An.avi"/>
    </sequence>
    <sequence date="2016-06-13T21:06:22.452-07:00">
        <rename dir="X:\Downloads\American.Dad.S12E15.XviD-AFG" from="American.Dad.S12E15.XviD-AFG.avi" to="X:\Media\TV\American Dad!\Season 12\American Dad! - S12E15 - Seizures Suit Stanny.avi"/>
    </sequence>
    <sequence date="2016-06-13T21:07:55.615-07:00">
        <rename dir="X:\Downloads\American.Dad.S12E18.720p.HDTV.x264-AVS\american.dad.s12e18.720p.hdtv.x264-avs\American.Dad.S12E18.720p.HDTV.x264-AVS" from="American.Dad.S12E18.720p.HDTV.x264-AVS.mkv" to="X:\Media\TV\American Dad!\Season 8\American Dad! - S08E18 - Toy Whorey.mkv"/>
    </sequence>
</history>
I've looked at MyEpisodes.com and it says they're on season 12x20, but Wiki says they're on season 13?
User avatar
rednoah
The Source
Posts: 22985
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC Renaming of American Dad! seemingly completely rando

Post by rednoah »

American Dad! is known to have inconistent and messed up SxE numbers:
http://thetvdb.com/?tab=seasonall&id=73141&lid=7

e.g. S12E20 does not exist, therefore (due to -non-strict mode) FileBot will pick the "next best" option.


Depending on your setup, you might want to consider using an age filter. See Advanced Fine-Tuning for that.


This thread might be somewhat related: viewtopic.php?f=4&t=3863
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: AMC Renaming of American Dad! seemingly completely rando

Post by kim »

or you can try running this script BEFORE amc:

Code: Select all

// +1 Season
def offset = [season: +1, episode: 0]

def p = '(\\d{1,2})(\\D)(\\d{2})'
def r = { m, s, x, e -> ((s as int) + offset.season).pad(2) + x + ((e as int) + offset.episode).pad(2) }

rename(map: args.getFiles()
	.findAll{ it.name =~ '(?i:American.Dad)' }
		.each{println "FOUND: $it.name"}.findAll{ parseEpisodeNumber(it) != null }	
			.collectEntries{
				[it, it.name.replaceFirst(p, r)]
			}
)
User avatar
rednoah
The Source
Posts: 22985
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC Renaming of American Dad! seemingly completely rando

Post by rednoah »

But doesn't this just add +1 to the season number? I think the episode numbers are off as well now.

My understanding is, that American Dad SxE numbers are completely screwed up in "non-deterministic" ways:

Code: Select all

American.Dad.S12E20.XviD-AFG.avi => American Dad - 13x18 - Mine Struggle
:idea: Please read the FAQ and How to Request Help.
Post Reply