Library continuously "Loading"

As I have been loading more and more CDs onto my NAS drive library, it has been taking longer and longer to open the Volumio library tab. I get a black screen with rotating arrows and the word “Loading”. Now with about 250 CDs in the library, “Loading” is continuous, it never clears, even if left for several hours. All music is still accessible from the “Browse” tab and playing is normal.

The file /var/log/mpd/mpd.log has now grown to more than 28Mb, there are numerous error messages, the following being typical:

Sep 09 16:53 : client: [21] opened from 127.0.0.1:33660
Sep 09 16:53 : client: [21] closed
Sep 09 16:53 : client: [2] closed
Sep 09 16:53 : client: [12] closed
Sep 09 16:53 : client: [9] closed
Sep 09 16:53 : mp4v2: no valid aac track found
Sep 09 16:53 : update: added NAS/ReadyNAS/Compilations/The Berlin Recital/06 Mozart_ Violin Sonata In E Minor, K 304 - 2. Tempo De Minuetto.m4a
Sep 09 16:53 : mp4v2: no valid aac track found
Sep 09 16:53 : update: added NAS/ReadyNAS/Compilations/The Berlin Recital/05 Mozart_ Violin Sonata In E Minor, K 304 - 1. Allegro.m4a
Sep 09 16:53 : mp4v2: no valid aac track found
Sep 09 16:53 : update: added NAS/ReadyNAS/Compilations/The Berlin Recital/10 Franck_ Violin Sonata In A, M 8 - 4. Allegretto Poco Mosso.m4a
Sep 09 16:53 : mp4v2: no valid aac track found
Sep 09 16:53 : update: added NAS/ReadyNAS/Compilations/The Berlin Recital/09 Franck_ Violin Sonata In A, M 8 - 3. Recitativo-Fantasia.m4a
Sep 09 16:53 : mp4v2: no valid aac track found
Sep 09 16:53 : update: added NAS/ReadyNAS/Compilations/The Berlin Recital/08 Franck_ Violin Sonata In A, M 8 - 2. Allegro Quasi Lento.m4a
FindIntegerProperty: no such property - moov.trak[0].mdia.minf.stbl.stsd...esds.decConfigDescr.objectTypeId (src/mp4file.cpp,746)
ReadAtom: “/var/lib/mpd/music/NAS/ReadyNAS/Compilations/The Berlin Recital/.06 Mozart Violin Sonata In E Minor, K 304 - 2. Tempo De Minuetto.m4a”: invalid atom size, extends outside parent atom - skipping to end of “” “” 333319 vs 4096

I have checked and specific tracks mentioned here seem quite normal and can be played via Volumio or iTunes without any problem.

Any ideas? Thanks!

Hey penman,
Any luck with that issue?

I am having the same problem, it didn’t use to do that and I can’t remember what I could have done to upset it…
Anyway, I have tried to delete the database file (/var/lib/mpd/tag_cache) to force it to create it from scratch but it didn’t make any difference.
Also, there are no errors in my logs so I really don’t have any clue here.

Cheers!

I see the same issue. Library view never loads, tried OSX and Ubuntu with Firefox and Chrome.

Sent using Tapatalk

Just wondering if anyone has a solution for this issue. I haven’t had a chance to look at it in any more detail but the library view is completely unusable. Any suggestions gratefully received!

The library view is known to show some problems with larger music collection’s. I don’t know if there is a fix for it, but it’s the reason why the library view is disabled by default

Thank you for that information, at least I know it isn’t my fault now! I shall disable the library view and wait for Volumio 2, maybe that will be better.

The library view is important for classical and jazz, with a larger collection, it’s really difficult to find things via “browse”.

I posted this as an issue in github, along with a potential fix. https://github.com/volumio/Volumio-WebUI/issues/81 .
For me, the issue is that the page load function is never called, opening up the javascript console and typing the following starts the library perfectly:

loadLibraryIfNeeded()

Please test if it works for you.

So it should be an easy fix, I’m not familiar enough with the js-framework to know where the ‘correct’ place for that would be, so I’d just jam it in at some point, if someone more familiar with it could point out where, it’d be appreciated.

Holy holiman! :smiley: That worked!
It would be interesting to know if it works for “penman” and the others as well.
Also, I would suggest to link to this thread in the github issue.

Thanks a lot again!

I seem to have the same problem but know nothing about Linux, Java etc.
Any chance you could describe a walkthrough from scratch ?
All I know so far is how to use Terminal (Mac) to ssh into the Rasberry pi.

Hi All,

For getting library runing add in _footer.php this at line 114 like:

<script type="text/javascript">
        setLibOptions(
                <? echo isset($_SESSION['displaylib']) && $_SESSION['displaylib'] == 1 ? 1 : 0;?>/*is enabled?*/,
                <? echo isset($_SESSION['displaylibastab']) && $_SESSION['displaylibastab'] == 1 ? 1 : 0;?>/*display as tab o
                <? echo $sezione == 'index' ? 1 : 0; ?>/*should load it?*/
        );
loadLibraryIfNeeded();
</script>

Don’t know if some wait state should be added to get all information before providing content but this deliver what is expected.

Thank you for that!!! I modified _footer.php as you suggested and it now loads within seconds!!

(tested with Chrome on Windows 10 and Safari on IOS 9.2)

Good one!
But this only works when I keep “Show as tab” disabled

If you find that simply adding the loadLibraryIfNeeded(); call doesn’t work, a rather hacky way is to make it run on a timer… (it didn’t work for me without this)

E.g. to wait 3 seconds:

    setTimeout(function(){ loadLibraryIfNeeded(); }, 3000);

You can of course change the 3000 number to suit your requirements.

Until we have a better fix (ie… putting this call in the right location of the js code) this should work.

It’s enough ?
In addition to editing this file, I do not do anything.
However, a folder with two albums - added long.

Also i try

root@volumio:/var/www# grep -r "loadLibraryIfNeeded" js/volumio.library.js:function loadLibraryIfNeeded() { -bash: syntax error near unexpected token `('