"Browse > Folders > Single track" takes like minutes to start playing

Hi,
I recently installed Pi MusicBox 0.5.3 on my Raspberry Pi B (512 MB RAM) and connected it to a rather small music collection (about 300 songs organized in about 30 folders) on the network. Scanning this collection at system startup takes a significant amount of time, but this is a one-time effort if I do not restart frequently. So that’s okay.

I noticed that when I browse the folders and pick a song that is located in a folder with few other songs (7) then this song starts playing almost immediately.

However, if I pick a song that is located in a folder with about 40 other songs, then it takes way too long to listen to such a song spontaneously (feels like it takes minutes, probably it is only one minute delay effectively).

When checking the Queue page, I noticed that Pi MusicBox not only enqueues the chosen song, but the entire folder. Maybe this is why it takes longer for songs from larger folders.
What is it good for?
Can I disable this behavior somehow?

Help is greatly appreciated.
Thank you,

slowjoe

The old version was very slow when playing a song that was low down in a
long playlist. But I thought that was fixed in the Webclient some time ago.
What version of the Webclient is that?

I took the Pi MusicBox image of version 0.5.3 - no updates yet.
I don’t know, which version the webclient has. How can I tell?

pip list

shows this:

Mopidy-MusicBox-Webclient (1.0.3)

I did some tests:

  • All songs located on the same network share
  • Song from 32-files folder takes 65 seconds to start playing
  • Song from 6-files folder takes 5 seconds to start playing

Ahh ok yep I just had another look and it seems it wasn’t fixed for the browse interface. So it does individual add calls for every track in your folder and hence why folders with many tracks take ages. I’ve made an issue at https://github.com/woutervanwijk/Mopidy-MusicBox-Webclient/issues/85. Thanks very much for highlighting this.

Hello,

my frined just ask me if I can manage for him some internet radio so I found MusicBox Pi and dive into this. I’m newbie in raspberry pi, but it was easy to manage this and get to work MusicBox 0.6 with WIFI, manage default radiostreams, etc. It’s on RPi 2 mod B.

After some hours of playing and testing I try to insert USB stick with around 10 songs on it. Browse -> Local media -> Folders -> USB and voila everything is there. Then I put 100 of songs on this same stick. OPS, there I got the same problem as mentioned in this topic. I can see them, but when I pick one of 100 in same folder, then take a minutes to start playing.

My pip list:
Mopidy (0.19.5)
Mopidy-ALSAMixer (1.0.3)
Mopidy-AudioAddict (0.2.7)
Mopidy-Dirble (0.1.1)
Mopidy-GMusic (0.3.0)
Mopidy-HTTP-Kuechenradio (0.4.2)
Mopidy-InternetArchive (1.2.1)
Mopidy-Local-SQLite (0.9.3)
Mopidy-Local-Whoosh (0.1.0)
Mopidy-Mobile (0.8.7)
Mopidy-Moped (0.4.4)
Mopidy-Mopify (1.1.2)
Mopidy-MusicBox-Webclient (1.0.3)
Mopidy-Podcast (1.1.1)
Mopidy-Podcast-gpodder.net (1.0.0)
Mopidy-Podcast-iTunes (1.0.0)
Mopidy-Scrobbler (1.1.1)
Mopidy-Simple-Webclient (0.1)
Mopidy-SomaFM (0.7.1)
Mopidy-SoundCloud (1.2.5)
Mopidy-Spotify (1.2.0)
Mopidy-Spotify-Tunigo (0.2.1)
Mopidy-Subsonic (0.3.1)
Mopidy-TuneIn (0.1.2)
Mopidy-WebSettings (0.1.2)
Mopidy-Youtube (1.0.1)

What should I do. I read this topic and github issue, but sorry, I need some help/explanatin what I need to do to solve this.

Thank you very much for helping me!
Have a nice weekend!
Johnny

Anyone? @kingosticks can you help me please with that?

This fix appears to be present in v2.0.0 of Mopidy-Musicbox-Webclient which you should be able to install in PiMusicbox v0.6. If you try to install anything newer than v2.0.0 then you’ll run into all kinds of problems. Sorry, that’s just how it is right now.

So, to install v2.0.0 you can run the following:
pip install -I Mopidy-MusicBox-Webclient==2.0.0

@kingosticks If I run this command, after installation I cannot reach musicbox webclient anymore. I also try with version 1.0.4 and it’s the same - I got the IP but web page does not exsist.

  • Is Mopidy running - service mopidy status ?
  • Is there anything in the log at /var/log/mopidy/mopidy.log ?

@kingosticks Service status: [FAIL] mopidy is not running … failed!

in the log is:
WARNING Found musicbox_webclient configuration errors, the extension has been automatically disabled:
musicbox_webclient//musicbox unknown config key.

A warning is just a warning and not reason for Mopidy to not be running. No other clues? Tried restarting it? service mopidy start?

When will I learn not to suggest upgrades, it never works…

@kingosticks Service doesn’t start. Nothing happen after executing start command and status is still failed. Yes of course I try to restart it several times.

Log data:

