0

When I updated to version 5.4 I no longer have the option to create a playlist in the "playlists" container, nor to add a track to a playlist already existing in it. In version 5.3 it was working well. I also checked other Music Services on Sonos, same problem. Did anything change in the specifications for User Content Playlists that is not specified in the documentation for Playlist Editing?

This is how I'm adding my User Content container:

$result->mediaCollection[] = array('id'=>'playlists', 'title'=>'My Playlists', 'itemType'=>'favorites', 'containsFavorite'=>true, 'displayType'=>'genreList', 'readOnly'=>false, 'userContent'=>true, 'renameable'=>true, 'albumArtURI'=>PATH.'/img.png');

Edit:
I am using the Android controller (version 5.4, build 29590261) and I am testing on a Play:1 (version 5.4, build 29591030).
I am able to add a song/playlist to an already existing playlist or to a new playlist (by long press on a song to get to the extended metadata, and then "Add Track to 'Service Name' Playlist"), but what I can't figure out how to do is: deleting a playlist, renaming a playlist, and editing songs in a playlist (reorder, delete songs). I don't have a screenshot for version 5.3 but there was an button in the top right corner (three vertical dots) of the playlists container from which one can edit playlists or create new ones (check the screenshots below, from version 5.4). Am I missing something?

The playlists container Long press on the playlists container

Edit 2:
I figured out what is causing the issue. I am using the .wsdl for beta in order to be able to implement Custom Item Display (This is not beta anymore, as I understood from the Adding New SMAPI Features page). When I revert to the normal Sonos.wsdl file from the Sonos Documentation, the info and options button appears again. How can I use Custom Item Display while keeping the info and options button there and all functionalities of playlist editing unchanged?

Note: the Sonos(beta).wsdl was here but it's not available anymore.

Edit 3:
I downloaded the Sonos.wsdl from the Sonos documentation, but I still can't see the button. In order to reproduce the issue, please check the following PHP implementation and Presentation Map XML code:

PHP implementation:

