Not another American Dad thread [Possible Solution]

All your suggestions, requests and ideas for future development
Post Reply
phibins
Posts: 22
Joined: 28 Mar 2018, 02:49

Not another American Dad thread [Possible Solution]

Post by phibins »

I don't know if this is the right place to post this....

But as we all know that American Dad is one of the bains of our renaming existence. :evil:

In plex even having the correct name yields incorrect matches to the online DBs. Yes we know. :x

But I found a solution that needs can be corrected by fixing a bug in filebot.

When renaming the show, it always creates a folder "American Dad"...

Simply adding the exclamation mark to the folder name fixed all the recognition problems in plex (and hopefully other programs that search the same tv DBs).

Simply change the DIRECTORY name from "American Dad" to "American Dad!" and all is good in the world.

HOW DO I SET A FILTER TO DO THIS???
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Not another American Dad thread [Possible Solution]

Post by rednoah »

Does Windows allow ! or ? and the end of a folder name? It's stripped for compatibility reasons.

Please use a custom format if you want to keep the ! at the end of the folder name:

Code: Select all

plex.path.replace('American Dad', 'American Dad!')
:idea: Please read the FAQ and How to Request Help.
ZeroByDivide
Posts: 170
Joined: 16 Dec 2014, 01:39

Re: Not another American Dad thread [Possible Solution]

Post by ZeroByDivide »

I hate to say it but the solution isn't as simple as adding a "!" at the end of "American Dad" as I have it setup to be "American Dad!" and if I don't apply my own filter to only support the episode of the week, it will end up incorrect on the rename 100% of the time. I have a feeling what is happening on your end is that when you are downloading American Dad episodes that you are picking the ones that have the corrected Season and Episode for the week, as some people have been releasing episodes of american dad that way, while the scene is releasing it the usual way that they have been.

This is currently how my filter is setup if you want to steal it. (this will only work if you are using the python wrapper)

Code: Select all

import re

if re.match(r"American.Dad.*|AmericanDad.*", title):
  FILTERPATH = 'age < 3'
elif label == "sonarr":
  FILTERPATH = 'any{ age < 35 }{ airdate ? true : false }'
else:
  FILTERPATH = 'any{ age < 80000 }{ airdate ? true : false }'
As for plex, I've never had an issue with it messing up on American Dad as long as the Season and Episode was set correctly even if the folder was missing the "!".
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Not another American Dad thread [Possible Solution]

Post by kim »

first of

Code: Select all

{plex.tail}
output e.g.
American Dad/Season 15/American Dad! - S15E06 - Klaustastrophe.tv

Code: Select all

{n} - {s00e00} - {t}
output e.g.
American Dad! - S15E06 - Klaustastrophe.tv
Does Windows allow ! or ? and the end of a folder name?
yes to !
no to ? AND

Code: Select all

\ / :  * " < > |
same with filenames

for the most part on newer episodes, you can do this...
rename filename with this script BEFORE e.g. running amc script

Code: Select all

def offset = [season: +1, episode: -1]

def sxeBefore = '(\\d{1,2})(\\D)(\\d{2})'
def sxeAfter = { 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|Other.Sh0w)' }
		.each{log.info "FOUND: $it.name"}
			.findAll{ parseEpisodeNumber(it) != null }
				.collectEntries{
					[it, it.name.replaceFirst(sxeBefore, sxeAfter)]
				}
)

renaming the entire series... I think ONLY some kind of internal/local list or DB will do the trick ?
Post Reply