summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2016-03-10 20:03:01 +0100
committerMax Kellermann <max@duempel.org>2016-03-10 20:03:01 +0100
commit008a9560fe1a79c27ed66a8da5b1d4741ab10fa2 (patch)
tree55a7f13ed0abcf81579e6a22f4d007ea21bc358d /src
parent6ff01cc72c762d9f9b7423eadb7b3bd69c8800a6 (diff)
queue/Playlist: call OnModified(), eliminate duplicate code
Diffstat (limited to 'src')
-rw-r--r--src/queue/Playlist.cxx3
-rw-r--r--src/queue/PlaylistUpdate.cxx6
2 files changed, 3 insertions, 6 deletions
diff --git a/src/queue/Playlist.cxx b/src/queue/Playlist.cxx
index fee6f48fa..6909d36a4 100644
--- a/src/queue/Playlist.cxx
+++ b/src/queue/Playlist.cxx
@@ -40,8 +40,7 @@ playlist::TagModified(DetachedSong &&song)
current_song.MoveTagItemsFrom(std::move(song));
queue.ModifyAtOrder(current);
- queue.IncrementVersion();
- idle_add(IDLE_PLAYLIST);
+ OnModified();
}
inline void
diff --git a/src/queue/PlaylistUpdate.cxx b/src/queue/PlaylistUpdate.cxx
index a0bc0208a..264ecaa93 100644
--- a/src/queue/PlaylistUpdate.cxx
+++ b/src/queue/PlaylistUpdate.cxx
@@ -65,8 +65,6 @@ playlist::DatabaseModified(const Database &db)
}
}
- if (modified) {
- queue.IncrementVersion();
- idle_add(IDLE_PLAYLIST);
- }
+ if (modified)
+ OnModified();
}