Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Jun 2014
    Posts
    9

    How to get extid in e.g the albums list using the SqueezePlay interface

    That is: https://wiki.slimdevices.com/index.p...Play_interface

    In the Squeezer we would like to implement an visual identification of which service an album belongs. This to be able to distinguish them, because the albums lists returns albums from both local music as well as any connected music service.

    However I can't find a way to get that information using the SqueezePlay interface.

    Is that even possible, or is there an alternative?

    To explain further I'm aware that you can get the extid from the "artists", "albums" and "titles" queries. We don't hardcode these in Squeezer. Instead we request the home menu like this:
    Code:
    ["menu","0","512","direct:1"]]
    and use the returned results to go to each menu. For the album list this would be something like:
    Code:
    ["browselibrary","items","0","512","mode:albums","useContextMenu:1","menu:1"]]

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

    How to get extid in e.g the albums list using theSqueezePlay interface

    > --------------------
    > ["browselibrary","items","0","512","mode:albums","u seContextMenu:1","menu:1"]]
    > --------------------


    The browselibrary commands use the 'E' flag to get external ids. What
    would be the result for such a query when returning an external item?

  3. #3
    Junior Member
    Join Date
    Jun 2014
    Posts
    9
    Quote Originally Posted by mherger View Post
    > --------------------
    > ["browselibrary","items","0","512","mode:albums","u seContextMenu:1","menu:1"]]
    > --------------------


    The browselibrary commands use the 'E' flag to get external ids. What
    would be the result for such a query when returning an external item?
    Thanks for the quick response.

    I'm not sure I understand what you mean, but I'll give it a try. Please let me know if you meant something else.

    In the item loop of the response we get e.g. these items which can't be distinguished except for the album id:
    Code:
              {
                icon-id: 7cc06c01
                commonParams: {
                  album_id: 372
                }
                presetParams: {
                  favorites_type: playlist
                  icon: music/7cc06c01/cover
                  favorites_url: db:album.title=21
                  favorites_title: 21
                }
                icon: music/7cc06c01/cover
                text: 21
        Adele
                type: playlist
                textkey: 2
              }
              {
                icon-id: a6b85953
                commonParams: {
                  album_id: 4
                }
                presetParams: {
                  favorites_type: playlist
                  icon: music/a6b85953/cover
                  favorites_url: db:album.title=21
                  favorites_title: 21
                }
                icon: music/a6b85953/cover
                text: 21
        Adele
                type: playlist
                textkey: 2
              }
    If I get e.g:
    Code:
    extid: deezer
    in the json object for an item, I would be able to display an icon of the music service for the item.

  4. #4
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,666
    You're right! We don't expose the extid in the menu queries... Could you please give the following change a try and see whether you'd get something then?

    Code:
    diff --git a/Slim/Control/XMLBrowser.pm b/Slim/Control/XMLBrowser.pm
    index 6d338a670..2c528384e 100644
    --- a/Slim/Control/XMLBrowser.pm
    +++ b/Slim/Control/XMLBrowser.pm
    @@ -1160,6 +1160,10 @@ sub _cliQuery_done {
                                                            $hash{'action'} = 'none';
                                                    }
     
    +                                               if ( $item->{extid} ) {
    +                                                       $hash{extid} = $item->{extid};
    +                                               }
    +
                                                    if ( $item->{type} && $item->{type} eq 'localservice' ) {
                                                            $hash{'actions'} = {
                                                                    go => {
    Michael

    "It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
    (LMS: Settings/Information)

  5. #5
    Junior Member
    Join Date
    Jun 2014
    Posts
    9
    Quote Originally Posted by mherger View Post
    You're right! We don't expose the extid in the menu queries... Could you please give the following change a try and see whether you'd get something then?
    That works thank you!

    I now get this:
    Code:
              {
                icon-id: 7
        cc06c01
                commonParams: {
                  album_id: 1478
                }
                presetParams: {
                  favorites_type: playlist
                  icon: music/7cc06c01/cover
                  favorites_title: 21
                  favorites_url: db:album.title=21
                }
                icon: music/7cc06c01/cover
                text: 21
        Adele
                extid: deezer:album:746059
                type: playlist
                textkey: 2
              }
              {
                icon-id: e9ef14ba
                presetParams: {
                  favorites_type: playlist
                  icon: music/e9ef14ba/cover
                  favorites_url: db:album.title=21
                  favorites_title: 21
                }
                commonParams: {
                  album_id: 984
                }
                icon: music/e9ef14ba/cover
                text: 21
        Adele
                type: playlist
                textkey: 2
              }

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

    How to get extid in e.g the albums list using theSqueezePlay interface

    > That works thank you!

    Ok, should be in 8.3 now. Thanks!

Posting Permissions

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