INTERACT FORUM

Please login or register.

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

Author Topic: Jump to first unwatched episode - TV Shows  (Read 4913 times)

steelman1991

  • World Citizen
  • ***
  • Posts: 126
Jump to first unwatched episode - TV Shows
« on: April 14, 2015, 04:08:42 am »

Recently introduced in Kodi and a long time Emby feature. Is there anyway to add similar functionality to JRiver. Basically when entering a TV Show the user is taken directly to the first unwatched episode in that show.

Can this be achieved by the user, or would it require additional hard coding by the team?
Logged

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Re: Jump to first unwatched episode - TV Shows
« Reply #1 on: April 14, 2015, 05:18:50 am »

1.  Go to Tools → Options → Library & Folders → Manage Library Fields
2.  Add a new field and give it a name.
3.  Set this field to use Calculated Data and paste the following code:

Code: [Select]
If(Compare(Math([Bookmark] / [Duration, 0] / 10), <, 10),
If(Compare([Number Plays], <, 1), 0101, Math([Number Plays] * 1000)),
If(IsRange(Math([Bookmark] / [Duration, 0] / 10), 10-87), PadNumber(Math(Round([Bookmark] / [Duration, 0] / 10)), 4), Math([Number Plays] * 1000))) PadNumber([Season], 2) PadNumber(If(!IsEmpty([Track #]), [Track #], [Episode]),3)

4.  Customize your view to sort by this field.


As it is configured, anything watched less than 10% is considered to be "unplayed".
And anything watched more than 87% is considered to be "finished" and will go to the end of the list.

This is set with the If(Compare(Math([Bookmark] / [Duration, 0] / 10), <, 10), in the first line and
If(IsRange(Math([Bookmark] / [Duration, 0] / 10), 10-87), in the last line.
You should use the same value in both for the lower-limit.


I do make a couple of assumptions with that expression so that it should work continuously (it should just loop around once you finish watching a series) so let me know if you have any problems.
Logged

steelman1991

  • World Citizen
  • ***
  • Posts: 126
Re: Jump to first unwatched episode - TV Shows
« Reply #2 on: April 14, 2015, 10:27:34 am »

Thanks for the quick and detailed response. Maybe I'm not following your instruction properly, as I can't get JRiver to react in the expected way.

Having set up 'sort' in panel view, it certainly takes the expression and applies it, moving the watched episodes to the end, leaving the unwatched episodes at the top of the list. However I was looking for this functionality to be available in Theatre View. Can this be achieved with this expression?
Logged

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Re: Jump to first unwatched episode - TV Shows
« Reply #3 on: April 14, 2015, 11:05:39 am »

Well I don't know how the default views for Theater View are set up, so here's how you would add a new view:

1.  Tools → Options → Theater View
2.  Add a new view in the "Items to Show" section, or modify an existing one.
3.  Customize "set rules for file display" to suit your requirements. You probably want to at least have a rule for: Media Sub Type is TV Show
4.  In the "Details" pane on the right, add Series field
5.  Now add anther field, but instead of selecting it from the list, use an Expression. Paste that first set of code into the "Expression to group by" section.

In the "Expression to display" section, you can make this as simple or complex as you want, using MC's Expression Language.
If you just want a list of episode names, you can use [Name]
Or you might want something which lists the season and episode number before the name, in an S00E00 format:

Code: (S00E00) [Select]
<font alpha="50">If(!IsEmpty([Track #, 1]), Episode [Track #, 1], Delimit(PadNumber([Season, 1],2),,S)Delimit(PadNumber([Episode, 1],2),,E))<//font>
[Name, 1]

6.  You could also add the Season field to this view between the Series and the Expression, if you don't want a list of all episodes from all seasons grouped together in one big list.


EDIT: Modified that "S00E00" code to look a bit nicer.
Now it will display the S00E00 information dimmed.
And if you have track numbers assigned to the files, it will use them instead.
 
Why use Track Numbers? Because TV Shows shouldn't have any assigned to them by default, and Media Center has a quick "Fill Track Numbers From List Order" feature.
So if you have a complete Series, you can sort them in a Season→Episode order, use "Fill Track Numbers From List Order" on that list, and now you will see a list of "Episode 1-100" in Theater View instead of 5 seasons with 20 episodes in each. (or however many seasons/episodes there are)
Logged

fitbrit

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4887
Re: Jump to first unwatched episode - TV Shows
« Reply #4 on: April 14, 2015, 02:19:58 pm »

Thank you, 6233638!
I am bookmarking this thread.
Logged

steelman1991

  • World Citizen
  • ***
  • Posts: 126
Re: Jump to first unwatched episode - TV Shows
« Reply #5 on: April 14, 2015, 04:27:16 pm »

@6233638

Sorry I'm slightly lost here - apologies.

Is there no way to achieve this without adding a 'new view'. I'm happy with the way items are presented in Theatre View, its how they are entered from the basic view that interests me. All I want to do is enter 'Boardwalk Empire' navigate to Season 1 (have the system recognise that I've watched episodes 1-6 and take me directly to episode 7)
Logged

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Re: Jump to first unwatched episode - TV Shows
« Reply #6 on: April 14, 2015, 04:54:29 pm »

You should be able to add it to the existing view, I just don't know the specifics of how your current view is set up so it may not behave as expected if you do that without any other changes.
Logged

steelman1991

  • World Citizen
  • ***
  • Posts: 126
Re: Jump to first unwatched episode - TV Shows
« Reply #7 on: April 14, 2015, 05:06:22 pm »

Everything is at default settings - I'm testing this on a fresh installation (1 folder imported), with no changes to views (in fact I just uninstalled and re-installed, as the last set of instructions caused failed playback - audio was present but there was no video feed, continually reverted to episode overlay.
Logged

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Re: Jump to first unwatched episode - TV Shows
« Reply #8 on: April 15, 2015, 01:25:28 am »

That sounds like an unrelated issue. All this affects is the way that content is displayed.
It has nothing to do with playback.
Logged

steelman1991

  • World Citizen
  • ***
  • Posts: 126
Re: Jump to first unwatched episode - TV Shows
« Reply #9 on: April 15, 2015, 03:31:05 am »

That may be, but it only became an issue after I started adding the expressions. Anyway, I'm back to a fresh install and correct playback, but to square one with the original post issue.

Thanks for the help by the way.
Logged

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Re: Jump to first unwatched episode - TV Shows
« Reply #10 on: April 15, 2015, 04:27:10 am »

Try it now that you have playback working.
If that is the only change you make, and playback breaks again, you've found a new bug.
Logged

steelman1991

  • World Citizen
  • ***
  • Posts: 126
Re: Jump to first unwatched episode - TV Shows
« Reply #11 on: April 19, 2015, 10:05:33 am »

Sorry for the delay in responding - life got in the way.

I've since found that playback breaks even without your added expressions. This is running build 20.0.93 on a Windows 8.1 machine, with both Red October Standard and HQ, running from a NUC i5-4250U CPU.

Media plays fine from Display View - move to Theatre View and playback fails as per previous report, remaining on episode overlay, unless I choose 'watch' a second time, which releases playback to screen.

Any thoughts, or anything I should add (logs?)
Logged
Pages: [1]   Go Up