diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-08-13 17:37:52 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-08-14 00:05:06 +0100 |
| commit | 1fe6bd7f8ba059322b8357b2210f0fd590567ce2 (patch) | |
| tree | 2c76fbf24b9b520f94f741040f11dc920d3bab91 /src/lib/playlist.cc | |
| parent | f30ad4dec0a3fa5f1770fba93106a3e8910d66ba (diff) | |
More fixes for errors / crashes / misbehaviour with content changes
and the butler.
Here we signal both before and after a change in content. Before,
the player disables itself so that any pass()/seek() will be no-ops.
After, the player rebuilds its pieces and the butler re-seeks to
get back to where it was before the change.
Diffstat (limited to 'src/lib/playlist.cc')
| -rw-r--r-- | src/lib/playlist.cc | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/lib/playlist.cc b/src/lib/playlist.cc index c830e5e1e..1bb0ad0d6 100644 --- a/src/lib/playlist.cc +++ b/src/lib/playlist.cc @@ -65,6 +65,18 @@ Playlist::~Playlist () } void +Playlist::content_may_change () +{ + ContentMayChange (); +} + +void +Playlist::content_not_changed () +{ + ContentNotChanged (); +} + +void Playlist::content_changed (weak_ptr<Content> content, int property, bool frequent) { if ( @@ -350,7 +362,9 @@ Playlist::reconnect () _content_connections.clear (); BOOST_FOREACH (shared_ptr<Content> i, _content) { - _content_connections.push_back (i->Changed.connect (bind (&Playlist::content_changed, this, _1, _2, _3))); + _content_connections.push_back (i->MayChange.connect(boost::bind(&Playlist::content_may_change, this))); + _content_connections.push_back (i->Changed.connect(boost::bind(&Playlist::content_changed, this, _1, _2, _3))); + _content_connections.push_back (i->NotChanged.connect(boost::bind(&Playlist::content_not_changed, this))); } } |
