Page 1 of 1

Modifying Missing Episode Script to return airing dates

Posted: 05 Feb 2023, 02:12
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!

Re: Modifying Missing Episode Script to return airing dates

Posted: 05 Feb 2023, 03:56
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.

Re: Modifying Missing Episode Script to return airing dates

Posted: 05 Feb 2023, 07:46
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?

Re: Modifying Missing Episode Script to return airing dates

Posted: 05 Feb 2023, 08:42
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

Re: Modifying Missing Episode Script to return airing dates

Posted: 05 Feb 2023, 10:59
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

Re: Modifying Missing Episode Script to return airing dates

Posted: 06 Feb 2023, 05:36
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