Home of the Squeezebox™ & Transporter® network music players.
Page 2 of 5 FirstFirst 1234 ... LastLast
Results 11 to 20 of 43
  1. #11
    Senior Member
    Join Date
    Mar 2017
    Posts
    2,592
    Quote Originally Posted by mherger View Post
    /(?<!\s),(?!\s)/
    I was about to say...

    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.

  2. #12
    Senior Member
    Join Date
    Mar 2017
    Posts
    2,592
    Quote Originally Posted by mherger View Post
    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.

  3. #13
    Senior Member
    Join Date
    Feb 2011
    Location
    Cheshire, UK
    Posts
    5,417
    Quote Originally Posted by cpd73 View Post
    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
    VB2.4 storage QNAP TS419p (NFS)
    Living Room Joggler & Pi4/Khadas -> Onkyo TXNR686 -> Celestion F20s
    Office Joggler & Pi3 -> Denon RCD N8 -> Celestion F10s
    Dining Room SB Boom
    Kitchen UE Radio (upgraded to SB Radio)
    Bedroom (Bedside) Pi Zero+DAC ->ToppingTP21 ->AKG Headphones
    Bedroom (TV) & Bathroom SB Touch ->Denon AVR ->Mordaunt Short M10s + Kef ceiling speakers
    Guest Room Joggler > Topping Amp -> Wharfedale Modus Cubes
    Everything controlled by iPeng & Material on iOS

  4. #14
    Senior Member
    Join Date
    Feb 2011
    Location
    Cheshire, UK
    Posts
    5,417
    Sorry to bring up a can of worms gents
    VB2.4 storage QNAP TS419p (NFS)
    Living Room Joggler & Pi4/Khadas -> Onkyo TXNR686 -> Celestion F20s
    Office Joggler & Pi3 -> Denon RCD N8 -> Celestion F10s
    Dining Room SB Boom
    Kitchen UE Radio (upgraded to SB Radio)
    Bedroom (Bedside) Pi Zero+DAC ->ToppingTP21 ->AKG Headphones
    Bedroom (TV) & Bathroom SB Touch ->Denon AVR ->Mordaunt Short M10s + Kef ceiling speakers
    Guest Room Joggler > Topping Amp -> Wharfedale Modus Cubes
    Everything controlled by iPeng & Material on iOS

  5. #15
    Senior Member
    Join Date
    Mar 2017
    Posts
    2,592
    Quote Originally Posted by d6jg View Post
    I’m not saying separate the values as I agree it’s impossible
    I’m saying use a choice of 2 different json calls
    For what? Only the browse by albums allows showing single or multiple album-artists. The status message (for now-playing and queue) always returns the comma-separated list. So, I could only add an option to show all album-artists in browse. I cannot add an option to show first artist, composer, etc, in the queue/now-playing. And I'm not sure there are many who'd have multiple album-artists.

    (Just noticed Material's hover-links in the queue only work for single artist, composer, etc. - which I guess makes sense due to the lack of splitting)
    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.

  6. #16
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,521

    Artist & AlbumArtist - multi values and JSON

    > mherger wrote:
    >> /(?<!\s),(?!\s)/

    >
    > I was about to say...


    Seems to be working as expected for me:

    $ perl -MData:umper -e 'print Dumper(split(/(?<!\s),(?!\s)/, "a, b,c"))'
    $VAR1 = 'a, b';
    $VAR2 = 'c';

    > 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"


    I admittedly don't have any multi-artist albums where one artist had a
    comma in its name. I'm not saying its working correctly in all possible
    cases. But quite obviously it's good enough, as this code hasn't caused
    any complaints in half a decade.

    --

    Michael

  7. #17
    Senior Member
    Join Date
    Feb 2011
    Location
    Cheshire, UK
    Posts
    5,417
    Quote Originally Posted by cpd73 View Post
    For what? Only the browse by albums allows showing single or multiple album-artists. The status message (for now-playing and queue) always returns the comma-separated list. So, I could only add an option to show all album-artists in browse. I cannot add an option to show first artist, composer, etc, in the queue/now-playing. And I'm not sure there are many who'd have multiple album-artists.

    (Just noticed Material's hover-links in the queue only work for single artist, composer, etc. - which I guess makes sense due to the lack of splitting)
    Why would the json call for browsing albums specifically allow for single or multiple album artists if it wasn’t the intention to allow multi-tagging at album level?

    There is a good reason to multi tag album artists since you started Material. If value 1 is your display preference then multi tagging at album artist level gives you a) the correct display when browsing and b) the multiple indexing.

    Multi value tagging at Track artist level gives you the indexing but the display in the queue and now playing is illogical (forgetting any surplus comma issue).

    My queue as I type includes 2 tracks by John Mayall - separate screenshot follows

    The first is from an album multi value tagged at album artist level. The second is from a compilation tagged with the same 3 vales at track artist level
    VB2.4 storage QNAP TS419p (NFS)
    Living Room Joggler & Pi4/Khadas -> Onkyo TXNR686 -> Celestion F20s
    Office Joggler & Pi3 -> Denon RCD N8 -> Celestion F10s
    Dining Room SB Boom
    Kitchen UE Radio (upgraded to SB Radio)
    Bedroom (Bedside) Pi Zero+DAC ->ToppingTP21 ->AKG Headphones
    Bedroom (TV) & Bathroom SB Touch ->Denon AVR ->Mordaunt Short M10s + Kef ceiling speakers
    Guest Room Joggler > Topping Amp -> Wharfedale Modus Cubes
    Everything controlled by iPeng & Material on iOS

  8. #18
    Senior Member
    Join Date
    Feb 2011
    Location
    Cheshire, UK
    Posts
    5,417



    Sent from my iPhone using Tapatalk
    VB2.4 storage QNAP TS419p (NFS)
    Living Room Joggler & Pi4/Khadas -> Onkyo TXNR686 -> Celestion F20s
    Office Joggler & Pi3 -> Denon RCD N8 -> Celestion F10s
    Dining Room SB Boom
    Kitchen UE Radio (upgraded to SB Radio)
    Bedroom (Bedside) Pi Zero+DAC ->ToppingTP21 ->AKG Headphones
    Bedroom (TV) & Bathroom SB Touch ->Denon AVR ->Mordaunt Short M10s + Kef ceiling speakers
    Guest Room Joggler > Topping Amp -> Wharfedale Modus Cubes
    Everything controlled by iPeng & Material on iOS

  9. #19
    Senior Member
    Join Date
    Feb 2011
    Location
    Cheshire, UK
    Posts
    5,417
    Quote Originally Posted by d6jg View Post



    Sent from my iPhone using Tapatalk
    NB The artist link from track 2 in the queue takes you to the first named artist I.e. value 1. The whole string is the same link
    VB2.4 storage QNAP TS419p (NFS)
    Living Room Joggler & Pi4/Khadas -> Onkyo TXNR686 -> Celestion F20s
    Office Joggler & Pi3 -> Denon RCD N8 -> Celestion F10s
    Dining Room SB Boom
    Kitchen UE Radio (upgraded to SB Radio)
    Bedroom (Bedside) Pi Zero+DAC ->ToppingTP21 ->AKG Headphones
    Bedroom (TV) & Bathroom SB Touch ->Denon AVR ->Mordaunt Short M10s + Kef ceiling speakers
    Guest Room Joggler > Topping Amp -> Wharfedale Modus Cubes
    Everything controlled by iPeng & Material on iOS

  10. #20
    Senior Member
    Join Date
    Mar 2017
    Posts
    2,592
    Quote Originally Posted by d6jg View Post
    Why would the json call for browsing albums specifically allow for single or multiple album artists if it wasn’t the intention to allow multi-tagging at album level?
    Why would I know? I did not design the API, but if you look at the API docs (http:// SERVER:9000/Default/html/docs/cli-api.html) you will see that the "albums" command supports "a" and "aa" in "tags" - allowing to show one or all.

    Quote Originally Posted by d6jg View Post
    Multi value tagging at Track artist level gives you the indexing but the display in the queue and now playing is illogical (forgetting any surplus comma issue).
    That display is from LMS. As it uses a comma-separated string I cannot effectively split. (And, contrary to what Michael said, they are "<comma><space>" separated) As stated, if an artist has a comma ( "Earth, Wind, and Fire") it will break. If LMS used an array of strings then this wouild be a non-issue.
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •