Thank you for your reply.

I am using the LMS Command Line interface to access my server via an iOS
app. 

Specifically I am using the Plugins command to browse and play radio
stations and Spotify via the Spotty and Radio plugins. 

Browsing radio stations I would issue a request like:


Code:
--------------------
    {
        "id": "1",
        "params": ["b8:27:eb:6f:cb:50", ["local", "items", "0", "want_url:1", 
"item_id:4bcbd38a.0.6"]],
        "method": "slim.request"
  }
--------------------


And receive a response like:


Code:
--------------------
    {
        "method": "slim.request",
        "params": ["b8:27:eb:6f:cb:50", ["local", "items", "0", "want_url:1", 
"item_id:4bcbd38a.0.6"]],
        "result": {
                "count": 1,
                "loop_loop": [{
                        "id": "4bcbd38a.0.6",
                        "name": "91.1 | MPR News (US News)",
                        "isaudio": 1,
                        "now_playing_id": "s34350",
                        "image": 
"http://cdn-profiles.tunein.com/s34350/images/logoq.png";,
                        "formats": "mp3",
                        "guide_id": "s34350",
                        "bitrate": "128",
                        "preset_id": "s34350",
                        "item": "station",
                        "type": "audio",
                        "reliability": "98",
                        "url": 
"http://opml.radiotime.com/Tune.ashx?id=s34350&formats=aac,ogg,mp3&partnerId=16&serial=c1da3ec8d836625ee72ead10502a9cea";,
                        "genre_id": "g3124",
                        "value": 
"http://opml.radiotime.com/Tune.ashx?id=s34350&formats=aac,ogg,mp3&partnerId=16&serial=c1da3ec8d836625ee72ead10502a9cea";,
                        "subtext": "Discovering what matters.",
                        "is_preset": "true"
                }]
        },
        "id": "1"
  }
--------------------


To add that radio station to my favorites I would issue the following
request:


Code:
--------------------
    {
        "params": ["b8:27:eb:6f:cb:50", ["favorites", "add", "title:91.1 | MPR 
News (US News)", 
"url:http:\/\/opml.radiotime.com\/Tune.ashx?id=s34350&formats=aac,ogg,mp3&partnerId=16&serial=c1da3ec8d836625ee72ead10502a9cea",
 "item_id:3.0"]],
        "method": "slim.request",
        "id": "1"
  }
--------------------


Passing the required parameters, title, url and item_id.

I would like to do the same for Spotify items, playlists albums and
individual tracks. However the responses I receive when navigating the
Spotify items does not return an URL even if the "want_url:1" parameter
is specified.

For example a request:


Code:
--------------------
    {
        "params": ["b8:27:eb:6f:cb:50", ["spotty", "items", "0", "want_url:1", 
"item_id:5.70"]],
        "id": "1",
        "method": "slim.request"
  }
  
--------------------


This is the response:


Code:
--------------------
    {
        "id": "1",
        "method": "slim.request",
        "result": {
                "title": "Wicked Game by Ursine Vulpine",
                "loop_loop": [{
                        "id": "5.70.0",
                        "name": "1. Wicked Game by Ursine Vulpine, Annaca from 
Wicked Game",
                        "image": 
"/imageproxy/https%3A%2F%2Fi.scdn.co%2Fimage%2Fab67616d0000b273b1407a52560b699b7e3fbb58/image.png",
                        "isaudio": 1,
                        "hasitems": 1
                }, {
                        "id": "5.70.1",
                        "name": "Add album to library",
                        "isaudio": 0,
                        "hasitems": 1
                }, {
                        "id": "5.70.2",
                        "name": "Artist: Annaca",
                        "image": "plugins/Spotty/html/images/account.png",
                        "isaudio": 0,
                        "hasitems": 1
                }, {
                        "id": "5.70.3",
                        "name": "Artist: Ursine Vulpine",
                        "image": "plugins/Spotty/html/images/account.png",
                        "isaudio": 0,
                        "hasitems": 1
                }, {
                        "id": "5.70.4",
                        "name": "Year: 2016",
                        "type": "text",
                        "isaudio": 0,
                        "hasitems": 0
                }],
                "count": 5
        },
        "params": ["b8:27:eb:6f:cb:50", ["spotty", "items", "0", "want_url:1", 
"item_id:5.70"]]
  }
--------------------


In this cannot use the "Favorites add" command because I do not have a
URL.

I might be crazy but I believe I was able to add Spotify items to my
favorites, using this approach a few weeks ago.

By the way thank you for all your work in keeping the
SlimDevices/SqueezeBox/LMS eco system alive.



SlimDevices SqueezeBox V3
SqueezeBox Boom
SqueezeBox Touch
------------------------------------------------------------------------
louisvanwijk's Profile: http://forums.slimdevices.com/member.php?userid=63405
View this thread: http://forums.slimdevices.com/showthread.php?t=112320

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to