Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 10 of 10
  1. #1
    Senior Member
    Join Date
    Aug 2012
    Location
    Austria
    Posts
    622

    albums API request - compilation result issue

    I'm sending this JSON RPC request to LMS:
    Code:
    {"id":1,"method":"slim.request","params":["-",["albums",0,999999,"tags:lyiwaSSaaS"]]}
    to get all albums.
    For regular albums, the results are fine:
    Code:
    {
        "compilation": 0,
        "artist_ids": "29078",
        "album": "At Mount Zoomer",
        "artists": "Wolf Parade",
        "artist": "Wolf Parade",
        "year": 2008,
        "artist_id": 29078,
        "id": 43150
    }
    For compilations, however, no artist_ids and artists are returned:
    Code:
    {
        "id": 42708,
        "artist": "Various Artists",
        "artist_id": 24841,
        "album": "A Tribute To Current 93",
        "compilation": 1,
        "year": 2003
    }
    In the API doc, it's mentioned that these values "depend on server configuration", however, not which one(s) and how.
    What do I need to change to get these fields?

  2. #2
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    19,746

    albums API request - compilation result issue

    Sounds like a bug. What LMS version & revision are you using?

    --

    Michael

  3. #3
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    19,746

    albums API request - compilation result issue

    Ok, this is not an accidental bug, but expected behaviour. Almost three
    years ago there was a commit to specifically cause this behaviour:

    https://github.com/Logitech/slimserv...77fe66bf653ec2

    That said I question whether it should return no value for those fields
    at all. It should probably at least return the same value as artist and
    artist_id (like in your first example), but for the VA object only. What
    do you think?
    --

    Michael

  4. #4
    Senior Member
    Join Date
    Aug 2012
    Location
    Austria
    Posts
    622
    Quote Originally Posted by mherger View Post
    Ok, this is not an accidental bug, but expected behaviour. Almost three
    years ago there was a commit to specifically cause this behaviour:

    https://github.com/Logitech/slimserv...77fe66bf653ec2

    That said I question whether it should return no value for those fields
    at all. It should probably at least return the same value as artist and
    artist_id (like in your first example), but for the VA object only. What
    do you think?
    TBH, I don't quite understand why it shouldn't return artists for compilations in the first place if the request specifically asks for them.
    If the caller doesn't want them, they are simple to discard (since the compilation flag is set), while the reverse isn't true.
    Is there any other way to get this information (the app I'm writing imports artists and albums into a local DB, and I need the artists IDs to look up albums (including compilations) by artists) ?

  5. #5
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    19,746

    albums API request - compilation result issue

    > TBH, I don't quite understand why it shouldn't return artists for
    > compilations in the first place if the request specifically asks for
    > them.


    Tried to find the discussion, but couldn't find it. Teaches me to better
    comment on commits :-(.

    > Is there any other way to get this information (the app I'm writing
    > imports artists and albums into a local DB, and I need the artists IDs
    > to look up albums (including compilations) by artists) ?


    Get the artists information with an additional tracks query on
    compilations?...

    tracks 0 999 album_id:9999 tracks:aAsSxyz

    A and S would return list of IDs for the various roles, like eg.
    "albumartist" and "trackartist".

    --

    Michael

  6. #6
    Senior Member pippin's Avatar
    Join Date
    Oct 2007
    Location
    Berlin
    Posts
    14,087
    I think there must be a way, e.g. through the artist roles.
    I think Iĺve always had artists returned with albums albeit there has been endless discussion about what is the right one in certain cases etc.
    Are you sure there are artist roles for an album?
    ---
    learn more about iPeng, the iPhone and iPad remote for the Squeezebox and
    Logitech UE Smart Radio as well as iPeng Party, the free Party-App,
    at penguinlovesmusic.com
    New: iPeng 9, the Universal App for iPhone, iPad and Apple Watch

  7. #7
    Senior Member
    Join Date
    Aug 2012
    Location
    Austria
    Posts
    622
    Quote Originally Posted by mherger View Post
    Get the artists information with an additional tracks query on compilations?...

    tracks 0 999 album_id:9999 tracks:aAsSxyz

    A and S would return list of IDs for the various roles, like eg.
    "albumartist" and "trackartist".
    Since the app queries for all albums, this would potentially require sending thousands of additional queries, so I don't think this is an option.
    At this point, the only idea I have is to do this in a plugin (extGUI4LMS already has such a function), but then users would have to install an additional plugin - not very user friendly...

  8. #8
    Senior Member pippin's Avatar
    Join Date
    Oct 2007
    Location
    Berlin
    Posts
    14,087
    I canĺt check right now what the difference is but there needs to be another way.
    In iPeng i always get an artist with Compilations
    ---
    learn more about iPeng, the iPhone and iPad remote for the Squeezebox and
    Logitech UE Smart Radio as well as iPeng Party, the free Party-App,
    at penguinlovesmusic.com
    New: iPeng 9, the Universal App for iPhone, iPad and Apple Watch

  9. #9
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    19,746

    albums API request - compilation result issue

    > In iPeng i always get an artist with Compilations

    An artist yes, but not the artists list (tag artists with an S at the
    end), or the artists_ids?

    --

    Michael

  10. #10
    Senior Member pippin's Avatar
    Join Date
    Oct 2007
    Location
    Berlin
    Posts
    14,087
    Ah, ok, i misread that and I only read those for tracks
    ---
    learn more about iPeng, the iPhone and iPad remote for the Squeezebox and
    Logitech UE Smart Radio as well as iPeng Party, the free Party-App,
    at penguinlovesmusic.com
    New: iPeng 9, the Universal App for iPhone, iPad and Apple Watch

Posting Permissions

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