From 4de3b6dc801fdb0d30809348a13565652a9938c1 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 22 Oct 2013 00:26:20 +0200 Subject: Partition: add method DatabaseModified() --- src/Instance.cxx | 2 +- src/Partition.cxx | 6 ++++++ src/Partition.hxx | 6 ++++++ 3 files changed, 13 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Instance.cxx b/src/Instance.cxx index eeae85b44..daad94212 100644 --- a/src/Instance.cxx +++ b/src/Instance.cxx @@ -31,7 +31,7 @@ Instance::DeleteSong(const Song &song) void Instance::DatabaseModified() { - partition->playlist.FullIncrementVersions(); + partition->DatabaseModified(); idle_add(IDLE_DATABASE); } diff --git a/src/Partition.cxx b/src/Partition.cxx index 3619ff7f0..0ad1692a6 100644 --- a/src/Partition.cxx +++ b/src/Partition.cxx @@ -21,6 +21,12 @@ #include "Partition.hxx" #include "Song.hxx" +void +Partition::DatabaseModified() +{ + playlist.FullIncrementVersions(); +} + void Partition::TagModified() { diff --git a/src/Partition.hxx b/src/Partition.hxx index 1d326b147..dbc79b4ba 100644 --- a/src/Partition.hxx +++ b/src/Partition.hxx @@ -166,6 +166,12 @@ struct Partition { playlist.SetConsume(new_value); } + /** + * The database has been modified. Propagate the change to + * all subsystems. + */ + void DatabaseModified(); + /** * A tag in the play queue has been modified by the player * thread. Propagate the change to all subsystems. -- cgit v1.2.3