INTERACT FORUM

Please login or register.

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

Author Topic: How To: Build A Custom Watched Field for Media Center  (Read 27153 times)

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
How To: Build A Custom Watched Field for Media Center
« on: December 15, 2013, 01:25:52 am »

This tutorial will show you how I build my custom [Watched Percent] field, which I use throughout Media Center for display of Watched/Not-Watched Status.  It displays it using a combination of checkmarks (for fully watched files) and percentages watched, using custom percentage ranges.  Now that we can easily change [Number Plays] (as of MC 19.0.90), it is easy to reset this special Watched status indicator, by simply clearing [Number Plays].

For a discussion of why this logic was used, and how it was built, see this thread:
http://yabb.jriver.com/interact/index.php?topic=85906.0

It requires two custom fields: [Bookmark Percent] and [Watched Percent].  They're configured like so:

[Bookmark Percent]

This outputs a numeric percentage for any file indicating the percentage "complete" it was last played.  Interestingly, this works even for files that don't use automatic bookmarking (Music, for example).  The bookmark is ignored, but MC tracks it.

Expression:
Code: [Select]
PadNumber(Math(round(([Bookmark] / ([Duration, 0] * 1000)) * 100)),2)


You can use whatever you'd like in the Display fields when setting it up.  That's what it will be called if you add it as a column, or to Theater View directly.  This is mostly for utility, so it doesn't much matter if you won't use it in a column.

[Watched Percent]

Outputs either a checkmark, blank, or the percentage watched, depending on the status of [Number Plays] and [Bookmark Percent].

If [Bookmark Percent] is between 10 and 89%, then it outputs the percentage (formatted like "76%").
If [Bookmark Percent] is 90% or more, then it outputs a checkmark.
If [Bookmark Percent] is less than 10%, then
   If [Number Plays] is zero, it outputs nothing at all (null text).
   If [Number Plays] is greater than zero, it outputs a checkmark.

The last check is because when file has played all the way through, MC will reset the [Bookmark] to zero, and "automatically reset" the bookmark.  We still want to mark these as Watched.

Expression:
Code: [Select]
If(IsRange([Bookmark Percent], 0-9),
If(Compare([Number Plays],<,1),,✔),
If(IsRange([Bookmark Percent], 10-89),[Bookmark Percent]%, ✔))



There is one other, optional, custom calculated field you can make that I also use and find handy.  This isn't required or used by the [Watched Percent] expression, but I think it compliments it well.

[Plays]

Outputs a nicely formatted version of [Number Plays], including text about the [Last Played] date.

If the file was never played, it outputs "never played'.
If [Last Played] was greater than 1 year ago, then it outputs in the form: [Number Plays] (last [Last Played - Year Only])
If [Last Played] was less than 1 year ago, then it outputs in the form: [Number Plays] (last [Last Played - Short Date])

Expression:
Code: [Select]
if(isEmpty([Number Plays]), never played, [Number Plays] plays (last if(compare(math(now() - [Last Played, 0]), <, 365), FormatDate([Last Played, 0], MMM dd, unknown)/), FormatDate([Last Played, 0], yyyy, unknown)/)))


Standard View Use:

If you set these fields up, you can use them for Columns, which results in:



You can see the different results in that screenshot.

1. Many episodes are watched to 90% or greater, and they're all marked with a checkmark.
2. Episode 11, 12, 16 of Season 3, are each marked with a checkmark, even though their % Complete is low, because they have at least one "Play" (meaning, you've played it through to the 1/2 point at least once, causing MC to count it as a Play).
3. Episode 3 in Season 4 is listed as 40%, because it falls in the "middle percentages" (between 10 - 89).
4. Episodes 7 and 8 of Season 4 have no output at all because I haven't watched them.  (Seriously, I haven't.  No spoilers.)  Even though Episode 7 has a tiny percentage played (checking the file, introductory commercials, etc), it still outputs blank.

Theater View Use:

You can also use it in Theater View's File Info panels.  You set it up as such:



And use them in file captions:

Movie Template:
Regular Caption:
Code: [Select]
[Name]Delimit([Watched Percent], , / )Expanded Caption:
Code: [Select]
[Name]
ListBuild(1, / • , [Year], [Duration], [MPAA Rating], RatingStars(),[Plays], [Watched Percent])

Search:
Code: [Select]
[Media Type]=[Video] [Media Sub Type]=[Movie]


