Bugzilla – Bug 5972
Music Folder defaults to "1"
Last modified: 2007-10-30 11:43:48 UTC
This started in the nightlys a few days ago and is still present as of 2007-10-30. On a fresh install, when the wizard gets to the "Music Folder" page, there is a "1" in the form box at the bottom. (At this point, a peek at the prefs file reveals "audiodir: ''") If I select something from the folder tree or overwrite the "1" with a valid folder, everything works fine. But if I just click NEXT, it tries to save "1" as the audiodir. Not sure if this is platform dependent...
check your logs. I believe some cases of missing strings return a 1.
No errors in the logs.
There is an odd bit of code in Wizard.pm: if (!$serverPrefs->get('wizardDone')) { $paramRef->{prefs}->{iTunes} = $paramRef->{prefs}->{iTunes} || Slim::Plugin::iTunes::Common->canUseiTunesLibrary(); $paramRef->{prefs}->{audiodir} = $paramRef->{prefs}->{audiodir} || !$paramRef->{prefs}->{iTunes}; } This appears to be setting the audiodir to 1 if iTunes isn't found/used. According to the comments, I think the code needs to be more like: if (!$serverPrefs->get('wizardDone')) { $paramRef->{prefs}->{iTunes} = $paramRef->{prefs}->{iTunes} if Slim::Plugin::iTunes::Common->canUseiTunesLibrary(); $paramRef->{prefs}->{audiodir} = $paramRef->{prefs}->{audiodir} if !$paramRef->{prefs}->{iTunes}; } will merge shortly after a quick test.
merged in at change 14222. This fixes the problem as I reproduced it. Please verify and reopen if there are any problems.
Oops... that logic is wrong indeed. It shouldn't set audiodir, but the checkbox used to activate audiodir. $paramRef->{prefs}->{iTunes} = $paramRef->{prefs}->{iTunes} if Slim::Plugin::iTunes::Common->canUseiTunesLibrary(); isn't ok neither, as we don't want to activate iTunes if it had been disabled before.
This should rather be $paramRef->{prefs}->{useAudioDir} = $paramRef->{prefs}->{audiodir} || !$paramRef->{prefs}->{iTunes};
the || for iTunes is wrong then too. I can use iTunes as I'm on windows with iTunes installed, but I previously set it to off. This || logic would turn the checkbox on in my case. Wouldn't && make more sense then? who was this now assigned to, btw?
Change 14223 - fix the useAudiodir logic Change 14224 - fix the iTunes logic I thought it was assigned to me. Guess I was wrong. Let's close this case. It's confusing.