{"action":"created","issue":{"url":"https://api.github.com/repos/dirkgroenen/mopidy-mopify/issues/70","labels_url":"https://api.github.com/repos/dirkgroenen/mopidy-mopify/issues/70/labels{/name}","comments_url":"https://api.github.com/repos/dirkgroenen/mopidy-mopify/issues/70/comments","events_url":"https://api.github.com/repos/dirkgroenen/mopidy-mopify/issues/70/events","html_url":"https://github.com/dirkgroenen/mopidy-mopify/issues/70","id":59332474,"number":70,"title":"Playlists only load properly on new connection to spotify","user":{"login":"xbow","id":4482104,"avatar_url":"https://avatars.githubusercontent.com/u/4482104?v=3","gravatar_id":"","url":"https://api.github.com/users/xbow","html_url":"https://github.com/xbow","followers_url":"https://api.github.com/users/xbow/followers","following_url":"https://api.github.com/users/xbow/following{/other_user}","gists_url":"https://api.github.com/users/xbow/gists{/gist_id}","starred_url":"https://api.github.com/users/xbow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xbow/subscriptions","organizations_url":"https://api.github.com/users/xbow/orgs","repos_url":"https://api.github.com/users/xbow/repos","events_url":"https://api.github.com/users/xbow/events{/privacy}","received_events_url":"https://api.github.com/users/xbow/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-02-28T08:24:30Z","updated_at":"2015-03-04T08:50:56Z","closed_at":"2015-03-04T08:50:56Z","body":"At first, playlist loading didn't seem to work at all, but I was able to pin it down to the following behavior:\r\nMy playlists load properly only if the web client was disconnected from spotify, and the browser was restarted, and a new connection to spotify is established manually. They do not load when I re-open mopify in an existing browser session or when I start a new browser session in which mopify automatically re-connects to spotify because it remembers the settings. So I need to disconnect spotify, restart the browser, and reconnect every time. \r\n\r\nThis behavior was observed on two different Windows (7 and 8) PCs with Firefox as well as Chrome. Mopify runs on a Raspberry Pi in the local network. I have around 100 playlists, but they load very quickly when they do. \r\n\r\nI also noticed that when the playlists do not load, the images used by the mopify UI are loaded properly. When the playlists do load, the images only appear AFTER the playlists are fetched. This may be an indication of what is happening... (or not happening)"},"comment":{"url":"https://api.github.com/repos/dirkgroenen/mopidy-mopify/issues/comments/77118215","html_url":"https://github.com/dirkgroenen/mopidy-mopify/issues/70#issuecomment-77118215","issue_url":"https://api.github.com/repos/dirkgroenen/mopidy-mopify/issues/70","id":77118215,"user":{"login":"xbow","id":4482104,"avatar_url":"https://avatars.githubusercontent.com/u/4482104?v=3","gravatar_id":"","url":"https://api.github.com/users/xbow","html_url":"https://github.com/xbow","followers_url":"https://api.github.com/users/xbow/followers","following_url":"https://api.github.com/users/xbow/following{/other_user}","gists_url":"https://api.github.com/users/xbow/gists{/gist_id}","starred_url":"https://api.github.com/users/xbow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xbow/subscriptions","organizations_url":"https://api.github.com/users/xbow/orgs","repos_url":"https://api.github.com/users/xbow/repos","events_url":"https://api.github.com/users/xbow/events{/privacy}","received_events_url":"https://api.github.com/users/xbow/received_events","type":"User","site_admin":false},"created_at":"2015-03-04T08:50:56Z","updated_at":"2015-03-04T08:50:56Z","body":"Yes, mopidy works as it should when started from the console, it shows 110 playlists load. I also have no problems browsing and listening with the musicbox_webclient or MPD clients. \r\n\r\nThe /music/tracklist pages also work as they should. It is only /music/playlists that comes up empty. \r\n\r\n/music/playlists also doesn't show any indications of a loading process. All other pages display a bar and rotating circle to indicate something is loading, the empty playlist list shows up without delay.\r\n\r\nMAybe this will help: I used the firefox network monitor to check on mopify. I see GET requests to the spotify API, and the following responses:\r\n\r\n    https://api.spotify.com/v1/users/sebx42/playlists?limit=50\r\n\r\nwhich returns a 304 no modified code. I can also browse the json response which contains an array of 50 playlists. There is a second get request for 50 more playlists:\r\n\r\n    https://api.spotify.com/v1/users/sebx42/playlists?offset=50&limit=50\r\n\r\nwhich returns a 304 as well and 50 more playlists. But there is no third request for playlists. The response also contains \"total: 109\" and \"next: https://api.spotify.com/v1/users/sebx42/playlists?offset=100&limit=50\", but no further request is sent by mopify.\r\n\r\nSo maybe the process isn't finished because I have too many playlists? Is there a way for me to change the limit and offset settings to a larger value to test?\r\n\r\n--\r\n\r\nNext, it gets weird. I tried to see what happens when I disconnect mopify from spotify, restart the browser, load mopify, and then re-connect the service. As I wrote above, this loads my playlists succesfully.\r\n\r\nBUT there is NO GET request to the spotify api, so I don't understand where the playlists come from, probably from some kind of local cache that results from an earlier attempt to get the playlists from mopidy?\r\n\r\nIf this is the case, it supports the hypothesis that getting the playlists from spotify may not work at all."}}