There is a notable difference between Material and Default when browsing by album. Essentially the difference is that Material uses a json call that returns only the first value for AlbumArtist where the tag / database contains multi values.
Default shows all values.
This is a display difference only but a very welcome one (to me) as I use multi value tagging to index albums against multiple artists but don’t wish to see all of these artists when browsing.
I had thought that the json call was returning an array and that by accident of design Craig was extracting value 1 only but it seems this is not the case. The json returns value 1 only.
My question - is there a similar json call available at Artist level such that (optionally) only value 1 could be displayed in the Queue and Now Playing areas.
Here Craig has confirmed that the call used in Material returns a comma separated list of all values rather than simply value 1. It is not possible to extract value 1 as it itself may contain a ,
You will gather that in the case of compilation albums I use multi values at Artist level to achieve the indexing I’m looking for but it causes a display issue.
I should add that others have stated they like to see all values at Artist level in Queue and Now Playing so we need 2 calls available which can be switchable inside Material.
> This is a display difference only but a very welcome one (to me) as I
> use multi value tagging to index albums against multiple artists but
> don’t wish to see all of these artists when browsing.
Where would you see multiple artists in the default skin? In the albums
view I only have one artist (the album artist) even if I tag tracks with
multiple artists.
> I had thought that the json call was returning an array and that by
> accident of design Craig was extracting value 1 only but it seems this
> is not the case. The json returns value 1 only.
What's the exact query Material uses?
> I should add that others have stated they like to see all values at
> Artist level in Queue and Now Playing so we need 2 calls available which
> can be switchable inside Material.
If the default UI shows multiple artists, then Material can, too.
--
Michael
Michael
"It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
(LMS: Settings/Information)
> This is a display difference only but a very welcome one (to me) as I
> use multi value tagging to index albums against multiple artists but
> don’t wish to see all of these artists when browsing.
Where would you see multiple artists in the default skin? In the albums
view I only have one artist (the album artist) even if I tag tracks with
multiple artists.
> I had thought that the json call was returning an array and that by
> accident of design Craig was extracting value 1 only but it seems this
> is not the case. The json returns value 1 only.
What's the exact query Material uses?
> I should add that others have stated they like to see all values at
> Artist level in Queue and Now Playing so we need 2 calls available which
> can be switchable inside Material.
If the default UI shows multiple artists, then Material can, too.
--
Michael
I’ll post screenshots etc a bit later but it’s the other way round.
Where would you see multiple artists in the default skin? In the albums
view I only have one artist (the album artist) even if I tag tracks with
multiple artists.
There might be other places, but if you look in 'New Music' then the Default UI shows all album-artists for an album, Material shows just one.
If the default UI shows multiple artists, then Material can, too.
Material does for queue and now-playing, just not in browse. In the queue you see all artists comma-separated. This, however, is as its passed by LMS. I think the query was about showing just the main artist. As LMS uses a comma separated list then a client cannot split this list - as you can't be sure the comma is a separator, or is part of an (unlikely) artist name.
(Note, I have no issue with the current LMS responses - I'm just answering the above)
Material debug: 1. Launch via http: //SERVER:9000/material/?debug=json (Use http: //SERVER:9000/material/?debug=json,cometd to also see update messages, e.g. play queue) 2. Open browser's developer tools 3. Open console tab in developer tools 4. REQ/RESP messages sent to/from LMS will be logged here.
Material does for queue and now-playing, just not in browse. In the queue you see all artists comma-separated. This, however, is as its passed by LMS. I think the query was about showing just the main artist. As LMS uses a comma separated list then a client cannot split this list - as you can't be sure the comma is a separator, or is part of an (unlikely) artist name.
(Note, I have no issue with the current LMS responses - I'm just answering the above)
Craig’s explanation is correct.
IF you tag AlbumArtist on a multi value basis under Albums & New Music Material shows value 1 only. It is always the first value entered in your tagging. Presumably the scanner inputs them in the same order.
In default all values are shown.
The way Material displays it is logical (to me). The Json call Craig refers to pulls on value 1.
The other values are used for indexing only and this approach indexes the album under all of the values in AlbumArtist.
I do not use multi values at Artist level except for compilation albums. Here if I use multiple values for a given track the indexing is also correct but both Material & Default put all values into the Queue & Now Playing areas.
From my perspective (but not others) I’d like to see value 1 only at Queue & Now Playing level.
Is there a json call that does this and if it does exist can it be a switchable display option in Material?
Do you now need screenshots Michael or is this clearer?
> As LMS uses a comma separated list then a client cannot split this list
> - as you can't be sure the comma is a separator, or is part of an
> (unlikely) artist name.
I'm surprised this hasn't lead to issues before! TBH I don't even fully
understand the regex I'm using for the splitting:
/(?<!\s),(?!\s)/
I'd have to look it up!... but I believe it does some backtracking to
filter out commas with whitespace around them or something.
--
Michael
Michael
"It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
(LMS: Settings/Information)
> As LMS uses a comma separated list then a client cannot split this list
> - as you can't be sure the comma is a separator, or is part of an
> (unlikely) artist name.
I'm surprised this hasn't lead to issues before! TBH I don't even fully
understand the regex I'm using for the splitting:
/(?<!\s),(?!\s)/
I'd have to look it up!... but I believe it does some backtracking to
filter out commas with whitespace around them or something.
--
Michael
If I am reading this correctly then it appears that what I’m asking for isn’t that difficult to achieve at all.
On the unlikely event of commas inside a single tag value I saw (and corrected) one that dbPoweramp offered me only yesterday but I would be quite happy to remove any from my tagging if it proved to be a problem but I’m not sure it would be as I have a feeling that the regex works.
Is a switchable value 1 / all values display option in Q and Now Playing now possible Craig?
> As LMS uses a comma separated list then a client cannot split this list
> - as you can't be sure the comma is a separator, or is part of an
> (unlikely) artist name.
I'm surprised this hasn't lead to issues before! TBH I don't even fully
understand the regex I'm using for the splitting:
/(?<!\s),(?!\s)/
I'd have to look it up!... but I believe it does some backtracking to
filter out commas with whitespace around them or something.
No expert, but I don't see how this could reliable work. If I have ArtistA="a, b" and ArtistB="c", then artists="a, b, c" - no way to split that. into "a, b" and "c" (And, yes I know a comma in an artist name is highly unlikely).
Code:
use Data::Dumper qw(Dumper);
my $str="a, b, c";
my @parts = split /(?<!\s),(?!\s)/, $str;
print Dumper \@parts;
produces:
Code:
$VAR1 = [
'a, b, c'
];
I see no way, looking at songinfo, to just get main composer, artist, etc. i.e. the equivalent of "a"=single album artist, "aa"=all album artists. But, I'm not sure I see this an an issue for the queue/now-playing - there I would want all shown.
Material debug: 1. Launch via http: //SERVER:9000/material/?debug=json (Use http: //SERVER:9000/material/?debug=json,cometd to also see update messages, e.g. play queue) 2. Open browser's developer tools 3. Open console tab in developer tools 4. REQ/RESP messages sent to/from LMS will be logged here.
Is a switchable value 1 / all values display option in Q and Now Playing now possible Craig?
No, because you cannot reliably split the list. You can only split if you assume comma is never in one of the strings - that might break for others. Still, I'm not sure I want extra processing on every queue/song update to process the artist, composer, conductor, and band lists.
The AlbumArtist case in the albums list is easy enough - that is just using a different "tags" parameter.
Material debug: 1. Launch via http: //SERVER:9000/material/?debug=json (Use http: //SERVER:9000/material/?debug=json,cometd to also see update messages, e.g. play queue) 2. Open browser's developer tools 3. Open console tab in developer tools 4. REQ/RESP messages sent to/from LMS will be logged here.
> No expert, but I don't see how this could reliable work. If I have
> ArtistA="a, b" and ArtistB="c", then artists="a, b, c" - no way to split
> that. into "a, b" and "c" (And, yes I know a comma in an artist name is
> highly unlikely).
The artists here would be "a, b,c", and the regex makes sure it splits
on the comma without the spaces. So... it would still fail if your first
artist was "a,b", rather than "a, b". But that's even more unlikely to
happen. Overall it's a hack, but it seems to be working reasonably well :-).
--
Michael
Michael
"It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
(LMS: Settings/Information)
Assuming this is what is used in the default web UI, this does not work. I created an mp3 with artist="a, b;c" - so 2 artists "a, b" and "c". The Default web UI shows "a, b, c" in now-playing/queue, but has hover/underline for "a" and "b" but not "c" - thinking there are 2 artists "a" and "b"
...which is true, but I also noticed the queue has underline for "a, b" and "c". So, queue splits correctly, now-playing does not.
Material debug: 1. Launch via http: //SERVER:9000/material/?debug=json (Use http: //SERVER:9000/material/?debug=json,cometd to also see update messages, e.g. play queue) 2. Open browser's developer tools 3. Open console tab in developer tools 4. REQ/RESP messages sent to/from LMS will be logged here.
The artists here would be "a, b,c", and the regex makes sure it splits
on the comma without the spaces.
Nope, just checked, and for status messages its definitely "a, b, c" - with spaces. But, as I said, in default web UI now-playing does not split correctly queue does.
Material debug: 1. Launch via http: //SERVER:9000/material/?debug=json (Use http: //SERVER:9000/material/?debug=json,cometd to also see update messages, e.g. play queue) 2. Open browser's developer tools 3. Open console tab in developer tools 4. REQ/RESP messages sent to/from LMS will be logged here.
No, because you cannot reliably split the list. You can only split if you assume comma is never in one of the strings - that might break for others. Still, I'm not sure I want extra processing on every queue/song update to process the artist, composer, conductor, and band lists.
The AlbumArtist case in the albums list is easy enough - that is just using a different "tags" parameter.
I’m not saying separate the values as I agree it’s impossible
I’m saying use a choice of 2 different json calls
Example of artist with a ,
Crosby, Stills, Nash & Young
although most would be happy to show it as
Crosby Stills Nash & Young
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, personalize advertising, and to analyze site activity. We may share certain information about our users with our advertising and analytics partners. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment