INTERACT FORUM

More => Old Versions => Media Jukebox => Topic started by: LynelleV on May 15, 2011, 09:06:06 pm

Title: Library field question
Post by: LynelleV 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
Title: Re: Library field question
Post by: MrC 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 (http://wiki.jriver.com/index.php/Media_Center_expression_language#Functions_for_the_manipulation_and_creation_of_list_type_fields)
Title: Re: Library field question
Post by: LynelleV on May 16, 2011, 12:04:26 am
Thanks - that's it exactly :)