Page 1 of 1

Is there way to identify Double episodes?

Posted: 01 Oct 2018, 01:15
by DevXen
While i'm here I have another question of something that I haven't been able to figure out. I have the following code:

Code: Select all

{model.episode.containsAll(episodelist.findAll{it.season == s && it.episode && it.title}) ? 'H:/Live Action/[Naming]/[Finished]/'+(csv('C:/FileBot Settings/TV/TVGenreFolderBasedOnSeriesName.csv').get(n) ?: genre)+'/' : 'H:/Live Action/[Naming]/[Current Seasons]/'+(csv('C:/FileBot Settings/TV/TVGenreFolderBasedOnSeriesName.csv').get(n) ?: genre)+'/' + '/'}
Which Separates Full seasons vs. incomplete seasons. however when a season has a double episode.. like S01E01-02. it marks the whole season as Incomplete. though it does name it correctly as both episodes. is there a way to detect that and move those to the Complete seasons folder? (Finished folder in the code)

Thanks,
-Dev

Re: Is there way to identify Double episodes?

Posted: 01 Oct 2018, 05:20
by rednoah
Replacing

Code: Select all

model.episode
with

Code: Select all

model.episodes.flatten()
should do the trick.

Re: Is there way to identify Double episodes?

Posted: 01 Oct 2018, 22:51
by kim
I was playing around.... maybe you can use:

Code: Select all

{
def avg = model.runtime.sum()/model.runtime.size();
def lowOffset = avg-5;
def highOffset = avg+5;
def lowOffsetDouble = (avg-5)*2;
def highOffsetDouble = (avg+5)*2;
model.minutes.collect{i ->  (i > lowOffset && i < highOffset) ? 'Single Episode' : (i > lowOffsetDouble && i < highOffsetDouble) ? 'Double Episode' : 'Unknown'};
}

Re: Is there way to identify Double episodes?

Posted: 05 Oct 2018, 17:48
by DevXen
rednoah wrote: 01 Oct 2018, 05:20 Replacing

Code: Select all

model.episode
with

Code: Select all

model.episodes.flatten()
should do the trick.
Hey,

Sorry I've been pretty busy at work. But I've been trying to get this working. and trying several different things. and it just disables the whole Finished/Unfinished check all together.

Re: Is there way to identify Double episodes?

Posted: 06 Oct 2018, 01:24
by rednoah
What values do you get for these expressions respectively?

Code: Select all

model.episode

Code: Select all

model.episodes.flatten()
You can click on the value in the format editor to copy & paste the value. I recommend testing with a short series such as Firefly.

Re: Is there way to identify Double episodes?

Posted: 06 Oct 2018, 04:53
by DevXen
Oops. it was my bad. I had model.episode.flatten() not model.episdoes.flatten() .. my bad for not copy/pasting. pesky S.

Thank you again for your help!