Page 1 of 1

Use {episodelist} binding to count episodes per season and check if a season is complete via the {model} binding

Posted: 02 Sep 2023, 00:55
by jerome
Recently updated to

Code: Select all

FileBot 5.1.0 (r9972)
JNA Native: 6.1.4
MediaInfo: 23.07
7-Zip-JBinding: 16.02
Tools: fpcalc/1.5.0
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2023-09-01 (r931)
Groovy: 4.0.14
JRE: OpenJDK Runtime Environment 17.0.8
JVM: OpenJDK 64-Bit Server VM
System Property: net.filebot.theme=Metal
CPU/MEM: 12 Core / 4.8 GB Max Memory / 1.3 GB Used Memory
OS: Windows 10 (amd64)
STORAGE: NTFS [(C:)] @ 129 GB
DATA: C:\Users\User\AppData\Roaming\FileBot
Package: MSI
License: FileBot License PXXXXXXXXXX (Valid-Until: 2024-02-05)
I know that episode was impacted in this update but not sure how that impacts the code I use for episode count.

The following whether true or false evaluates to 00 in every instance now using either TVDB or TMDB:TV.

Code: Select all

{model.episode.containsAll(episodelist.findAll{it.season == s}) ? [episodelist.count{it.episode && it.season == s}.pad(2)] : [episodelist.count{it.episode && it.season == s}.pad(2)+'i']}
Any help on how to fix would be apreciated.

Thanks
J

Re: Episode Count

Posted: 02 Sep 2023, 09:39
by rednoah
The changes is primarily that {episodelist} now works exactly the same as {model}.


e.g. Number of episodes for the season at hand:

Format: Select all

{
	' [' + episodelist.count{ it.e && it.s == s }.pad(2) + ' episodes]'
}
e.g. Check if all episodes from the season at hand are currently loaded into FileBot:

Format: Select all

{
	model.episode.containsAll(episodelist.findAll{ it.e && it.s == s }.episode) ? ' [complete]' : ' [incomplete]'
}

Re: Use {episodelist} binding to count episodes per season and check if a season is complete via the {model} binding

Posted: 14 Dec 2023, 18:45
by SnakeBonD
It works well with normal episodes, but when there are double episodes it returns me an incomplete season because the number of files is not good.
Image
Is there a solution for this?

Re: Use {episodelist} binding to count episodes per season and check if a season is complete via the {model} binding

Posted: 14 Dec 2023, 19:21
by rednoah
Try this:

Format: Select all

{
	model.episodes.flatten().containsAll(episodelist.findAll{ it.e && it.s == s }.episode) ? ' [complete]' : ' [incomplete]'
}

Re: Use {episodelist} binding to count episodes per season and check if a season is complete via the {model} binding

Posted: 14 Dec 2023, 20:04
by SnakeBonD
Perfect !
Thank you, this work well !

Re: Use {episodelist} binding to count episodes per season and check if a season is complete via the {model} binding

Posted: 22 Oct 2024, 07:33
by rednoah