INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: List Unwatched Episodes for Series Where Any Episode Was Watched Recently  (Read 1721 times)

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608

Okay, here's another bit of expression fun I've been mulling over for some time.

I'd like to make a search that returns all of the episodes of any [Series] where we've watched some episode of said series sometime in the last, say, 2 months.  I'd then filter out any episodes we've already watched (ideally using the Watched(1)=2 mode, but that doesn't work right, so I'm probably going to have to craft my own method to generate the same result).

That way, I could have an "Active Shows" view in Theater View, which would list only waiting-to-be-watched episodes of shows that we're "actively watching".  Even though I archive out (or delete) shows after we've watched them and we've finished a particular season, we often have a large pile of shows that the PVR is recording but which we haven't started yet (it is a rare show that we watch as they air, or even within the same week or so).  So, my regular All Series view is filled with a bunch of stuff we're not likely to choose in those situations.

This view would be super convenient, and I hope there is a way.  I just don't know how to pull all of the episodes of a particular show if any one of them has been watched in the given timeframe.  It would be similar in practice to pulling all tracks from an Album where any one track in the album had been listened to in X weeks, or was Rated above X, or whatever.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.

I can think the way to do this would be to use series-specific global var, collecting in a semi-colon delimited list the names of the episodes that have not been watched.   Likewise, also collect a mathematical OR of the episodes Watched status, which will yield a 0 or 1 value: if there is any watched, the result will be 1.  You can of course bias the simple Watched status of each by considering recentness.

When there is a 1 value, output the list of episodes.
Logged
The opinions I express represent my own folly.

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608

Can you give me an example?  It sounds... Challenging.

I was thinking last night about how handy this kind of filtering would be in many cases.  It would be really nice if we had an expression of some kind that could do this... Something like:

FilterFields(expression, field-to-match)

That's probably a poor expression name, but my idea was for some kind of function where you could solve these kinds of problems (lookups that find not just the matching file, but others in their class).  You could use this to do all sorts of neat stuff.  It would also be cool if we had a function that could aggregate fields based on a particular tag.  I'm thinking some way to do something like:

Show All Albums that contain > 3 tracks where [Rating] > 3.

What do you think?  Can we come up with some kind of flexible expression syntax that would allow us to do Linq-like database lookups like this?
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978

MrC is AWOL.  :P
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.

MrC is AWOL.  :P

I had a note.

I'll take a look at this again tomorrow.  My brain is soggy tonight after catching up...
Logged
The opinions I express represent my own folly.

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608

Nice.  ;)

My brain is just soggy.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978

I thought only bums got soggy.

Learn something new every day  ::).
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608

I thought only bums got soggy.

You didn't realize this because.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.

I have part of your (Standard) view done.  But I'm not understanding something which I'm trying to use to put this together.

Currently I have for each series:

  - total number of episodes
  - # of watched episodes
  - list of unwatched episodes
  - a Boolean indicating if the series has any watched within the past 60 days

So now we have a list of all series / names that have any watched with the past 60 days.
Logged
The opinions I express represent my own folly.

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.

Let me know if you want the pieces now and I'll post them.  I'm thinking it might be best this way so that we can season to taste.
Logged
The opinions I express represent my own folly.
Pages: [1]   Go Up