idx = idxs[j] - j;
/* fix block types */
- if(!idx)
+ if(idx)
app->playlist.item[idx - 1].type = (playlist_item_type_t)(app->playlist.item[idx - 1].type |
OMNPLAY_PLAYLIST_BLOCK_END);
if(idx + 1 < app->playlist.count)
omnplay_playlist_draw_item(app, b);
/* fix block types */
- if(!a)
+ if(a)
{
app->playlist.item[a - 1].type = (playlist_item_type_t)(app->playlist.item[a - 1].type |
OMNPLAY_PLAYLIST_BLOCK_END);
omnplay_ctl(app, button);
break;
case BUTTON_LIBRARY_ADD:
+ break;
case BUTTON_LIBRARY_REFRESH:
+ omnplay_library_refresh(app);
break;
};
gtk_signal_connect(GTK_OBJECT(app->buttons[i]), "clicked",
GTK_SIGNAL_FUNC( on_button_click), app );
+ /* create lock */
+ pthread_mutex_init(&app->library.lock, &attr);
+
+ /* load library */
+ omnplay_library_load(app);
};
void omnplay_release(omnplay_instance_t* app)
/* destroy lock */
pthread_mutex_destroy(&app->playlist.lock);
+
+ /* load library */
+ omnplay_library_save(app);
+
+ /* destroy library lock */
+ pthread_mutex_destroy(&app->library.lock);
};