2016-12-20 14:26:01,060 - INFO Starting Mopidy 0.19.5
2016-12-20 14:26:07,324 - INFO Creating dir /home/mopidy/.local/share/mopidy
2016-12-20 14:26:07,364 - INFO Loading config from: builtin defaults, /etc/mopidy$
2016-12-20 14:26:07,893 - INFO Enabled extensions: mopify, mpd, http, stream, spo$
2016-12-20 14:26:07,895 - INFO Disabled extensions: spotify, alsamixer, gmusic, s$
2016-12-20 14:26:07,896 - WARNING Found alsamixer configuration errors, the extensio$
2016-12-20 14:26:07,898 - WARNING alsamixer/control must be set.
2016-12-20 14:26:07,898 - WARNING alsamixer/card must be set.
2016-12-20 14:26:07,899 - WARNING Found musicbox_webclient configuration errors, the$
2016-12-20 14:26:07,900 - WARNING musicbox_webclient/musicbox unknown config key.
2016-12-20 14:26:07,901 - WARNING Please fix the extension configuration errors or d$
2016-12-20 14:26:14,052 - INFO Creating dir /var/lib/mopidy/localdata/sqlite
2016-12-20 14:26:14,083 - INFO Found 0 files in media_dir.
2016-12-20 14:26:14,105 - INFO Creating SQLite database schema v5
2016-12-20 14:26:15,176 - INFO Checking 0 tracks from library.
2016-12-20 14:26:15,182 - INFO Removing 0 missing tracks.
2016-12-20 14:26:15,183 - INFO Found 0 tracks which need to be updated.
2016-12-20 14:26:15,184 - INFO Scanning…
2016-12-20 14:26:15,240 - INFO Scanned 0 of 0 files in 0s.
2016-12-20 14:26:15,291 - INFO Done scanning.
2016-12-20 14:26:17,003 - INFO Starting Mopidy 0.19.5
2016-12-20 14:26:17,772 - INFO Loading config from: builtin defaults, /etc/mopidy$
2016-12-20 14:26:18,240 - INFO Enabled extensions: mopify, mpd, http, stream, spo$
2016-12-20 14:26:18,241 - INFO Disabled extensions: spotify, alsamixer, gmusic, s$
2016-12-20 14:26:18,242 - WARNING Found alsamixer configuration errors, the extensio$
2016-12-20 14:26:18,242 - WARNING alsamixer/control must be set.
2016-12-20 14:26:18,243 - WARNING alsamixer/card must be set.
2016-12-20 14:26:18,244 - WARNING Found musicbox_webclient configuration errors, the$
2016-12-20 14:26:18,244 - WARNING musicbox_webclient/musicbox unknown config key.
2016-12-20 14:26:18,245 - WARNING Please fix the extension configuration errors or d$
2016-12-20 14:26:23,794 - INFO Starting Mopidy mixer: SoftwareMixer

Would you mind trying to get some debug logging with:
sudo -H -u mopidy bash -c '/usr/local/bin/mopidy --config /etc/mopidy/mopidy.conf -v'

@kingosticks I’m totally newbie in raspberry so I try my best. I just put your command into SSH and if this is what should produce that’s it:
Traceback (most recent call last):
File “/usr/local/bin/mopidy”, line 11, in
load_entry_point(‘Mopidy==2.0.1’, ‘console_scripts’, ‘mopidy’)()
File “/usr/local/lib/python2.7/dist-packages/pkg_resources/init.py”, line 561, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File “/usr/local/lib/python2.7/dist-packages/pkg_resources/init.py”, line 2631, in load_entry_point
return ep.load()
File “/usr/local/lib/python2.7/dist-packages/pkg_resources/init.py”, line 2291, in load
return self.resolve()
File “/usr/local/lib/python2.7/dist-packages/pkg_resources/init.py”, line 2297, in resolve
module = import(self.module_name, fromlist=[‘name’], level=0)
File “/usr/local/lib/python2.7/dist-packages/mopidy/main.py”, line 8, in
from mopidy.internal.gi import Gst # noqa: F401
File “/usr/local/lib/python2.7/dist-packages/mopidy/internal/gi.py”, line 9, in
gi.require_version(‘Gst’, ‘1.0’)
File “/usr/lib/python2.7/dist-packages/gi/init.py”, line 73, in require_version
raise ValueError(‘Namespace %s not available’ % namespace)
ValueError: Namespace Gst not available

Otherwise let me know what to do, please.

Ah well that error message is very helpful, thanks. It shows that unfortunately you now have Mopidy v2.0 installed, unfortunate because it’s very incompatible with Musicbox v0.6. I specified installing mopidy-musicbox-webclient v2.0.0 specifically because it was the last version we did that did not require Mopidy v2.0. This is entirely my fault,I screwed up the pip command.

But all is not lost, we should be able to sort this with pip install -I Mopidy==0.19.5. After that, if you then do mopidy deps it should hopefully report you have v0.19.5 of Mopidy and v2.0.0 of Mopidy-Musicbox-Webclient installed. and then things should start working again.

@kingosticks
Mopidy (0.19.5)
Mopidy-MusicBox-Webclient (2.0.0)

Now I’m able to reach musicbox via IP or musicbox.local, but if I click on some buttons nothing happend. URL change name for example IP/#stream or IP/#browse, etc. but menu just not appear.

Are you able to clear your browser cache? In old versions we didn’t have proper cache invalidation on upgrade. It might just be that.

@kingosticks Yes, I clear the cache of the browser and also try on another computer with different browser, but it doesn’t work. Only button-menu who work is /system menu to shutdown or reboot.