given_playlist = "given_playlist";
if (given_mood) {
- ret = mood_open(given_mood);
+ ret = change_current_mood(given_mood);
if (ret >= 0) {
if (given_playlist)
PARA_WARNING_LOG("ignoring playlist %s\n",
if (ret >= 0)
return PLAY_MODE_PLAYLIST;
}
- ret = mood_open(NULL); /* open first available mood */
+ ret = change_current_mood(NULL); /* open first available mood */
if (ret >= 0)
return PLAY_MODE_MOOD;
- mood_open(""); /* open dummy mood, always successful */
+ change_current_mood(""); /* open dummy mood, always successful */
return PLAY_MODE_MOOD;
}
PARA_NOTICE_LOG("closing afs_tables\n");
score_shutdown(flags);
attribute_shutdown(flags);
- mood_close();
+ close_current_mood();
playlist_close();
moods_shutdown(flags);
playlists_shutdown(flags);
return ret;
}
}
+ if (flags & CHECK_MOODS) {
+ ret = send_callback_request(mood_check_callback, NULL, &result);
+ if (ret < 0)
+ return ret;
+ if (ret > 0) {
+ ret = send_buffer(fd, (char *) result.data);
+ free(result.data);
+ if (ret < 0)
+ return ret;
+ }
+ }
return 1;
}