INTERACT FORUM

Please login or register.

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

Author Topic: expression possible? sorting formats  (Read 1434 times)

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
expression possible? sorting formats
« on: May 16, 2014, 12:10:23 pm »

Hi,  first off apologies...i know this has been discussed before (i'm sure i've read every thread)

i'm trying to sort by flac/mp3, which of course is very easy in MC.  But...i would like a view that will *only* show flac/wav/dsf when it's there, otherwise show the mp3 (even better, the highest bitrate mp3 LOL)

i have it configured perfect on MC but this is for my DLNA devices.  i've been working with stacks, it appears that something disrespects my stacking in the DLNA chain, can't get it working at all (although the stacks look fine in MC). 

my ideas were:
1.  make a custom tag that assigns a number to each format/bitrate and use an expression to preferentially drill down until a number is found in the tag.  however i haven't been able to make it work.
2.  figure out some sort of complex expression to just look for the file type itself (similar to 1. but seems more complex to me)

i'm not interested in changing the album tag with [flac] or whatever, and i'm currently using a view that show just flac/wav, and a separate view that shows mp3 that is sorted by bitrate.  this works great but looks garbage on the WDTV and is hard to navigate on the receivers.

anyways, any suggestions are most appreciated...if someone thinks an expression is possible, even just a hint or starting point is fine, as i'm working to learn more of the expression language anyways

thanks JRiver folks!

Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: expression possible? sorting formats
« Reply #1 on: May 16, 2014, 12:51:59 pm »

You've run into a limitation of the MC expression language.

For each file, the expression is evaluated, and that expression only has access to that file's values.  So it cannot ask about what has happened with files before, or files after the current only being evaluated.

There are some tricks that you can employ, but those are not likely to work in this case.

One method comes to mind.  If your file versions have exactly the same properties such as Track #, Artist, and Name, then you might be able to use the ~nodups modifier in Set rules for file display.  You'd have to sort in such as way that you get your highest bitrates first, then use ~nodups with the relevant fields.  This should leave you with just one copy of the file, the highest bitrate version.
Logged
The opinions I express represent my own folly.

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
Re: expression possible? sorting formats
« Reply #2 on: May 16, 2014, 01:02:25 pm »

thanks MrC!

i had figured something along those lines, i've played with the ~nodups and i'm getting a handle on how it works and what it does

all of my files are identically tagged per album

i'm still convinced i can do it with some custom field magic (flac=1 mp3=2, if 1 and 2 show 1 else 2) if you know where i'm going.  i haven't programmed c+ or VB in 15 years, but i am pretty good at excel so all of my expression playing so far is based on what i would do in excel ha ha
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: expression possible? sorting formats
« Reply #3 on: May 16, 2014, 01:09:16 pm »

Great.  See also:

   http://wiki.jriver.com/index.php/Smartlist_and_Search_-_Rules_and_Modifiers

Unconvince yourself.  Your flac file F cannot know that an mp3 file M happens to exist.  The only way to make that work would be to manually tag all of your files with a code that indicates which alternate files types exist (so you'd tag F with an "M" and tag M with a "F").  That's a lot of manual work.  You could construct a view using some special Set rules for file display and global variables to calculate this value for you, and then assign it to a static value, but that's still manual work and periodic updating.

If you are going to do some manual work anyway, I'd suggest using my pscriptor utility and we can create you a scriptlet which can fill in the special field for you.  It would examine all your files, and could set a field which shows all the possible file types you have for a given criteria such as Track #, Name, Artist, Album.
Logged
The opinions I express represent my own folly.

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
Re: expression possible? sorting formats
« Reply #4 on: May 16, 2014, 01:20:10 pm »

hmmm...i see what you mean.  i'll have to think on this one, thanks for the help!  i'll play with nodups a bit more and see if i can wrangle it before i get into manually tagging stuff.

Logged
Pages: [1]   Go Up