INTERACT FORUM

Please login or register.

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

Author Topic: Help with some Video smartlist scripting for Directors/Actors  (Read 804 times)

AlanDistro

  • World Citizen
  • ***
  • Posts: 138
Help with some Video smartlist scripting for Directors/Actors
« on: October 18, 2019, 04:13:32 pm »

After years of only using JRiver for audio, I've started switching over to JRiver for all of my video needs as well (coming from a Plex Lifetime license).

I've got mkv's and full BDMV menus imported, no real problems there (I mean, a few menus lock up when I'm navigating, and you can't play any BDMVs on clients, grr, but that's fine, I'll eventually rip out the mkvs from all of them).

Some things I'd like to do but have no idea how I'd accomplish...

- I'd like to browse all movies by the same director. Now I could set up a smartlist where "Director is XXX" but that's a manual process for dozens if not hundreds of playlists. Is there a way to create a view that would only show me Directors where I have, say, 3 or more films by that director? Then I could browse and pick a director to see all of the titles I own by them? I know in the theater view I can view them alphabetically, but that's a pretty terrible view as there are dozens of names I've never heard of in there, each with one or two credits. It'd be great to weed them out and then I'd much prefer a list sorted by the number of titles I own by each director (so if I own 10 titles by Spielberg and only 8 by Craven, Spielberg would show up before Craven). I'd prefer this to be a standard view I have in the Video section of the tree on the left, not a theater view.

- Ditto the above for Actors/Actresses.

I see the above working similar to the genre standard view, where I can see Horror and Comedy and Drama, and then click on each to see which titles are inside.

Sorry, I'm still pretty new to the fancy scripting stuff. I can use the built in functions fine, but writing the code for these things is like a foreign language. I really appreciate the help.
Logged

Moe

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 695
  • Hi
Re: Help with some Video smartlist scripting for Directors/Actors
« Reply #1 on: October 18, 2019, 04:38:22 pm »

Try setting this up in theater view as an expression or in a pane in standard view.

if(isequal(ItemCount(/[Media Sub Type/]/[Director/]), 3, 6), [Director],)

The 3 in this expression makes it so it will only show directors with three or more films.  You can change that to taste. 
Logged

AlanDistro

  • World Citizen
  • ***
  • Posts: 138
Re: Help with some Video smartlist scripting for Directors/Actors
« Reply #2 on: October 18, 2019, 04:44:20 pm »

That seems to have worked!! Just did a "Sort by Number of Files" and it's almost perfect... it did create an "unassigned" group and placed it as the top grouping, as it contains every movie not directed by one of the listed directors. Any way to hide or get rid of that?
Logged

AlanDistro

  • World Citizen
  • ***
  • Posts: 138
Re: Help with some Video smartlist scripting for Directors/Actors
« Reply #3 on: October 18, 2019, 04:49:45 pm »

Also, changing "Director" to "Actors" did not work for the actors view, as it didn't separate the individual actors, it only looked at the semicolon lists in their entirety.
Logged

Moe

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 695
  • Hi
Re: Help with some Video smartlist scripting for Directors/Actors
« Reply #4 on: October 18, 2019, 05:14:09 pm »

To hide "Unassigned" I believe you'd have to use "Set rules for file display" which may not be what you want, depending on what else is in the view.


Quote
Also, changing "Director" to "Actors" did not work for the actors view, as it didn't separate the individual actors, it only looked at the semicolon lists in their entirety.

Yeah, the ItemCount matches the entire string not the individual elements of the string.
Logged

AlanDistro

  • World Citizen
  • ***
  • Posts: 138
Re: Help with some Video smartlist scripting for Directors/Actors
« Reply #5 on: October 18, 2019, 05:26:57 pm »

Not sure how I'd set the rules to remove the Unassigned. Attached is a screenshot, I created the view using only the expression provided above.

And is there a different expression that would parse out the individual actors from the semicolon strings?
Logged

Moe

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 695
  • Hi
Re: Help with some Video smartlist scripting for Directors/Actors
« Reply #6 on: October 18, 2019, 05:38:52 pm »

If you're okay with this view not displaying movies where the director has only directed 1 or 2 movies then do this. 

Create a new field called something like [Director Count] with a calculated value of

Code: [Select]
ItemCount(/[Media Sub Type/]/[Director/])
Then right click --- Directors in your tree on the left and choose "Customize View"

In the screen that pops up, in the middle section, under "Include Files" click "Set Rules for file display" and in the bottom left corner click the Import / Export button and paste this in.

Code: [Select]
-[Director Count]=[],[1],[2] [Media Sub Type]=[Movie]
You will use the above in place of the first expression I gave you.

I don't know of a way to do this for actors.  I've been asking for similar functionality.
Logged
Pages: [1]   Go Up