PARA_INFO_LOG("waketime: %d:%02d\n", tm->tm_hour, tm->tm_min);
client_cmd("stop");
sleep(1);
- if (fot && fo_mood) {
+ if (fot && fo_mood && *fo_mood) {
ret = set_initial_volume(m, h);
if (ret < 0)
return ret;
if (ret < 0)
return ret;
}
- if (sleep_mood) {
+ if (sleep_mood && *sleep_mood) {
change_afs_mode(sleep_mood);
if (!fot || !fo_mood) /* currently stopped */
client_cmd("play");
- } else if (fot && fo_mood) /* currently playing */
+ } else if (fot && fo_mood && *fo_mood) /* currently playing */
client_cmd("stop");
- if (!fit || !fi_mood) /* nothing to do */
+ if (!fit || !fi_mood || !*fi_mood) /* nothing to do */
return 1;
for (;;) {
time(&t1);
sleep(delay);
}
change_afs_mode(fi_mood);
- if (sleep_mood) /* currently playing */
+ if (sleep_mood && *sleep_mood) /* currently playing */
client_cmd("next");
else /* currently stopped */
client_cmd("play");