Page 1 of 1

The Good Place not The Good Wife

Posted: 20 Oct 2017, 10:02
by plittlefield
Ooops, this has been fine but running it just now gets the incorrect show...

Code: Select all

Run script [fn:amc] at [Fri Oct 20 09:08:15 BST 2017]
Parameter: minFileSize = 0
Parameter: seriesFormat = TV/{n}/{n} {s00e00}
Parameter: movieFormat = Movies/{n} ({y})
Parameter: clean = y
Parameter: ut_dir = /home/paully/Downloads/seedbox2/data/The.Good.Place.S02E06.720p.HDTV.x264-AVS[rarbg]
Parameter: ut_kind = multi
Parameter: ut_title = The.Good.Place.S02E06.720p.HDTV.x264-AVS[rarbg]
Input: /home/paully/Downloads/seedbox2/data/The.Good.Place.S02E06.720p.HDTV.x264-AVS[rarbg]/The.Good.Place.S02E06.720p.HDTV.x264-AVS.mkv
Group: [tvs:the good place] => [The.Good.Place.S02E06.720p.HDTV.x264-AVS.mkv]
Rename episodes using [TheTVDB]
Auto-detected query: [The Good Place]
Fetching episode data for [The Good Place]
Fetching episode data for [The Good Wife]
Fetching episode data for [The Good Guys]
Fetching episode data for [The Good Guys (2010)]
Fetching episode data for [The Good Wife (KR)]
[COPY] From [/home/paully/Downloads/seedbox2/data/The.Good.Place.S02E06.720p.HDTV.x264-AVS[rarbg]/The.Good.Place.S02E06.720p.HDTV.x264-AVS.mkv] to [/home/paully/Plex/TV/The Good Wife/The Good Wife S02E06.mkv]
Processed 1 files
Done ヾ(@⌒ー⌒@)ノ

Re: The Good Place not The Good Wife

Posted: 20 Oct 2017, 11:02
by rednoah
Does TheTVDB already contain all the correct information?

If the correct data hasn't been entered yet, then FileBot will settle on the next best incorrect match.

Re: The Good Place not The Good Wife

Posted: 20 Oct 2017, 11:30
by plittlefield
Yes, it does...

https://www.thetvdb.com/?tab=episode&se ... 1749&lid=7

...however, bizarrely, the date for 'First Aired' is next Thursday 26 October 2017!

TV Maze also shows it as next Thursday...

http://www.tvmaze.com/episodes/1215817/ ... nd-michael

I have watched "my file" yet so cannot say whether it's genuine or not.

Perhaps that is why FileBot had a problem with it..??? The date in the future??

:-)

Re: The Good Place not The Good Wife

Posted: 20 Oct 2017, 14:41
by rednoah
There a good chance that episode has been added very recently, so FileBot might not see the new data yet due to caching.

However, FileBot does take the airdate into account as well, so an episode that hasn't aired yet might make less sense to FileBot compared to an episode aired yesterday evening.

Let's see if it works out of the box by next week. :lol:

Re: The Good Place not The Good Wife

Posted: 20 Oct 2017, 14:59
by plittlefield
rednoah wrote: 20 Oct 2017, 14:41Let's see if it works out of the box by next week. :lol:
Noted and yes, I think it's a quirk. I'll try and remember to let you know :P

Re: The Good Place not The Good Wife

Posted: 20 Oct 2017, 18:53
by kim
I just tested it and it works, no problem here

What version of Filebot do you use or it could be something in the path ?
Match Series Name => [The Good Place, The Good Place] [The Good Place]
Query Series => [The Good Place]
Group: [tvs:the good place] => [The.Good.Place.S02E06.720p.HDTV.x264-AVS.mkv]
Rename episodes using [TheTVDB]
Match Series Name => [The Good Place, The Good Place] [The Good Place]
Query Series => [The Good Place]
Match Series Name => [The Good Place, The Good Place] [The Good Place]
Query Series => [The Good Place]
Auto-detected query: [The Good Place]
Fetch resource: https://api.thetvdb.com/search/series?n ... Good+Place
Rank [The Good Place] => [The Good Place, The Good Wife, The Good Guys, The Good Guys (2010), Good Witch, The Good Fight, The Good Wife (KR), The Goodies, The Golden Girls, The Great Food Race]
Rank [The Good Place] => [The Good Place]
Fetching episode data for [The Good Place]

Re: The Good Place not The Good Wife

Posted: 20 Oct 2017, 19:03
by kim

Re: The Good Place not The Good Wife

Posted: 20 Oct 2017, 22:19
by kim
To help you auto rename BEFORE you do the normal rename/scraping/getting artwork, when the source files is always +1 on episode in season 2 of "The Good Place"

Save this as e.g. "PreRename.groovy" and run like so:
"filebot -script PreRename.groovy input.files.here"

Code: Select all

// -1 Episode (if season = 2 and episode higher then 1)
offset = [season: 0, episode: -1]
sxeBefore = '(\\d{1,2})(\\D)(\\d{2})'
sxeAfter = { m, s, x, e -> (s as int == 2 && (e as int) > 1) ? ((s as int) + offset.season).pad(2) + x + ((e as int) + offset.episode).pad(2) : m}

rename(
	map: args.getFiles()
	.findAll{ it.name =~ '(?i:The.Good.Place)' }
		.each{log.info "FOUND: $it.name"}
			.findAll{ parseEpisodeNumber(it) != null}
				.collectEntries{
					[it, (it.name.replaceFirst(sxeBefore, sxeAfter))]
				}
)