Is there way to identify Double episodes?

Any questions? Need some help?
Post Reply
DevXen
Power User
Posts: 164
Joined: 12 Oct 2014, 21:15

Is there way to identify Double episodes?

Post 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
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Is there way to identify Double episodes?

Post by rednoah »

Replacing

Code: Select all

model.episode
with

Code: Select all

model.episodes.flatten()
should do the trick.
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Is there way to identify Double episodes?

Post 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'};
}
DevXen
Power User
Posts: 164
Joined: 12 Oct 2014, 21:15

Re: Is there way to identify Double episodes?

Post 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.
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Is there way to identify Double episodes?

Post 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.
:idea: Please read the FAQ and How to Request Help.
DevXen
Power User
Posts: 164
Joined: 12 Oct 2014, 21:15

Re: Is there way to identify Double episodes?

Post 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!
Post Reply