Match multi-episode out-of-order cartoon episodes by title

Running FileBot from the console, Groovy / FileBot scripting, shell scripts, etc
Post Reply
User avatar
rednoah
The Source
Posts: 20143
Joined: 16 Nov 2011, 08:59

Match multi-episode out-of-order cartoon episodes by title

Post by rednoah »

(requires FileBot r8618) Cartoons are often aired out-of-order and in groups comprised of 3-4 individual episodes per airdate. Typically, this does not match the episode numbering and grouping on TheTVDB or TheMovieDB at all, making it nigh impossible to reliably match files to episode information. However, in some cases, a smart --mapper expression will do the trick.


e.g. match-by-title and format-by-mapping where each individual episode is mapped to a combined multi episode group per airdate:

Code: Select all

episode
.number(null)
.map(episodelist.findAll{ airdate == it.airdate })
.reverse()

e.g. ChalkZone

Code: Select all

$ filebot -rename *.mkv --db TheTVDB -non-strict --format "{plex.name}" --mapper "episode.number(null).map(episodelist.findAll{ airdate == it.airdate }).reverse()"
[MOVE] from [ChalkZone.S01E01.Rudys.First.Adventure.Rudys.Story.Bushel.Full.of.Yum.mkv] to [ChalkZone - S01E01-E03 - Rudy's First Adventure & Rudy's Story & Bushel Full of Yum.mkv]
[MOVE] from [ChalkZone.S01E02.SnapMobile.Rudys.First.Date.Future.Zone.mkv] to [ChalkZone - S01E04-E07 - SnapMobile & Rudy's First Date & Future Zone & Mumbo Jumbo Jump.mkv]
[MOVE] from [ChalkZone.S01E03.The.Wiggies.Rapunzel.Hair.To.Stay.Coming.To.Life.mkv] to [ChalkZone - S01E19-E22 - The Wiggies & Rapunzel & Hair To Stay & Coming To Life.mkv]
:idea: Please read the FAQ and How to Request Help.
Post Reply