int ret;
char *mood_name;
+ PARA_NOTICE_LOG("reloading current mood\n");
if (!current_mood)
return 1;
mood_name = para_strdup(current_mood->name);
close_current_mood();
+ ret = clear_score_table();
+ if (ret < 0)
+ return ret;
ret = change_current_mood(mood_name);
free(mood_name);
return ret;
void *data)
{
switch(event) {
+ /*
+ * The three blob events might change the set of admissible files,
+ * so we must reload the score list.
+ */
+ case BLOB_RENAME:
+ case BLOB_REMOVE:
+ case BLOB_ADD:
+ if (data == moods_table || data == playlists_table)
+ return 1; /* no reload necessary for these */
+ return reload_current_mood();
+ /* these also require reload of the score table */
case ATTRIBUTE_ADD:
case ATTRIBUTE_REMOVE:
case ATTRIBUTE_RENAME:
return reload_current_mood();
+ /* changes to the aft only require to re-examine the audio file */
case AFSI_CHANGE: {
struct afsi_change_event_data *aced = data;
return mood_update_audio_file(aced->aft_row, aced->old_afsi);