INTERACT FORUM

Please login or register.

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

Author Topic: Library field question  (Read 1366 times)

LynelleV

  • Recent member
  • *
  • Posts: 11
Library field question
« on: May 15, 2011, 09:06:06 pm »

I'm trying to create a library field (Artist Path) that shows the 4th and 5th slash pieces of the path: IE if the path is
C:\users\username\music\artist
I want a field to show
Music\Artist
I had a field like this, but had to reinstall Media Jukebox cause it flaked out, and now I can't find the doc I used to make the field originally in the wiki.  It's the 'get the 4th and 5th piece' part that I can't find.  The frustrating thing is, I remember it was easy to do once I found the right doc...
I use it to find when the artist's stuff isn't all together on disk - I have several 'music' directories under c:\user\username.

thanks
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Library field question
« Reply #1 on: May 15, 2011, 09:46:58 pm »

Here's a sample expression:

listitem([filename],3,\) ... listitem([filename],4,\)

I used ... in the middle.  Add this as an expression column in a view, and you can see how it works.

See listitem() in the MC expressions in the Wiki: http://wiki.jriver.com/index.php/Media_Center_expression_language#Functions_for_the_manipulation_and_creation_of_list_type_fields
Logged
The opinions I express represent my own folly.

LynelleV

  • Recent member
  • *
  • Posts: 11
Re: Library field question
« Reply #2 on: May 16, 2011, 12:04:26 am »

Thanks - that's it exactly :)
Logged
Pages: [1]   Go Up