Modifying Missing Episode Script to return airing dates

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
CybeleAttis
Posts: 8
Joined: 05 Feb 2023, 01:46

Modifying Missing Episode Script to return airing dates

Post by CybeleAttis »

Hi,

I was wondering if there would be a way to modify the missing episode script included with filebot to return the airing date of the episode when it provides the list, or a null value when the date isn't listed yet.

I had a look at the script code on github, but I haven't used groovy much, so I'm not sure where to start in modifying it. In particular, my first hurdle is that the code seems to my amateur eyes to just export a list of the unmatched episodes from comparison set, so it feels like I would have to add a second step of pulling the dates after determining the episode is missing and returning that as part of the output.

Any help is very appreciated!
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Modifying Missing Episode Script to return airing dates

Post by rednoah »

Good idea! We can add support for the --format option in the miss.groovy script:
https://github.com/filebot/scripts/comm ... 48f9f07887

e.g.

Code: Select all

filebot -script dev:miss --format "{d} | {episode}"
(NOTE: -script dev:miss refers to the latest script revision from GitHub)


:idea: FileBot r9612 is required though since we had to add new internal APIs.
:idea: Please read the FAQ and How to Request Help.
CybeleAttis
Posts: 8
Joined: 05 Feb 2023, 01:46

Re: Modifying Missing Episode Script to return airing dates

Post by CybeleAttis »

Thank you for responding so quickly!

When I try to run the code above in powershell, I get the following error.

Code: Select all

No signature of method: net.filebot.format.ExpressionFormat.apply() is applicable for argument types: (net.filebot.web.Episode) values: [Futurama - 8x01 - The Impossible Stream]
Possible solutions: any(), any(groovy.lang.Closure), every(), every(groovy.lang.Closure), tap(groovy.lang.Closure), split(groovy.lang.Closure) [Futurama - 8x01 - The Impossible Stream]
Can you help me fix this?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Modifying Missing Episode Script to return airing dates

Post by rednoah »

rednoah wrote: 05 Feb 2023, 03:56 :idea: FileBot r9612 is required though since we had to add new internal APIs.
i.e. latest build from yesterday: viewtopic.php?t=1609
:idea: Please read the FAQ and How to Request Help.
CybeleAttis
Posts: 8
Joined: 05 Feb 2023, 01:46

Re: Modifying Missing Episode Script to return airing dates

Post by CybeleAttis »

I'll just cop to having missed that line and assuming it was part of your signature :oops:

Thank you very much, working great now :D
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Modifying Missing Episode Script to return airing dates

Post by rednoah »

CybeleAttis wrote: 05 Feb 2023, 10:59 I'll just cop to having missed that line and assuming it was part of your signature :oops:
No worries. It happens. That's actually a reasonable reason. I'll make sure to add a color highlight next time. :D
:idea: Please read the FAQ and How to Request Help.
Post Reply