define('BASE_PATH', rtrim("http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']), '/'));

class SonosAPI
{
    public function getMetadata($args)
    {
        $result = new StdClass();
        $result->index = $args->index;
        switch($args->id) {
            case 'root':
                $result->mediaCollection[] = array('id'=>'playlists', 'title'=>'My Playlists', 'itemType'=>'favorites', 'displayType'=>'genreList', 'readOnly'=>false, 'userContent'=>true, 'renameable'=>true, 'albumArtURI'=>BASE_PATH.'/image.png');
                $result->count = $result->total = 1;
                break;
            case 'playlists':
                $result->mediaCollection[] = array('id'=>'123', 'title'=>'Title', 'itemType'=>'playlist', 'displayType'=>'genreList', 'canPlay'=>true, 'readOnly'=>false, 'userContent'=>false, 'renameable'=>true, 'albumArtURI'=>BASE_PATH.'/image.png');
                $result->count = $result->total = 1;
                break;
        }

        return array('getMetadataResult' => $result);
    }

}

$server = new SoapServer("Sonos.wsdl", array('cache_wsdl' => 0)); // disable cache in development
$server->setClass('SonosAPI');

try {
    $server->handle();
} catch (Exception $e) {
    Log("[ERROR] ".$e->getMessage());
}

?>

Presentation Map file:

<?xml version="1.0" encoding="utf-8" ?>
<Presentation>

    <PresentationMap type="DisplayType">
        <DisplayType id="genreGrid">
            <DisplayMode>GRID</DisplayMode>
        </DisplayType>
        <DisplayType id="genreList">
            <DisplayMode>LIST</DisplayMode>
        </DisplayType>
        <DisplayType id="genreHero">
            <DisplayMode>HERO</DisplayMode>
        </DisplayType>
        <DisplayType id="genreEditorial">
            <DisplayMode>EDITORIAL</DisplayMode>
        </DisplayType>
        <DisplayType id="twoLine">
          <Lines>
            <Line token="title"/>
            <Line token="summary"/>
          </Lines>
        </DisplayType>
    </PresentationMap>

</Presentation>

XML response to getMetadata of root (which contains the playlists container):

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:ns1="http://www.sonos.com/Services/1.1" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Body>
      <ns1:getMetadataResponse>
         <ns1:getMetadataResult>
            <ns1:index>0</ns1:index>
            <ns1:count>4</ns1:count>
            <ns1:total>4</ns1:total>
            <ns1:mediaCollection>
               <ns1:id>rootlang:ar</ns1:id>
               <ns1:itemType>collection</ns1:itemType>
               <ns1:displayType>genreGrid</ns1:displayType>
               <ns1:title>Arabic</ns1:title>
               <ns1:albumArtURI>{SOME LINK}</ns1:albumArtURI>
            </ns1:mediaCollection>
            <ns1:mediaCollection>
               <ns1:id>rootlang:en</ns1:id>
               <ns1:itemType>collection</ns1:itemType>
               <ns1:displayType>genreGrid</ns1:displayType>
               <ns1:title>International</ns1:title>
               <ns1:albumArtURI>{SOME LINK}</ns1:albumArtURI>
            </ns1:mediaCollection>
            <ns1:mediaCollection>
               <ns1:id>rootlang:default</ns1:id>
               <ns1:itemType>collection</ns1:itemType>
               <ns1:displayType>genreGrid</ns1:displayType>
               <ns1:title>Arabic + International</ns1:title>
               <ns1:albumArtURI>{SOME LINK}</ns1:albumArtURI>
            </ns1:mediaCollection>
            <ns1:mediaCollection renameable="true" readOnly="false" userContent="true">
               <ns1:id>playlists</ns1:id>
               <ns1:itemType>favorites</ns1:itemType>
               <ns1:displayType>genreList</ns1:displayType>
               <ns1:title>My Playlists</ns1:title>
               <ns1:albumArtURI>{SOME LINK}</ns1:albumArtURI>
            </ns1:mediaCollection>
         </ns1:getMetadataResult>
      </ns1:getMetadataResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

XML response to getMetadata of playlists:

 <?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:ns1="http://www.sonos.com/Services/1.1" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Body>
      <ns1:getMetadataResponse>
         <ns1:getMetadataResult>
            <ns1:index>0</ns1:index>
            <ns1:count>1</ns1:count>
            <ns1:total>1</ns1:total>
            <ns1:mediaCollection renameable="true" readOnly="false" userContent="false">
               <ns1:id>playlist:19663408</ns1:id>
               <ns1:itemType>playlist</ns1:itemType>
               <ns1:displayType>genreList</ns1:displayType>
               <ns1:title>Test Playlist</ns1:title>
               <ns1:canPlay>true</ns1:canPlay>
               <ns1:albumArtURI>{SOME LINK}</ns1:albumArtURI>
            </ns1:mediaCollection>
         </ns1:getMetadataResult>
      </ns1:getMetadataResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
  • I am not seeing any issues with other services with playlist editing. Can you please provide more information about your environment? Controller type being used? Which other services have you tested with? – Keith - Sonos Dev Advocate Jul 27 '15 at 23:40
  • @SonosDeveloperAdvocacy Thank you for your response. I edited the question with some information and clarifications. – wait_for_it Jul 29 '15 at 07:52
  • It looks like your Android controller is on an older software build. If you aren't seeing the info & options button for any service with that controller, uninstall and re-install the the controller from the Play Store on your device. If for any reason you still aren't seeing it after a re-install, submit a diagnostic from that controller (Settings > Advanced Settings > Submit Diagnostics) and let me know what the confirmation number is. – Keith - Sonos Dev Advocate Jul 29 '15 at 17:46
  • I tried to uninstall and re-install the controller several times, the software build did not change, and the issue remained. I submitted a diagnostic, the confirmation number is 4768101. @SonosDeveloperAdvocacy – wait_for_it Jul 30 '15 at 07:22
  • I'm still unable to reproduce this. Do you see the info & options button in Spotify Playlists that you've created? What about on iOS controllers? – Keith - Sonos Dev Advocate Jul 31 '15 at 18:24
  • I can't test on Spotify, but on SoundCloud I don't see it. I can't even add a song to a playlist (I can do that in my app). On Mixcloud, it's the same exact issue that I have. I tried iOS controllers (buil 29591030, version 5.4), the issue remains. I also tested SoundCloud and Mixcloud on my iOS controller, same results. – wait_for_it Aug 03 '15 at 13:18
  • Soundcloud and Mixcloud do not support playlist editing from within the Sonos controller, so it makes sense that you don't see the option for them. The fact that you are also missing the functionality on your iOS controller leads me to believe that you're missing a 'readOnly'=>false somewhere in your playlist implementation which is preventing the option from appearing. – Keith - Sonos Dev Advocate Aug 04 '15 at 13:51
  • Please check the edit. The button appears when using the original Sonos.wsdl so I don't think there's something wrong in the implementation. Thanks again for following up with me on this issue. – wait_for_it Aug 05 '15 at 11:58

1 Answers1

0

Custom Display Types were made available in the most recent production software update. The beta wsdl that you were using is for v5.4 which is now the current production build. Make sure that you are using the production version of the wsdl and you will have info & options and also have access to Custom Display Types (provided they are properly enabled in your service).

However I have confirmed that we do have a bug when using Display Types with playlist containers when playlist editing is enabled. The work around is to removed the displayType node from your root playlist and child playlist containers (all other containers that use displayType do not need to be changed). This work around has been tested and works. We have opened an issue to track this internally.

  • I still can't get it to work. I downloaded the production wsdl and replaced it, the issue remains. I made sure that I am enabling "User Content Playlists" also. Please check the edit. – wait_for_it Aug 07 '15 at 08:30
  • Anything new regarding this? @SonosDeveloperAdvocacy I'm still unable to see the Info & Options for playlists when using the newest Sonos.wsdl from the documentation – wait_for_it Aug 13 '15 at 09:33
  • I checked Spotify, the button is available in their playlists folder. However, I don't think they are using Custom Item Display as only the Artist container has a grid view (on mobile controllers). @SonosDeveloperAdvocacy – wait_for_it Aug 13 '15 at 13:19
  • If you take out the custom display types can you get playlist editing to work? Can you please provide the xml that you return for a getMetadata that contains the playlist parent folder? This information will help us further troubleshoot this issue with you. – Keith - Sonos Dev Advocate Aug 17 '15 at 13:13
  • In fact, reverting to the OLD wsdl is enough for me to get playlist editing to work @SonosDeveloperAdvocacy – wait_for_it Aug 19 '15 at 14:03
  • This is the .wsdl file using which I can see the Info and Options button and edit playlists properly (but without Custom Display): https://drive.google.com/file/d/0B3Mc0tLVsktyTy16QzZRZG1pQ0E/view?usp=sharing @SonosDeveloperAdvocacy It was available before the 5.4 release – wait_for_it Aug 19 '15 at 14:31
  • Thank you for posting the xml above. I'm still looking into this and attempting to reproduce on my side. If you remove the displayType nodes from your two playlist containers, are you able to reproduce the issue? – Keith - Sonos Dev Advocate Aug 19 '15 at 18:40
  • When I remove the displayType node from playlists, I get an error "Unable to browse music". I tried this with a presentation map file containig DisplayType as above, and not containing it (All of this using the newest Sonos.wsdl). – wait_for_it Aug 20 '15 at 07:13