TV Shows Template:
Regular Caption:
Code: [Select]
If([AllSameSeries], <font alpha="50">Delimit(TVInfo(SeasonEpisode))<//font>[Name]Delimit(<font alpha="50">[Watched Percent]<//font>, , / ), TVInfo(NameDisplay)Delimit(<font alpha="50">[Watched Percent]<//font>, , / )) <font alpha="50">If([AllSameSeries],,TVInfo(SeasonEpisode)/ )TVInfo(DateNoTime)<//font>Expanded Caption:
Code: [Select]
If([AllSameSeries], <font alpha="50">Delimit(TVInfo(SeasonEpisode))<//font>[Name]Delimit(, , / ), TVInfo(NameDisplay))
<font alpha="50">ListBuild(1, / • , If([AllSameSeries],,TVInfo(SeasonEpisode))TVInfo(DateNoTime),[Plays],[Watched Percent])<//font>

Search:
Code: [Select]
[Media Type]=[Video] [Media Sub Type]=[TV Show]


And it results in:











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
Re: How To: Build A Custom Watched Field for Media Center
« Reply #1 on: December 15, 2013, 01:46:31 am »

Note:  Because some of the expression above contain returns, it is best to paste them in using the Expression Editor.  If you use the single-line editor, some of the expression might get truncated off when you paste it in.

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
Re: How To: Build A Custom Watched Field for Media Center
« Reply #2 on: December 15, 2013, 02:04:54 am »

Please Note:  The following section is no longer required because Hendrik implemented a nice Library Tools > Mark as Played/Mark as Not Played system in current versions of MC19.  (Thanks Hendrik, you rock!)

The new system works beautifully with the stuff above.  Unfortunately, you can't quickly (yet, I hope) do these toggles from inside Theater View, but if you need to reset the status of episodes (or songs or whatever) you can do it in Standard View by simply selecting the files and Right Click > Library Tools now.

To Quickly Reset Watched Status

When using this system, you may occasionally find the need to toggle or adjust the [Watched Percent] status (to clear a checkmark or add one).  This can be challenging to do with the built in Watched() system, but now that we can directly edit [Number Plays], it is fairly painless to do from Standard View.  I'll note, unfortunately, I still don't have a good way to do this from Theater View.

To do this:
1. Add these columns to a View in Standard View: [Watched Percent], [Bookmark], [Number Plays]

2. Open the Tag Action Window, and make sure Show Tags in Current View is enabled.



3. In the same place, choose Also Show > Number Plays and make sure it has a checkmark.


This is needed because MC uses [Number Plays] in the header, and doesn't show it in the Tag Action Window even if you have it as a column.

4. Select a file or files in the file list that you'd like to tweak.  In either the Tag Action Window, or inline in the Columns, you can:

For a file that is showing a percentage, like 74%, that should be fully played (it has a lot of credits, maybe, or you re-watched part of it).  As long as [Number Plays] is at least one (which it usually will be if you watched it), then you just need to reset the [Bookmark] field.  MC doesn't let you type in a value for [Bookmark], but you can clear it.

For a file that you watched using a separate application or device that couldn't update MC's Library (so it is showing as "never played" when it has been), simply increment [Number Plays].  You can now do this directly and type in whatever number you wish (requires MC 19.0.90 or later).  Reset the [Bookmark] value if needed to get the checkmarks instead of percentages.

For a file that has a checkmark that shouldn't (because you "checked through" more than half of the file, causing it to get counted as a "play"), simply reset [Number Plays] to zero.  If needed, you can also reset the [Bookmark] (but you won't have to if you rewind when you're done checking whatever you're checking in the file that causes it in the first place).

Demo:


Click to watch: MC19 - Custom Watched Percent: Resetting Demo


Other Media Types:

I should also mention that this stuff will all basically work equally well for Podcasts and Audiobooks.  You may want to change the name of the [Watched Percent] field when you display it for this purpose.  For this, you can just wrap it in an expression and add that as a Column or Field in Theater View.
Logged
"Some cultures are defined by their relationship to cheese."

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

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Re: How To: Build A Custom Watched Field for Media Center
« Reply #3 on: December 15, 2013, 05:23:47 am »

This seems to take care of the case where a file is being played for the first time, but has not yet hit 50% to be marked as played, so watched(0) does not return the progress. (it would be easier if watched(0) returned the progress even if it's not marked as played)
 
Rather than all your compare() statements, is it easier to use isrange() ?
 
Code: [Select]
if(isrange([Bookmark Percent], 0-9),
if(isequal([Number Plays],0,2),,✔),
if(isrange([Bookmark Percent], 10-89),[Bookmark Percent]%, ✔))

It seems like that would be easier to change if someone wants to use a different range for their markers.
 
 
Strangely, I have a file which shows 35% using [Bookmark Percent] and 34% with Watched(0). Any idea why that would be the case?
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: How To: Build A Custom Watched Field for Media Center
« Reply #4 on: December 15, 2013, 10:01:17 am »

This seems to take care of the case where a file is being played for the first time, but has not yet hit 50% to be marked as played, so watched(0) does not return the progress. (it would be easier if watched(0) returned the progress even if it's not marked as played)

Exactly.  That was the goal.  To make a smarter Watched().  The one issue with this that I haven't yet quite figured out is how to use it for a boolean "Is Watched" test.  But I don't know that I need it, because [Number Plays] could solve that.

Rather than all your compare() statements, is it easier to use isrange() ?
 
Code: [Select]
if(isrange([Bookmark Percent], 0-9),
if(isequal([Number Plays],0,2),,✔),
if(isrange([Bookmark Percent], 10-89),[Bookmark Percent]%, ✔)

It seems like that would be easier to change if someone wants to use a different range for their markers.

You see, I was led astray by MrC's clever concatenating trick, which works but if you flip it on end like this, that is much more readable.  You forgot a parenthesis there though.  This seems to work as a replacement for my [Percent Watched] expression.  I'll do a bit more edge case testing, and then update my original post, but it looks right:

Code: [Select]
if(isrange([Bookmark Percent], 0-9),
if(isequal([Number Plays],0,2),,✔),
if(isrange([Bookmark Percent], 10-89),[Bookmark Percent]%, ✔))

Thanks!

I don't know about the 1 percentage difference.  I'd guess the internal Watched() uses a different degree of accuracy, so it rounds differently.  Or maybe it just truncates instead of rounding?
Logged
"Some cultures are defined by their relationship to cheese."

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

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Re: How To: Build A Custom Watched Field for Media Center
« Reply #5 on: December 15, 2013, 10:37:58 am »

Exactly.  That was the goal.  To make a smarter Watched().
I think that's the one edge case I was missing before with my previous attempt at this, so I'll be replacing the watched markers in my library with it.
 
It would be nice if there was some way to evaluate the performance overhead of an expression. I'm curious to see if there's a difference between the two approaches, especially as I've been running into problems with high CPU usage lately.
 
I'm also curious if something like watched(3) were added to simply return the percentage, if that would be any quicker than [Bookmark Percent]

You see, I was led astray by MrC's clever concatenating trick, which works but if you flip it on end like this, that is much more readable.  You forgot a parenthesis there though.  This seems to work as a replacement for my [Percent Watched] expression.  I'll do a bit more edge case testing, and then update my original post, but it looks right
I think that must have got lost when copying & pasting. I did some testing earlier and there didn't seem to be any problems with it. Hopefully I haven't overlooked anything.

I don't know about the 1 percentage difference.  I'd guess the internal Watched() uses a different degree of accuracy, so it rounds differently.  Or maybe it just truncates instead of rounding?
That's probably it.
Logged

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: How To: Build A Custom Watched Field for Media Center
« Reply #6 on: December 15, 2013, 10:38:16 am »

Glynor's Tip Of The Week: 2013.51: Build A Custom Watched Field for Media Center  ;D

Bookmarked. Thanks! :P.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: How To: Build A Custom Watched Field for Media Center
« Reply #7 on: December 15, 2013, 12:16:41 pm »

Hopefully I haven't overlooked anything.

I didn't find any problems.  So, I've implemented it.  Though, I did tweak it a slight bit again to make it even easier to understand when reading it:

Code: [Select]
If(IsRange([Bookmark Percent], 0-9),
If(Compare([Number Plays],<,1),,✔),
If(IsRange([Bookmark Percent], 10-89),[Bookmark Percent]%, ✔))

Works great.  I'm going to update my original post.
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
Re: How To: Build A Custom Watched Field for Media Center
« Reply #8 on: December 15, 2013, 12:27:19 pm »

I also found a mistake in my original Movie File Info Template for Theater View.  I'd taken the screenshot and copy/pasted the expression before I made the changes to use my new system.  Oops.  Fixed now.   :-[

EDIT:  I tweaked the caption one more time.  Next, I'll show how you can use this to (more) quickly reset Watched status.
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
Re: How To: Build A Custom Watched Field for Media Center
« Reply #9 on: December 15, 2013, 01:25:10 pm »

Moved up.
Logged
"Some cultures are defined by their relationship to cheese."

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

6233638

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 5353
Re: How To: Build A Custom Watched Field for Media Center
« Reply #10 on: December 15, 2013, 04:08:58 pm »

I didn't find any problems.  So, I've implemented it.  Though, I did tweak it a slight bit again to make it even easier to understand when reading it
That had crossed my mind, but I didn't think anyone would have a need to change it. Looks good!
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: How To: Build A Custom Watched Field for Media Center
« Reply #11 on: December 15, 2013, 04:17:01 pm »

Tweaked my captions yet again (and added new screenshots).  I think it looks good now.
Logged
"Some cultures are defined by their relationship to cheese."

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

Arindelle

  • Citizen of the Universe
  • *****
  • Posts: 2772
Re: How To: Build A Custom Watched Field for Media Center
« Reply #12 on: December 16, 2013, 04:06:34 am »

 Impressive :) Nice guide Glynor!
Logged

akira54

  • Galactic Citizen
  • ****
  • Posts: 302
Re: How To: Build A Custom Watched Field for Media Center
« Reply #13 on: December 16, 2013, 04:07:51 am »

Wonderful, thanks a lot. Am I right in thinking not all the code for TV Shows Template and Plays is showing?
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: How To: Build A Custom Watched Field for Media Center
« Reply #14 on: December 16, 2013, 06:35:13 am »

It is all there.  What are you missing?
Logged
"Some cultures are defined by their relationship to cheese."

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

MrHaugen

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 3774
Re: How To: Build A Custom Watched Field for Media Center
« Reply #15 on: December 16, 2013, 10:47:17 am »

When the watched function was first introduced, there were plenty of reports that it was only partially working. At least for video. Now, a year+ later, people still have to create custom stuff to at least prevent files from being marked as watched when you reach above 50%. Simply adding the bookmarks to the equation for video would prevent this. This is not easy for new users. Even experienced users have difficulties with this I reckon.

Thanks to Glynor it's at least something that everyone can do if they just spend the time needed.
Logged
- I may not always believe what I'm saying

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: How To: Build A Custom Watched Field for Media Center
« Reply #16 on: December 16, 2013, 10:59:01 am »

Now, a year+ later, people still have to create custom stuff to at least prevent files from being marked as watched when you reach above 50%. Simply adding the bookmarks to the equation for video would prevent this.

My goal was really to allow it to show percentages before you reached 50%.  My previous system did allow percentages from 50-90%, but the built-in Watched() expression doesn't "trigger" until [Number Plays] increments (which is at 50%), so you couldn't get any percentages from 0-50%.

This system is much more flexible.  You can fully customize the percentages shown.  All you have to tweak is the [Watched Percent] expression (and, thanks to 6233638, this expression is pretty legible and easy to modify):

Code: [Select]
If(IsRange([Bookmark Percent], 0-9),
If(Compare([Number Plays],<,1),,✔),
If(IsRange([Bookmark Percent], 10-89),[Bookmark Percent]%, ✔))

This one does:
  • Percent 0-9: Blank if [Number Plays] = 0, and Checked otherwise.
  • Percent 10-89: Percentage
  • Percent 90-100: Checkmark

If you want to modify this, you just need to tweak the numbers.  So, if you don't like my percentage cutoffs, and would prefer:

  • Percent 0-19: Blank if [Number Plays] = 0, and Checked otherwise.
  • Percent 20-84: Percentage
  • Percent 85-100: Checkmark

You'd use:

Code: [Select]
If(IsRange([Bookmark Percent], 0-19),
If(Compare([Number Plays],<,1),,✔),
If(IsRange([Bookmark Percent], 20-84),[Bookmark Percent]%, ✔))

The process feels long above, but that's mostly because I was heavily documenting it.  You should basically be able to just create these three custom fields:
[Bookmark Percent], [Watched Percent], and [Plays]

Copypasta my expressions into the proper spots, and tweak your views to use these new fields.  It isn't terrible.  The hardest part, by far, is tweaking the Theater View File Info Templates, but this is mostly because the Theater View View designer is... pretty bad.  You have to drill down deep into the Options panel, apply a change, and then back all the way out to test it.  Rinse, wash, repeat 10 times and you realize you've spent hours doing it, mostly fighting the UI and clicking OK buttons over and over.
Logged
"Some cultures are defined by their relationship to cheese."

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

MrHaugen

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 3774
Re: How To: Build A Custom Watched Field for Media Center
« Reply #17 on: December 17, 2013, 02:47:37 am »

Yea. I know your goal was much more :) I'll try it out when I have the chance. Looks good!
Logged
- I may not always believe what I'm saying

akira54

  • Galactic Citizen
  • ****
  • Posts: 302
Re: How To: Build A Custom Watched Field for Media Center
« Reply #18 on: December 17, 2013, 02:36:20 pm »

It is all there.  What are you missing?

What I see under TV Show Watched is:

but it appears to copy fine.
Logged

akira54

  • Galactic Citizen
  • ****
  • Posts: 302
Re: How To: Build A Custom Watched Field for Media Center
« Reply #19 on: January 06, 2014, 06:05:30 pm »

Trying to implement the Theater View code (the rest went fine), but cannot find the File Info panel (in TheaterView Options). ?
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: How To: Build A Custom Watched Field for Media Center
« Reply #20 on: January 06, 2014, 06:36:48 pm »

Trying to implement the Theater View code (the rest went fine), but cannot find the File Info panel (in TheaterView Options). ?

I actually wondered when someone was going to ask this.  The configuration for Theater View has really outgrown its location in the Options panel, I think*.

In any case:
1. Go to Tools > Options > Theater View.
2. Click the Customize file info panel link, under Appearance (at the top).
3. Select the Template you'd like to edit from the drop down, and then click the Manage button.
4. Choose Edit Template to alter the search.

You can also copy/paste templates, re-order them, and other management tasks from this button.  Actions apply to the currently selected Template (which would be easier to understand and use if it was a listbox like control, but there's no room in here with the View configuration below it, wink, wink, nudge, nudge).

* I still think you should configure the Theater and Media Network views via a special Top-Level item in the Tree of Standard View, using "views" that you can drag-drop around.  The same as the other thing with this guy.  That frees up all kinds of room in the Options Dialog to make the File Info Templates more sane, and you can show a preview of resulting files and categories in the right-hand side (or put view-specific configuration there rather than in a sub-dialog).

This makes copy/pasting views and rearranging them much simpler and less fiddly.  Soapbox done.
Logged
"Some cultures are defined by their relationship to cheese."

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

akira54

  • Galactic Citizen
  • ****
  • Posts: 302
Re: How To: Build A Custom Watched Field for Media Center
« Reply #21 on: January 06, 2014, 06:46:10 pm »

That is a great help. I'll give it a shot tomorrow (way past my bedtime now). Thanks.
Logged

akira54

  • Galactic Citizen
  • ****
  • Posts: 302
Re: How To: Build A Custom Watched Field for Media Center
« Reply #22 on: January 09, 2014, 03:39:09 pm »

Thanks Glynor. It works like a dream. Any idea where I can find access to such things as the "wall" and the other menu items offered in TheaterView?
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: How To: Build A Custom Watched Field for Media Center
« Reply #23 on: January 09, 2014, 03:42:34 pm »

Any idea where I can find access to such things as the "wall" and the other menu items offered in TheaterView?

I'm not sure what this means.  The "wall"?
Logged
"Some cultures are defined by their relationship to cheese."

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

akira54

  • Galactic Citizen
  • ****
  • Posts: 302
Re: How To: Build A Custom Watched Field for Media Center
« Reply #24 on: January 09, 2014, 03:44:57 pm »

Sorry. At the top of the screen in TheaterView Movies a number of options (selections really) appear, such as Grid, HD, Recent etc. One of these is the Wall (gives a wall-like presentation of all movies.) I just can't for the life of me figure out how to modify these options (if at all possible).
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: How To: Build A Custom Watched Field for Media Center
« Reply #25 on: January 09, 2014, 04:13:35 pm »

Yes.  Those are individual Theater View "Views".  These are, like their corollary in Standard View, completely configurable.

I still need to re-record the audio to this to finish it, but this should get you started:
https://vimeo.com/80925331
Logged
"Some cultures are defined by their relationship to cheese."

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

akira54

  • Galactic Citizen
  • ****
  • Posts: 302
Re: How To: Build A Custom Watched Field for Media Center
« Reply #26 on: January 09, 2014, 04:14:45 pm »

Glynor you are a fountain of wisdom. Thanks again.
Logged

akira54

  • Galactic Citizen
  • ****
  • Posts: 302
Re: How To: Build A Custom Watched Field for Media Center
« Reply #27 on: January 10, 2014, 05:07:56 pm »

Actually the "Wall" and "Grid" options do not seem to allow any modification at all. When I examine them (I wanted to see if t possible to make the cover art a little bigger) they were completely empty. Obviously no search is associated with them but it would be nice to be able to modify these views in other ways (distance between posters, size, etc).
Logged

pcstockton

  • Citizen of the Universe
  • *****
  • Posts: 1261
Re: How To: Build A Custom Watched Field for Media Center
« Reply #28 on: January 10, 2014, 09:37:07 pm »

I cant wait to get into this later, when wasted.  Heading out now.  I am so very glad you posted this Glynor.  I been wanting exactly this.

Three Cheers,
Patrick
Logged
HTPC (ASRock Mini PC 252B: i5 2520M Sandy Bridge/HD3000 - 2.5 GHz - 8GB RAM - 256GB Intel SSD - Win7 Home) > MF V-Link 192 > Wireworld Ultraviolet > Naim DAC > Naim NAC 102/NAPSC/HiCap (PSU) > Naim NAP 180 Amp > Naim NACA-5 Speaker Cables > Naim Ariva

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
Re: How To: Build A Custom Watched Field for Media Center
« Reply #29 on: July 12, 2014, 12:54:08 pm »

sorry to necro-bump, but i just found this thread

hoping someone (glynor?) can help me figure out why the percentage complete either shows 00 or 96, never anything else
and the watched always shows a checkmark, even if i know i've never played the file

thanks, this would be a cool feature i just can't get it to work
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: How To: Build A Custom Watched Field for Media Center
« Reply #30 on: July 12, 2014, 01:49:57 pm »

Did you follow the instructions above?

If so, I'd guess you didn't copy/paste the expressions and tried to recreate them yourself.  Or, perhaps, you didn't follow this instruction:

Note:  Because some of the expression above contain returns, it is best to paste them in using the Expression Editor.  If you use the single-line editor, some of the expression might get truncated off when you paste it in.
Logged
"Some cultures are defined by their relationship to cheese."

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

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
Re: How To: Build A Custom Watched Field for Media Center
« Reply #31 on: July 13, 2014, 11:43:26 am »

Did you follow the instructions above?

If so, I'd guess you didn't copy/paste the expressions and tried to recreate them yourself.  Or, perhaps, you didn't follow this instruction:


ok, i've redone both the % and the watched checkmark, copy/paste into the expression editor (not the single line) and it's still exactly the same.  the % is either 0 or 96, and the checkmark appears no matter what even if i move a file into JRiver that has never been part of JRiver

any suggestions from here?  i'm a standard view user, don't often use theatre view.

thanks Glynor!
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42376
  • Shoes gone again!
Re: How To: Build A Custom Watched Field for Media Center
« Reply #32 on: April 14, 2016, 07:55:29 am »

Someone suggested adding this to MC21, so I thought I'd take a look.

The first thing that hit me is that [Bookmark] is a fancy field used for DVDs.

So:
[Bookmark Percent]
PadNumber(Math(round(([Bookmark] / ([Duration, 0] * 1000)) * 100)),2)

Won't work at all.

Thoughts?
Logged
Matt Ashland, JRiver Media Center

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: How To: Build A Custom Watched Field for Media Center
« Reply #33 on: April 14, 2016, 11:07:22 pm »

The first thing that hit me is that [Bookmark] is a fancy field used for DVDs.

So:
[Bookmark Percent]
PadNumber(Math(round(([Bookmark] / ([Duration, 0] * 1000)) * 100)),2)

Won't work at all.

What are you going on about?

Do you mean my scheme doesn't work when it comes to DVD playback, because DVDs set a weird value in the [Bookmark] field instead of the normal ms counter used for all other media types? That may be true. I can't remember the last time I played a DVD directly (probably more than 5-7 years ago, and certainly well before this system was designed and implemented). But, there would have to be a [Media Type] or something that MC exposes that would flag the files as "triggering" whatever special case DVDs use, so you could just exclude those (or handle them differently).

But, I'm not sure that's what you meant. It could have meant that my system as described above doesn't work at all, which is clearly not true. I still use it. Right now. And have since well before this was posted originally. I know others do too.

So... What are you going on about?  ;D
Logged
"Some cultures are defined by their relationship to cheese."

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

nataru

  • Recent member
  • *
  • Posts: 47
Re: How To: Build A Custom Watched Field for Media Center
« Reply #34 on: July 16, 2018, 09:16:58 pm »

ok, i've redone both the % and the watched checkmark, copy/paste into the expression editor (not the single line) and it's still exactly the same.  the % is either 0 or 96, and the checkmark appears no matter what even if i move a file into JRiver that has never been part of JRiver

any suggestions from here?  i'm a standard view user, don't often use theatre view.

thanks Glynor!

I have the same problem. I know it's an old thread though and wonder if its still even supported.
Logged

arcspin

  • Galactic Citizen
  • ****
  • Posts: 391
Re: How To: Build A Custom Watched Field for Media Center
« Reply #35 on: August 05, 2019, 02:27:19 am »

Hi,
Just wanted to write and say thanx to glynor for creating this tutorial.

It was easy to follow for a "script kiddie" like my self and I feel a great satisfaction to be able to customize my JRiver media center 25 the way I like it.
This is one of the big reasons I year after year pay for the latest and greatest version of JRiver, this and that the player is rock solid and have never failed me.

Keep up the good work everyone !!


Cheers,
//Peter
Logged
Hardware: Intel Core i5-8600K 16GB RAM, ASUS GeForce RTX 2080 8GB DUAL OC
Software: Windows 10 Home 64-bit, version 2004, JRiver MC 29, MadVr 0.92.17 (Beta 113), NVIDIA driver 457.09
Projector: JVC DLA-I X5500 (RS420, X570R) -
Screen: DNP Supernova 08-85
Processor: Anthem AVM 70
Power amp: XTZ A2-400 for Front & Center - XTZ A2-300 for Surround & Height channels
Speakers: Arendal 1723 S Monitor for Front & Center, Linn Unik for Front Height, Rear Height, Surround & Surround back. Elipson Planet M for Top Middle.
Sub: Arendal 1723 1S

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: How To: Build A Custom Watched Field for Media Center
« Reply #36 on: August 18, 2019, 11:51:02 am »

I have the same problem. I know it's an old thread though and wonder if its still even supported.

FWIW, I still use this exact system on MC25. Don't know if I had to make any modifications over the years, but I think all I've done is tweak my percentages.
Logged
"Some cultures are defined by their relationship to cheese."

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

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: How To: Build A Custom Watched Field for Media Center
« Reply #37 on: August 19, 2019, 12:05:54 am »

I'm finally going to implement this shortly. I've been reading the history behind it. A couple of observations.

The function watched(3) isn't included in the Wiki documentation but still works and gives the same output as watched(0) or watched().

Watched(0) now seems to display the percentage watched from exactly 11% and above, rather than the 50% discussed in various threads. The logic is probably an integer comparison of >10. I suspect that Matt did that shortly after his comment above, because;

21.0.74 (4/19/2016)
3. Changed: The TVInfo(WatchedDisplay) expression will show a watched percentage based on the bookmark in more cases.

I don't think this changes what I am going to do with this idea, because I also want to be able to tweak the percentages used in the [Watched Percent] field. Specifically, I will probably use different percentages for recorded TV shows, as I tend to add quite a large padding at the beginning and the end of the recording, as both the Australian EPG I am using is rubbish, and the broadcasters rarely stick to their advertised times. So I need to use a large start percentage and a smaller completion percentage. Although the change below may mean I wouldn't need to allow for this if I used the standard functions;

24.0.3 (3/5/2018)
8. Changed: When calculating "Watched" status in Standard television "Recordings" view, the pre-padding ("Start recording early") value is removed from calculation so that recordings with large pre-padding relative to duration will not erroneously be marked as "x%" watched.

This may be only referring to the TVInfo(WatchDisplay) function, but that is based on watched() function, so it could apply to both. I will probably test that later.

Because of the above changes, and [Last Played] will now show "never played" if appropriate, I may use a different version of the custom [Play] field, or not create one at all. I shall see.


Any thoughts on the above?

PS: Oh, and I am going to have an issue with full folder DVD and Blu-ray rips using this method.  ?  But the watched() function doesn't fully work with them either, at least from a Client. Only the [Number Plays] field indicates if a movie has been played watched in those cases.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner
Pages: [1]   Go Up