Partition: add method DatabaseModified()

This commit is contained in:
Max Kellermann 2013-10-22 00:26:20 +02:00
parent c7bbfef19a
commit 4de3b6dc80
3 changed files with 13 additions and 1 deletions

View File

@ -31,7 +31,7 @@ Instance::DeleteSong(const Song &song)
void
Instance::DatabaseModified()
{
partition->playlist.FullIncrementVersions();
partition->DatabaseModified();
idle_add(IDLE_DATABASE);
}

View File

@ -21,6 +21,12 @@
#include "Partition.hxx"
#include "Song.hxx"
void
Partition::DatabaseModified()
{
playlist.FullIncrementVersions();
}
void
Partition::TagModified()
{

View File

@ -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.