const struct lls_command *cmd = SERVER_CMD_CMD_PTR(SELECT);
const char *arg;
int ret;
+ struct para_buffer *pbout;
ret = lls_deserialize_parse_result(aca->query.data, cmd, &aca->lpr);
assert(ret >= 0);
arg = lls_input(0, aca->lpr);
+ pbout = SERVER_CMD_OPT_GIVEN(SELECT, VERBOSE, aca->lpr)?
+ &aca->pbout : NULL;
score_clear();
if (current_play_mode == PLAY_MODE_MOOD)
mood_unload();
else
playlist_unload();
- ret = activate_mood_or_playlist(arg, &aca->pbout);
+ ret = activate_mood_or_playlist(arg, pbout);
if (ret >= 0)
goto free_lpr;
/* ignore subsequent errors (but log them) */
if (current_mop && strcmp(current_mop, arg) != 0) {
int ret2;
afs_error(aca, "switching back to %s\n", current_mop);
- ret2 = activate_mood_or_playlist(current_mop, &aca->pbout);
+ ret2 = activate_mood_or_playlist(current_mop, pbout);
if (ret2 >= 0)
goto free_lpr;
afs_error(aca, "could not reactivate %s: %s\n", current_mop,
para_strerror(-ret2));
}
- activate_mood_or_playlist(NULL, &aca->pbout);
+ activate_mood_or_playlist(NULL, pbout);
free_lpr:
lls_free_parse_result(aca->lpr, cmd);
return ret;
"loaded mood %s (%u files)\n"
"last_played mean/sigma: %d/%d days\n"
"num_played mean/sigma: %" PRId64 "/%" PRIu64 "\n"
+ "correction factor ratio: %.2lf\n"
,
m->name? m->name : "(dummy)",
n,
mean_days, sigma_days,
m->stats.num_played_sum / n,
- int_sqrt(m->stats.num_played_qd / n)
+ int_sqrt(m->stats.num_played_qd / n),
+ 86400.0 * m->stats.last_played_correction /
+ m->stats.num_played_correction
);
}