State file wont stay disabled?

General discussion about RuneAudio. Do not post any support or feature requests here.

Re: State file wont stay disabled?

Postby irishwill2008 » 16 Sep 2016, 15:10

The issue is,
As soon as i change the code to the code you said. If i try to disable the state file and hit save it automatically changes back to enabled?
Thats the first issue.
Second issue was when i changed the if statement that you gave me from:

if (!isset($mpdcfg['state_file']) || $mpdcfg['state_file'] === 'no') {
$redis->hDel('mpdconf', 'state_file');
} else {
$output .= "state_file\t\"/var/lib/mpd/mpdstate\"\n";
$redis->hSet('mpdconf', 'state_file', '/var/lib/mpd/mpdstate');
}

To

if (!isset($mpdcfg['state_file']) || $mpdcfg['state_file'] === 'no') {
$output .= "state_file\t\"/var/lib/mpd/mpdstate\"\n";
$redis->hSet('mpdconf', 'state_file', '/var/lib/mpd/mpdstate');
} else {
$redis->hDel('mpdconf', 'state_file');
}
Basically meaning if its set then delete state file else if diabled then enable (Reason for this? Because like said above, i couldnt make disabled stay disabled? It would automatically switch to enabled once i press saved in the settings) But anyway, once i did this the system crashed and gave me weird swerls were track name should of been and the queue disappeared as in (Browse your library part when i have nothing in queue).
So basically, for some reason.. it seems like the system doesnt like having the state file switched off? Cause when it does switch off it crashes the entire system :/ Thats why if theres no solution in fixing this weird crash then i rather have state file completely turned off as its no use for my purpose of use!:)
irishwill2008
 
Posts: 157
Joined: 26 Jul 2016, 14:49
Location: Ireland

Re: State file wont stay disabled?

Postby hondagx35 » 16 Sep 2016, 15:24

User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: State file wont stay disabled?

Postby irishwill2008 » 16 Sep 2016, 15:33

I will try again and use the reboot command under power on the runeui. If i do that, that should clear the cache and all for me correct?

The reason for it having no use for myself is due to having played lets say "Heavy metal" late last night on volume 100% and then this morning comes along, i forgot what was playing and then bam, heavy metal comes on at 100% roaring down the place waking everyone up in the house before i get the time to login and mute!

Can be scary at times ;)
irishwill2008
 
Posts: 157
Joined: 26 Jul 2016, 14:49
Location: Ireland

Re: State file wont stay disabled?

Postby irishwill2008 » 16 Sep 2016, 15:58

With the latest code you gave with the or condition worked for the disabled staying disabled! When i hit save, it saved it and disabled stays. When i rebooted, i played a song and the audio sounded really weird and then 10 seconds into the song the song stopped playing and now the system crashed again. (This only happens once the system has state file disabled) When its enabled it works a charm (The system that is) ? Very VERY strange. I cant connect to the web interface now (Like before) but i can connect via SSH.
irishwill2008
 
Posts: 157
Joined: 26 Jul 2016, 14:49
Location: Ireland

Re: State file wont stay disabled?

Postby irishwill2008 » 16 Sep 2016, 16:12

As soon as i enabled state file, everything works again..
I dont get it :?:
irishwill2008
 
Posts: 157
Joined: 26 Jul 2016, 14:49
Location: Ireland

Re: State file wont stay disabled?

Postby hondagx35 » 16 Sep 2016, 16:54

User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: State file wont stay disabled?

Postby irishwill2008 » 16 Sep 2016, 17:09

Yeah thats what i done, i have it set to 0 so thats working ok for me now but changing the state file still causes my system to crash..

If i have a song playing and i turn the system off, when i turn it back on is it meant to continue playing the song at the last set volume? Thats what happens with me? When i leave a song playing at volume 100%, when i hit reboot.. As soon as it reboots the song continues to play with the set volume. As it states in settings: When mpd is restarted, it will read the state file and restore the state of mpd (including the playlist).

Anyway its ok, i will live with it at the moment. Still strange though ;)
Thanks for your time!
irishwill2008
 
Posts: 157
Joined: 26 Jul 2016, 14:49
Location: Ireland

support RuneAudio Donate with PayPal

Previous

Return to General discussion

Who is online

Users browsing this forum: No registered users and 11 guests
cron