summaryrefslogtreecommitdiff
path: root/apps/playlist_viewer.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/playlist_viewer.c')
-rw-r--r--apps/playlist_viewer.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c
index 3d530e791a..d12aa26de4 100644
--- a/apps/playlist_viewer.c
+++ b/apps/playlist_viewer.c
@@ -802,15 +802,23 @@ static bool update_viewer_with_changes(struct gui_synclist *playlist_lists, enum
802 if (res == PV_ONPLAY_CHANGED || 802 if (res == PV_ONPLAY_CHANGED ||
803 res == PV_ONPLAY_ITEM_REMOVED) 803 res == PV_ONPLAY_ITEM_REMOVED)
804 { 804 {
805 if (!viewer.playlist)
806 playlist_set_modified(NULL, true);
807
805 if (res == PV_ONPLAY_ITEM_REMOVED) 808 if (res == PV_ONPLAY_ITEM_REMOVED)
806 gui_synclist_del_item(playlist_lists); 809 gui_synclist_del_item(playlist_lists);
810
807 update_playlist(true); 811 update_playlist(true);
812
808 if (viewer.num_tracks <= 0) 813 if (viewer.num_tracks <= 0)
809 exit = true; 814 exit = true;
815
810 if (viewer.selected_track >= viewer.num_tracks) 816 if (viewer.selected_track >= viewer.num_tracks)
811 viewer.selected_track = viewer.num_tracks-1; 817 viewer.selected_track = viewer.num_tracks-1;
818
812 dirty = true; 819 dirty = true;
813 } 820 }
821
814 /* the show_icons option in the playlist viewer settings 822 /* the show_icons option in the playlist viewer settings
815 * menu might have changed */ 823 * menu might have changed */
816 update_lists(playlist_lists); 824 update_lists(playlist_lists);
@@ -947,6 +955,10 @@ enum playlist_viewer_result playlist_viewer_ex(const char* filename,
947 splashf(HZ, (unsigned char *)"%s %s", str(LANG_MOVE), 955 splashf(HZ, (unsigned char *)"%s %s", str(LANG_MOVE),
948 str(LANG_FAILED)); 956 str(LANG_FAILED));
949 } 957 }
958
959 if (!viewer.playlist)
960 playlist_set_modified(NULL, true);
961
950 update_playlist(true); 962 update_playlist(true);
951 viewer.moving_track = -1; 963 viewer.moving_track = -1;
952 viewer.moving_playlist_index = -1; 964 viewer.moving_playlist_index = -1;
@@ -976,7 +988,6 @@ enum playlist_viewer_result playlist_viewer_ex(const char* filename,
976 if (global_settings.playlist_shuffle) 988 if (global_settings.playlist_shuffle)
977 start_index = playlist_shuffle(current_tick, start_index); 989 start_index = playlist_shuffle(current_tick, start_index);
978 playlist_start(start_index, 0, 0); 990 playlist_start(start_index, 0, 0);
979 playlist_set_modified(NULL, false);
980 991
981 if (viewer.initial_selection) 992 if (viewer.initial_selection)
982 *(viewer.initial_selection) = viewer.selected_track; 993 *(viewer.initial_selection) = viewer.selected_track;