e.g. match-by-title and format-by-mapping where each individual episode is mapped to a combined multi episode group per airdate:
NOTE: {episodelist} requires FileBot 5.1.0 or higher
Groovy: Select all
episode
.number(null)
.map(episodelist.findAll{ airdate == it.airdate }.episode)
.reverse()
e.g. ChalkZone
Console Output: Select all
$ filebot -rename *.mkv --db TheTVDB -non-strict --format "{plex.name}" --mapper "episode.number(null).map(episodelist.findAll{ airdate == it.airdate }.episode).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]
If the series at hand has episodes without airdate (i.e. missing or incomplete episode information) or special episodes aired on the same date as regular episodes then you may need to further refine your --mapper expression like so for the best results:
Groovy: Select all
any{
if (regular) {
episode.number(null)
.map(episodelist.findAll{ airdate == it.airdate && !it.special }.episode)
.reverse()
}
}{
episode.number(null)
}