Return the last episode airdate of all Episodes for a tv show

Support for Windows users
Post Reply
HellPhantom
Posts: 49
Joined: 15 Apr 2020, 10:45

Return the last episode airdate of all Episodes for a tv show

Post by HellPhantom »

Hi I have this statement that I have been using for some time that no longer returns the correct or expected value.

The statement is supposed to add (first Airdate - Last Episode Airdate) to my series name.

The statement used to return this output when a series ended.

Code: Select all

Legacies (2018-2022){tvdb-349309}
and this output when it was still open or running

Code: Select all

Legacies (2018-...){tvdb-349309}
But since one of the updates it started returning a null when a series has ended and no longer the end airdate.

Code: Select all

Black Narcissus (2020-null){tvdb-382164}
This is the bit of my statement that does the dates that no longer works correctly. This bit should work standalone on any episode and produce the null result if series has ended like "Black Narcissus"

Code: Select all

({y}{info.status == "Ended" ? "-${episodelist.findAll{it.season}.airdate.year.max()}" : '-...'})
It has been a while since I changed any code and I cant spot what might have changed or what is wrong. I would really appreciate some help.

Thanks rednoah

Extra info:

Code: Select all

FileBot 5.1.1 (r9982)
JNA Native: 6.1.4
MediaInfo: 23.07
7-Zip-JBinding: 16.02
Tools: fpcalc/1.5.0 mkvpropedit/78.0
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2023-09-10 (r939)
Groovy: 4.0.14
JRE: OpenJDK Runtime Environment 17.0.8
JVM: OpenJDK 64-Bit Server VM
FILEBOT_OPTS: -DuseExtendedFileAttributes=true -Dsun.java2d.uiScale=0.75
System Property: net.filebot.theme=Darcula
System Property: useExtendedFileAttributes=true
CPU/MEM: 12 Core / 8 GB Max Memory / 717 MB Used Memory
OS: Windows 10 (amd64)
STORAGE: NTFS [Spanned 3GB] @ 712 GB | NTFS [Boot Drive] @ 135 GB | NTFS [Data Drive] @ 341 GB | NTFS [Multimedia Movies] @ 41 GB | NTFS [Multimedia TV Shows] @ 14 GB | NTFS [Multimedia TV Shows 2b] @ 64 GB | NTFS [Multimedia Movies 2] @ 262 GB | NTFS [Multimedia TV Shows 3] @ 26 GB
DATA: C:\Users\xx\AppData\Roaming\FileBot
Package: MSI
License: FileBot License PX6380144 (Valid-Until: 2068-12-03)
User avatar
rednoah
The Source
Posts: 23002
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Return the last episode airdate of all Episodes for a tv show

Post by rednoah »

{episodelist} has changed a little bit to make it inline with {model} and so it should work like this nowadays:

Format: Select all

{ episodelist.findAll{ it.s }.y.bounds() }
:idea: Please read the FAQ and How to Request Help.
HellPhantom
Posts: 49
Joined: 15 Apr 2020, 10:45

Re: Return the last episode airdate of all Episodes for a tv show

Post by HellPhantom »

Thanks for the assist.

I managed to adjust my code and it works fine again.
Post Reply