summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-12-01 20:00:09 +0100
committerCarl Hetherington <cth@carlh.net>2022-12-01 20:00:09 +0100
commita733da8088152a2487691629753fe8a2addfa5a3 (patch)
tree789f3ddf26e56fb7733614f655474d7af0e3e1ed /src/lib
parent704e1112538d809fd55bd7f25385eaa5d064966c (diff)
Save playlist when content is added, moved or removed.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/spl.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/lib/spl.h b/src/lib/spl.h
index b002a0882..f55a9fe1f 100644
--- a/src/lib/spl.h
+++ b/src/lib/spl.h
@@ -114,6 +114,21 @@ public:
Changed(Change::NAME);
}
+ void add(SPLEntry e) {
+ SPL::add(e);
+ Changed(Change::CONTENT);
+ }
+
+ void remove(std::size_t index) {
+ SPL::remove(index);
+ Changed(Change::CONTENT);
+ }
+
+ void swap(size_t a, size_t b) {
+ SPL::swap(a, b);
+ Changed(Change::CONTENT);
+ }
+
boost::signals2::signal<void (Change)> Changed;
};