10-15-2018, 08:38 PM
Even though we are having some troubles with the driver, I was wanting to update my system with a command you added after I built my templates that allowed you to create a stringlist of Favorites stored and display them.  I already do that with Playlists.  The link here I thinks describes how kfly did it, but his photos are no longer visible:  
https://www.charmedquark.com/vb_forum/sh...718&page=3
The help was even more confusing (at least to me) as it looks like the same command to show Playlists is what is to be used as for Favorites.  I see in the string list that is returned that there are some entries at the end that are "SQ:2", "SQ:3", etc.  Are those the items that are the Favorites, or is the documentation below incorrect and there is a different command to show the Favorites.
In the end, what I want to know is how I can get the Sonos Favorites into a list browser?  I think I can handle the commands to invoke it.
https://www.charmedquark.com/vb_forum/sh...718&page=3
The help was even more confusing (at least to me) as it looks like the same command to show Playlists is what is to be used as for Favorites.  I see in the string list that is returned that there are some entries at the end that are "SQ:2", "SQ:3", etc.  Are those the items that are the Favorites, or is the documentation below incorrect and there is a different command to show the Favorites.
In the end, what I want to know is how I can get the Sonos Favorites into a list browser?  I think I can handle the commands to invoke it.
Code:
Backdoor Commands
This driver supports some backdoor commands you can send via Devices::QueryDrvText:
Playlists
ID=ListQuery, Value=PLList
This query will return a pair of quoted comma lists, separated by a new line. You can use the SetDblBrowserList command on a static list browser to load this list up into a list browser widget. The first list is the one that will be visible and will be the names of the available playlists. The second list is stored in the background for each visible list item and holds the Sonos specific ids for the playlists. Be sure to use the "^1" formatter when you pass in the list to the list browser, i.e:
           Devices::QueryDrvText(MySonosMoniker, ListQuery, PLList, LVar:PLLists)
           MyListBrowser::SetDblBrowserList(%(LVar:PLLists, "^1"))
           
This insures that the newline that separates the two lists doesn't get messed up by the standard processing that is done to parameters. The ^1 indicates that the expanded variable's value should not be further processed on the way into the SetDlbBrowserList command.
Favorites
           ID=ListQuery, Value=PLList
           
This will return a single quoted command list, with the names of the currently configured favorites. Using the PlayFavorite command (of the InvokeCmd field below), you can pass back in one of these names to start a favorite playing. You can load up this list into a list browser to let the user make a selection.