Partition: add method EmitIdle()
Prepare for moving idle events to class Partition. Right now, it's just a wrapper for idle_add().
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#include "mixer/Volume.hxx"
|
||||
#include "Partition.hxx"
|
||||
#include "Instance.hxx"
|
||||
#include "Idle.hxx"
|
||||
#include "AudioFormat.hxx"
|
||||
#include "ReplayGainConfig.hxx"
|
||||
|
||||
@@ -348,6 +349,7 @@ handle_replay_gain_mode(Client &client, Request args, Response &r)
|
||||
}
|
||||
|
||||
client.partition.outputs.SetReplayGainMode(replay_gain_get_real_mode(client.playlist.queue.random));
|
||||
client.partition.EmitIdle(IDLE_OPTIONS);
|
||||
return CommandResult::OK;
|
||||
}
|
||||
|
||||
|
@@ -230,7 +230,7 @@ handle_mount(Client &client, Request args, Response &r)
|
||||
}
|
||||
|
||||
composite.Mount(local_uri, storage);
|
||||
idle_add(IDLE_MOUNT);
|
||||
client.partition.EmitIdle(IDLE_MOUNT);
|
||||
|
||||
#ifdef ENABLE_DATABASE
|
||||
Database *_db = client.partition.instance.database;
|
||||
@@ -249,7 +249,7 @@ handle_mount(Client &client, Request args, Response &r)
|
||||
|
||||
// TODO: call Instance::OnDatabaseModified()?
|
||||
// TODO: trigger database update?
|
||||
idle_add(IDLE_DATABASE);
|
||||
client.partition.EmitIdle(IDLE_DATABASE);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -287,7 +287,7 @@ handle_unmount(Client &client, Request args, Response &r)
|
||||
|
||||
if (db.Unmount(local_uri))
|
||||
// TODO: call Instance::OnDatabaseModified()?
|
||||
idle_add(IDLE_DATABASE);
|
||||
client.partition.EmitIdle(IDLE_DATABASE);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -296,7 +296,7 @@ handle_unmount(Client &client, Request args, Response &r)
|
||||
return CommandResult::ERROR;
|
||||
}
|
||||
|
||||
idle_add(IDLE_MOUNT);
|
||||
client.partition.EmitIdle(IDLE_MOUNT);
|
||||
|
||||
return CommandResult::OK;
|
||||
}
|
||||
|
Reference in New Issue
Block a user