summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
790c87f)
This avoids a pointless exec of "para_client stop" in case no fade-out
mood is given, and another pointless "para_client play" exec which
was executed when already playing.
Other than that behaviour should be identical.
- client_cmd("stop");
- if (!afs_mode)
- return;
cmd = make_message("select %s", afs_mode);
client_cmd(cmd);
free(cmd);
cmd = make_message("select %s", afs_mode);
client_cmd(cmd);
free(cmd);
PARA_INFO_LOG("waketime: %d:%02d\n", tm->tm_hour, tm->tm_min);
client_cmd("stop");
sleep(1);
PARA_INFO_LOG("waketime: %d:%02d\n", tm->tm_hour, tm->tm_min);
client_cmd("stop");
sleep(1);
ret = set_initial_volume(m, h);
if (ret < 0)
return ret;
ret = set_initial_volume(m, h);
if (ret < 0)
return ret;
if (ret < 0)
return ret;
}
if (ret < 0)
return ret;
}
- if (OPT_GIVEN(SLEEP, SLEEP_MOOD)) {
change_afs_mode(sleep_mood);
change_afs_mode(sleep_mood);
- client_cmd("play");
- } else
+ if (!fot || !fo_mood) /* currently stopped */
+ client_cmd("play");
+ } else if (fot && fo_mood) /* currently playing */
+ if (!fit || !fi_mood) /* nothing to do */
return 1;
change_afs_mode(fi_mood);
for (;;) {
return 1;
change_afs_mode(fi_mood);
for (;;) {