Bugzilla – Bug 17430
On initial start after a clean installation, Music Browse menus would not be initialized
Last modified: 2011-08-15 06:35:18 UTC
slimerver.pl is checking for an existing library, or it wouldn't load the menus: if (Slim::Schema::hasLibrary()) { main::INFOLOG && $log->info("Library Browser init..."); require Slim::Menu::BrowseLibrary; Slim::Menu::BrowseLibrary->init(); } On an initial start, where no prefs nor db exist, this condition might not be met. But there's no code to initialize the browse menus at a later stage.
I see three options to fix this - with different ugliness: - check whether the BrowseMenu has been initialized whenever a menu needs to be displayed, run init() if not - hard-code a call to BrowseMenu->init() in Schema->init() - add a "schema init done" notification to which BrowseMenu would subscribe
Created attachment 7387 [details] add "schema initialized" notification to delay browse mode init if needed Alan - I was wondering why we didn't initialize browse modes without schema. Couldn't we just check this before entering a menu instead? After all those browse modes should always be available, shouldn't they? This patch would delay the initialization if the schema wasn't ready yet.
One more thing: I wasn't able to reproduce this issue on my MacBook. But I did see it in a FreeNAS/SlimNAS VM, and saw reports about it for a QNAP user (forgot the others). I was wondering whether this was a timing issue which could be worked around by re-ordering the calls?
From the forums: "Both my systems are Linux based (Vortexbox and a Linkstation NAS). Using both machines, the 33033 versions seem to function properly with one limitation: When starting from no pre-existing database, I had to restart SBS after the first scan in order to be able browse my library." "I consider this machine pretty decently spec'd for SBS usage (scans 8000 Flac tracks in 3 minutes). Is is a Vortexbox distro on bare metal, with a dual core D510 at 1.66GHz." http://forums.slimdevices.com/showpost.php?p=648974&postcount=101
Created attachment 7396 [details] always add menu items, but show placeholder if not ready This is a simpler approach: always initialize the full menu, but show a placeholder if the user is browsing a menu before the schema is fully initialized.
== Auto-comment from SVN commit #33094 to the slim repo by mherger == == http://svn.slimdevices.com/slim?view=revision&revision=33094 == Fixed Bug: 17430 Description: initialize BrowseLibrary even if schema is not ready yet. Menu items are hidden anyway until the schame is fully initialized. Add some fall back message in case a user managed to browse a link before it was ready (eg. from a stale web page)