This behaviour is not intentional but there might be a couple of things going on here.
I could not reliably reproduce the mpc add error, but when I did get it, it was due to the mopidy_spotify.lookup timing out. This was also accompanied by numerous ‘ChannelError(10, 1, playlist)’ libspotify messages throughout the log which usually indicate there is an intermittent problem with the Spotify service itself. See log at http://dpaste.com/32X1JN8
All the other times, I found that the mpc add command worked but only some of the tracks were actually added to the tracklist (usually just the first 3). If I then cleared the tracklist and repeated the mpc add command I got all the tracks. There was nothing in the log to indicate anything went wrong. I then found that after adding some logging to report None tracks in mopidy-spotify’s lookup_playlist, I got nearly all 194 tracks added to the playlist first time. Perhaps the tracks do not have sufficient time to load when you try and add a playlist straight to the tracklist that is not present amongst your saved playlists?
This behaviour is not intentional but there might be a couple of things going on here.
I could not reliably reproduce the mpc add error, but when I did get it, it was due to the mopidy_spotify.lookup timing out. This was also accompanied by numerous ‘ChannelError(10, 1, playlist)’ libspotify messages throughout the log which usually indicate there is an intermittent problem with the Spotify service itself. See log at http://dpaste.com/32X1JN8
All the other times, I found that the mpc add command worked but only some of the tracks were actually added to the tracklist (usually just the first 3). If I then cleared the tracklist and repeated the mpc add command I got all the tracks. There was nothing in the log to indicate anything went wrong. I then found that after adding some logging to report None tracks in mopidy-spotify’s lookup_playlist, I got nearly all 194 tracks added to the playlist first time. Perhaps the tracks do not have sufficient time to load when you try and add a playlist straight to the tracklist that is not present amongst your saved playlists?
I’m now unable to replicate this myself (seems to be ok now…), but my issue has progressed.
None of the mpc commands will execute on boot. I have a shell script in /etc/network/if-up.d that writes output to a log file, so I know the script is working, but the mpc commands do not run. (they do if started manually)
I’m using a bash script scheduled as a cron job (etc/crontab). The script is launched as root and all the contained mpc commands specify the Mopidy password and hostname:
Sure, you could guess that it’s up by then. Or you could loop until map
status returns with something. If those commands work if you issue them at
the terminal (straight away) but don’t in your script… then that’s what
I’d want to be totally sure about.
But I wonder if there really is an issue when adding a foreign (i.e. one you do not follow) spotify playlist straight to the tracklist as per the first few messages in this thread. That is worth getting to the bottom of.