Author Topic: "Track Artist" column  (Read 8778 times)

ksvane

  • Guest
I'd like a column similar to the "Track Artist" column in foobar, that only displays the artist if it is not identical to the album aritst... in my aesthetic opinion it looks less overwhelming.

In Media Center this can be done by setting up a custom tag, using the expression If(isequal([artist],[album artist (auto)]),/ ,[artist]) - I tried doing that as well in MB:
If(isequal(<artist>,<album artist>),/ ,<artist>)
but it seems it can't be done... (perhaps I'm doing it wrong?)

ma_t14

  • Sr. Member
  • ****
  • Posts: 2493
I've been thinking about this and I can't see a way to do this currently but...

Another idea is to ask boroda to enhance the "copy tag..." command in his plugin to include an option to copy the tag only if it has multiple artists.

Then you can use it to copy the multi-artist tags to a custom tag and then using the null function you can easily accomplish what you want

Just saying  ::)

or

Maybe if you can find a way to filter only multi-artist songs (what about the word "feat" but that is assuming that all tracks with multiple artists contain the word "feat")
Last Edit: September 11, 2011, 04:29:21 PM by ma_t14

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34362
i've added support for conditional expressions in the naming templates

<isnull(<field>,true value,false value)>
<if(<field>=value,true value,false value)>
where value is an aggregation of fields,text or another function
eg.
<if(<artist>=<album artist>,,<artist>)>
<if(<artist>=<album artist>,,<isnull(<artist>,No Artist!,<artist>)>)>

still needs some more testing though
Last Edit: October 04, 2011, 10:57:44 PM by Steven

Greb

  • Guest
This is a really nice one. Could you post a link?

ksvane

  • Guest
Thanks a million, Stevie!! ;D

Could you post a link? [2]

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34362
here you go:
http://www.mediafire.com/?ydnk3h9gk6t4hv6

<Left(<field>,n)>
returns the left n characters of a field value eg. <Left(<Artist>,1)> will return K for artist Kele

<Pad(<field>,n)>
pads a numeric field value to n digits eg. <Pad(<Track#>,3)> will pad track number 6 as 006

<IsNull(<field>,true-value,false-value)>
evaluates whether a field is null and if null, displays true-value otherwise false-value. A value can be text, a field or a combination
eg. <IsNull(<Year>,<Album>,<Album> - <Year>)>

<If(<field>=value,true-value,false-value)>
evaluates whether a field matches a value. A value can be text, a field or a combination
eg. <If(<Artist>=<Album Artist>,,<Artist>)> would return blank if the artist was the same as the album artist


additionally <#> is now supported in virtual fields, where <#> is the position in a playlist. It only makes sense to use the virtual field in a playlist and will display an undefined number when used in other contexts.
eg. you might want to define a virtual field for the now playing list to combine # and track title:
<Pad(<#>,2)> - <Title>
Last Edit: October 05, 2011, 07:03:13 PM by Steven

Greb

  • Guest
Doesn't work. It throws a nullReferenceException.

I went back to .85 version and it keeps throwing the exception.
Last Edit: October 06, 2011, 12:05:13 AM by Greb

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34362
you need to post the error and say what you were doing when the error happened for me to do something about it but it might be quicker to send your settings file which is located in:
c:\user\<your id>\AppData\Roaming\MusicBee\musicbeesettings.ini
Last Edit: October 06, 2011, 07:00:18 AM by Steven


Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34362
i wont be able to look at it tonight - i'm not sure if you are saying you cannot start up MB or if its happening afterwards. You might rename MusicBeeSettings.ini to something else, so you will loose your settings but should be able to use MB

Greb

  • Guest
I tried it when I sent the file. I doesn't work.

I have another folder with a whole copy of MusicBee (something useful when you're installing betas) and it didn't work too, even when I didn't apply this last file there. Both of them are running as portables.

Sorry I forgot to mention.

I tried to repair with the musicbee installer after sending the file. No way too. Weird.

ksvane

  • Guest
<if(<artist>=<album artist>,,<artist>)> works for me! Might try others out later. Thanks!

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34362
greb, it sounds like something else might be going on. Maybe its simply a case of rebooting your machine. But before you do that can you post the error (or better email me the errorlog.dat file in the same folder as the settings)

Greb

  • Guest
Finally I found where was the problem. MusicBee was initially installed in my computer having spanish as regional option.

But I was having problems with some code using the english dates format (mm/dd/yyyy instead of dd/mm/yyyy). So I changed temporally to USA as regional option.

Later, and before any MusicBee restart, I installed the new beta, so I thought the problem was the beta. But it was the different regional option.

So I only have to go back to spain as regional option, start MB, and then go to USA as regional option again. And everything works OK.

Greb

  • Guest
Tested with:

<IsNull(<Track#>,<If(<Artist>=<Album Artist>,•  <Title>  [<Time>],•  <Artist>  /  <Title>  [<Time>])>,<If(<Artist>=<Album Artist>,<Track#>  <Title>  [<Time>],<Track#>  <Artist>  /  <Title>  [<Time>])>)>

And for the compact view

<IsNull(<Track#>,<If(<Artist>=<Album Artist>,<Pad(<#>,3)>.  <Left(<Album>,5)>  /  •  <Title>  [<Time>],<Pad(<#>,3)>.  <Left(<Album>,5)>  /  •  <Artist>  /  <Title>  [<Time>])>,<If(<Artist>=<Album Artist>,<Pad(<#>,3)>.  <Left(<Album>,5)>  /  <Track#>  <Title>  [<Time>],<Pad(<#>,3)>.  <Left(<Album>,5)>  /  <Track#>  <Artist>  /  <Title>  [<Time>])>)>

It works great  :)
Last Edit: October 06, 2011, 10:59:07 AM by Greb