[DOCS] Holistic formats with the {episodelist} binding
Posted: 29 Jun 2024, 05:26
The {episodelist} binding allows you to access the complete list of episodes for the series at hand.
e.g. highest episode number:
e.g. series years from the airdate of the first episode to the airdate of the last episode:
e.g. primaryTitle (i.e. AniDB x-jat series name for Anime; different seasons may have different AniDB series names) of the first episode / first season:
e.g. use {episodelist} to mark the final episode in each season:
e.g. use {episodelist} and {model} to mark the series folder as complete if all known episodes of a given show are being processed in the current batch:
e.g. use {episodelist} to infer Part 1 of 2 numbers for multi-part episodes:
e.g. highest episode number:
Format: Select all
{ episodelist.absolute.max() }
e.g. series years from the airdate of the first episode to the airdate of the last episode:
Format: Select all
{ episodelist.airdate.year.bounds().join('-') }
e.g. primaryTitle (i.e. AniDB x-jat series name for Anime; different seasons may have different AniDB series names) of the first episode / first season:
Format: Select all
{ episodelist[0].primaryTitle }
e.g. use {episodelist} to mark the final episode in each season:
Format: Select all
{ plex % { episode == episodelist.findAll{ s == it.s }.episode.last() ? ' [END OF SEASON]' : null } }
e.g. use {episodelist} and {model} to mark the series folder as complete if all known episodes of a given show are being processed in the current batch:
Format: Select all
{ plex * { model.episode.containsAll(episodelist.episode) ? ' [complete]' : ' [incomplete]' } }
e.g. use {episodelist} to infer Part 1 of 2 numbers for multi-part episodes:
Format: Select all
{
def parts = episodelist.findAll{ t.replacePart() == it.t.replacePart() }
t.replacePart(" (Part ${1} of ${parts.size()})")
}