Determine if Series/Show Has Ended

All about user-defined episode / movie / file name format expressions
Post Reply
bassmadrigal
Posts: 10
Joined: 04 Jun 2015, 13:13

Determine if Series/Show Has Ended

Post by bassmadrigal »

Ok, pertinent information first.

System: Linux - Slackware64 14.1
Java: OpenJDK 7u79 (Iced Tea 2.5.5)
Filebot: 4.2 (Iced Tea doesn't have a build based on JDK8 yet)
Installed: downloaded pre-built binary since I could not find compile instructions
Use: GUI use only... I like to look everything over before it's renamed.

I currently sort my TV series onto two different drives. One is mounted to /share/TV/ongoing, and the other is /share/TV/completed. These are obviously for shows still airing vs cancelled/ended by the network. Currently, I have two identical rules (except for the locations) rules that I just switch between when I'm dealing with one show or another, but with all the configuration options I've seen, I'm thinking there's likely an ability to determine if the show has ended. I've seen expressions that determine if the season is complete, but I haven't seen any if the show itself is complete (I know the information is available on thetvdb.com, because I usually reference that if I am unsure whether a show will get new episodes).

Here is my current expression:

Code: Select all

/share/TV/ongoing/og-sorted/{n.replaceAll(/[:|]/, "- ")}/{n.replaceAll(/[:|]/, "- ")} - {S00E00} - {t.replaceAll(/[!?.]+$/).replaceAll(/[`´‘’ʻ]/, "'").replaceAll(/[:|]/, "- ")}
If a show is still airing, I'd like it in /share/TV/ongoing/og-sorted, but if it has ended, I'd like it in /share/TV/completed/cm-sorted. I've tried doing a lot of digging to find this out, but I've come up empty. In fact, I am amazed at what people are able to come up with, because I haven't found a good chunk of it documented anywhere (like whoever had posted the code for determining if a season is completed or not -- how did they figure that out? I couldn't find it documented anywhere else).

Thanks for all your work on this. It's been a lifesaver since it works on Linux and it is much better at determining the correct season/episode than therenamer.
User avatar
rednoah
The Source
Posts: 23004
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Determine if Series/Show Has Ended

Post by rednoah »

Image

The solution should be self-evident from the in-app help:

Code: Select all

{info.status == 'Ended' ? 'completed' : 'ongoing'}
You own me a donation my friend. :lol:

(unless it's non-obvious to you, then you shall be forgiven :P)
:idea: Please read the FAQ and How to Request Help.
bassmadrigal
Posts: 10
Joined: 04 Jun 2015, 13:13

Re: Determine if Series/Show Has Ended

Post by bassmadrigal »

Dang it! I found that section for movies and was able to successfully name my movies the way I wanted probably 8 months ago. I have no idea why I didn't think to check it for TV shows... Although, in my defense, I haven't seen any documentation that show that box other than a single screenshot in the screenshot gallery (most probably, I missed it, but maybe not). Most of my expressions have been trial and error and when I come up against something, doing google searches to find others' examples.

One final question, is the "Use bindings" button supposed to do something? Because I would've thought it would throw down an example usage under the expression section, but clicking the button seems to have the same effect as pressing cancel (in that it does nothing).

And a donation is incoming :)
User avatar
rednoah
The Source
Posts: 23004
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Determine if Series/Show Has Ended

Post by rednoah »

Bindings Dialog => set test file, preview metadata/file bindings, preview mediainfo, etc

"Use Bindings" means that you can select example bindings for testing in the format dialog. For example to test file binding (fn, crc32, etc) you need to select a file. If that file is tagged with filebot metadata then that'll be used as metadata binding (n, sxe, t, etc) as well.
:idea: Please read the FAQ and How to Request Help.
bassmadrigal
Posts: 10
Joined: 04 Jun 2015, 13:13

Re: Determine if Series/Show Has Ended

Post by bassmadrigal »

That makes sense. Thanks again!
Post Reply