INTERACT FORUM

Please login or register.

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

Author Topic: [SOLVED] Alternative display in MediaCenter player based on Genre of track  (Read 362 times)

afora

  • Recent member
  • *
  • Posts: 29

Is it possible to have the player show different information about the playing track based on it's Genre?

I wouild like my Classical music tracks to be displayed as Composer - Name. While all other genres as standard Artist - Name. I understand that there is an alternative display option, but that requies manual switching between them (?). Can MediaCenter automatically chose what to display based on a Genre?

Cheers!
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Alternative display in MediaCenter player based on Genre of track
« Reply #1 on: October 01, 2022, 02:10:40 pm »

Sure.  MC's expression language can be used in the Title and Status areas up top.  Here's what I use in the Status area on mine.  It does two different things depending on whether I'm playing and Audio or Video file.

Code: [Select]
if(
  isequal([Media Type],Video),
    [Elapsed Time] // [Remaining Time] // [Total Time] [File Type] [Dimensions] regex([Compression],/#\(video: (.+), audio: (.+)\)#/,-1,0)[R1] [R2] [Channels]ch [Zone],
    [Elapsed Time] // [Remaining Time] // [Total Time] - [File Type] [Bit Depth]//[Sample Rate] kHz - [Channels] ch   [PN Position] of [PN Tracks]  ([Track #]//[Total Tracks]if(isempty([disc #]), , / D[disc #])/) [Zone]
)

You should be able to use a similar expression that examines [Genre] and does one thing if it is equal to "Classical" and does something else if it is not.  Here's the reference page for "IF" in case you want some formal documentation:

https://wiki.jriver.com/index.php/Conditional_Functions#If

Brian.
Logged
Pages: [1]   Go Up