diff src/audacious/playlist.c @ 4378:342a1a1de225

Mark the playlist as modified when moving/adding/removing/sorting/randomizing the playlist, so that the jump to file cache picks up the change.
author Ivan N. Zlatev <contact@i-nz.net>
date Fri, 28 Mar 2008 02:18:10 +0000
parents 20418bdce637
children 180996fcf12a
line wrap: on
line diff
--- a/src/audacious/playlist.c	Sun Mar 23 20:31:28 2008 +0200
+++ b/src/audacious/playlist.c	Fri Mar 28 02:18:10 2008 +0000
@@ -756,6 +756,8 @@
     g_return_val_if_fail(playlist != NULL, FALSE);
     g_return_val_if_fail(filename != NULL, FALSE);
 
+    PLAYLIST_INCR_SERIAL(playlist);
+
     /* load playlist */
     if (is_playlist_name(filename)) {
         playlist->loading_playlist = TRUE;
@@ -2193,6 +2195,7 @@
     playlist->entries =
         g_list_sort(playlist->entries,
                     (GCompareFunc) playlist_compare_func_table[type]);
+    PLAYLIST_INCR_SERIAL(playlist);
     PLAYLIST_UNLOCK(playlist);
 }
 
@@ -2252,6 +2255,7 @@
     playlist->entries = playlist_sort_selected_generic(playlist->entries, (GCompareFunc)
                                                        playlist_compare_func_table
                                                        [type]);
+    PLAYLIST_INCR_SERIAL(playlist);
     PLAYLIST_UNLOCK(playlist);
 }
 
@@ -2260,6 +2264,7 @@
 {
     PLAYLIST_LOCK(playlist);
     playlist->entries = g_list_reverse(playlist->entries);
+    PLAYLIST_INCR_SERIAL(playlist);
     PLAYLIST_UNLOCK(playlist);
 }
 
@@ -2312,6 +2317,7 @@
 {
     PLAYLIST_LOCK(playlist);
     playlist->entries = playlist_shuffle_list(playlist, playlist->entries);
+    PLAYLIST_INCR_SERIAL(playlist);
     PLAYLIST_UNLOCK(playlist);
 }
 
@@ -2341,6 +2347,7 @@
     for (node = playlist->entries; node; node = g_list_next(node), i++) {
         PLAYLIST_ENTRY(node->data)->selected = FALSE;
     }
+    PLAYLIST_INCR_SERIAL(playlist);
     PLAYLIST_UNLOCK(playlist);
     playlist_recalc_total_time(playlist);
     playlist_manager_update();