Mopidy-spotify only plays two tracks from spotify playlist

Hello!

When I saw that mopidy could stream from Spotify with shout2send, I could not even finish my beer and went to buy Spotify premium instantly. Now when I try to play my Spotify playlists with mopidy (using gmps) only the two first tracks from the playlists are played, after that the second track is on repeat. I have enabled allow_playlists = true. Did I miss something in configuring modipy, or is this a bug?
I am on Debian Stretch, and added from the jessie.list repository.

You didn’t miss anything, this should work. Can you post your ‘mopidy deps’ and ‘mopidy config’? @adamcik this is not a known bug, is it?

mopidy deps:

Executable: /usr/bin/mopidy
Platform: Linux-4.8.0-1-amd64-x86_64-with-debian-stretch-sid
Python: CPython 2.7.13rc1 from /usr/lib/python2.7
Mopidy: 2.0.1 from /usr/lib/python2.7/dist-packages
Mopidy-Spotify: 3.0.0 from /usr/lib/python2.7/dist-packages
Mopidy>=2.0: 2.0.1 from /usr/lib/python2.7/dist-packages
Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
pyspotify>=2.0.5: 2.0.5 from /usr/lib/python2.7/dist-packages
cffi>=1.0.0: 1.7.0 from /usr/lib/python2.7/dist-packages
requests>=2.0: 2.11.1 from /usr/lib/python2.7/dist-packages
Mopidy-Spotify-Tunigo: 1.0.0 from /usr/lib/python2.7/dist-packages
Mopidy>=0.19.0: 2.0.1 from /usr/lib/python2.7/dist-packages
Mopidy-Spotify>=1.2.0: 3.0.0 from /usr/lib/python2.7/dist-packages
Mopidy>=2.0: 2.0.1 from /usr/lib/python2.7/dist-packages
Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
pyspotify>=2.0.5: 2.0.5 from /usr/lib/python2.7/dist-packages
cffi>=1.0.0: 1.7.0 from /usr/lib/python2.7/dist-packages
requests>=2.0: 2.11.1 from /usr/lib/python2.7/dist-packages
Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
tunigo>=1.0.0: 1.0.0 from /usr/lib/python2.7/dist-packages
GStreamer: 1.10.2.0 from /usr/lib/python2.7/dist-packages/gi
Detailed information:
Python wrapper: python-gi 3.22.0
Relevant elements:
Found:
uridecodebin
souphttpsrc
appsrc
alsasink
osssink
oss4sink
pulsesink
id3demux
id3v2mux
lamemp3enc
mad
mpegaudioparse
mpg123audiodec
vorbisdec
vorbisenc
vorbisparse
oggdemux
oggmux
oggparse
flacdec
flacparse
shout2send
Not found:
flump3dec

mopidy config:

[core]
cache_dir = $XDG_CACHE_DIR/mopidy
config_dir = $XDG_CONFIG_DIR/mopidy
data_dir = $XDG_DATA_DIR/mopidy
max_tracklist_length = 10000

[logging]
color = true
console_format = %(levelname)-8s %(message)s
debug_format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\n %(message)s
debug_file = mopidy.log
config_file =

[audio]
mixer = software
mixer_volume =
output = audioresample ! audioconvert ! vorbisenc quality=0.4 ! oggmux ! shout2send ip=“mustafejen.se” port=8000 password=“hackme” mount=/test.ogg genre=“Eclectic” description=“mopidy test” public=true streamname="mustafejen"
buffer_time =

[proxy]
scheme =
hostname =
port =
username =
password =

[spotify_tunigo]
enabled = true
region =
sub_genres = true
cache_time = 3600

[spotify]
enabled = true
username = 118577912
password = ********
bitrate = 320
volume_normalization = true
private_session = false
timeout = 10
allow_cache = true
allow_network = true
allow_playlists = true
search_album_count = 20
search_artist_count = 10
search_track_count = 50
toplist_countries =

[mpd]
enabled = true
hostname = 127.0.0.1
port = 6600
password =
max_connections = 20
connection_timeout = 60
zeroconf = Mopidy MPD server on $hostname
command_blacklist =
listall
listallinfo
default_playlist_scheme = m3u

[http]
enabled = true
hostname = 127.0.0.1
port = 6680
static_dir =
zeroconf = Mopidy HTTP server on $hostname

[stream]
enabled = true
protocols =
http
https
mms
rtmp
rtmps
rtsp
metadata_blacklist =
timeout = 5000

[m3u]
enabled = true
base_dir = $XDG_MUSIC_DIR
default_encoding = latin-1
default_extension = .m3u8
playlists_dir =

[softwaremixer]
enabled = true

[file]
enabled = true
media_dirs =
show_dotfiles = false
follow_symlinks = false
metadata_timeout = 1000

[local]
enabled = true
library = json
media_dir = $XDG_MUSIC_DIR
scan_timeout = 1000
scan_flush_threshold = 100
scan_follow_symlinks = false
excluded_file_extensions =
.directory
.html
.jpeg
.jpg
.log
.nfo
.png
.txt

I just noticed this happens when I play local files as well.

Same thing happens to me too. Installed and configured mopidy, mopidy-spotify and icecast on a headless server (in a datacenter). No option to test with local output for this one.

I will try to do a test install on a local box to see if it’s mopidy (issue happens with both spotify and local files) or the conversion to icecast.

As I’ve been using Musicbox on RPi’s for over a year without much hassle, I suspect the latter.

I just tried with autoaudiosink as audio output instead of shout2send, and this works for me.

Same here. Did a very quick install of icecast + mopidy on an RPi and with autoaudiosink no problems.

Next thing I’ll try is mp3 instead of ogg to see where in the chain things break.

Using ncmpcpp I notice that the current track is not updated correctly. If I manually go forward, it does and nicely moves on to the next track as well, but then the story repeats itself.

Ok, using mp3 works, so as a workaround using:

output = lamemp3enc ! …

should do the trick.

Somewhere in the chain:

output = audioresample ! audioconvert ! vorbisenc ! oggmux ! …

things go wrong.

I’m not much of a coder, so I doubt I can be of any help there. For me, this workaround is fine for now. Still I prefer using open stuff, that’s why I chose ogg over mp3.

Cheers.

I tried lamemp3enc, and that worked. I have done tries with vorbisenc since, and sometimes one song works, sometimes two. Sometimes the metadata shows up on the icecast server, sometimes not. Last time I tried (with gmpc) it played one song with metadata “Unknown” and exited.