don't push new URL into engine in the CurrentMetadataChanged slot - send it the beginning and end markers only
this means that Clementine still skips broken songs while at the same time fixes issue #1565
This commit is contained in:
parent
7f48c13dc9
commit
c8c394d200
@ -277,8 +277,7 @@ void Player::PlayAt(int index, Engine::TrackChangeType change, bool reshuffle) {
|
|||||||
void Player::CurrentMetadataChanged(const Song& metadata) {
|
void Player::CurrentMetadataChanged(const Song& metadata) {
|
||||||
// those things might have changed (especially when a previously invalid
|
// those things might have changed (especially when a previously invalid
|
||||||
// song was reloaded) so we push the latest version into Engine
|
// song was reloaded) so we push the latest version into Engine
|
||||||
engine_->Load(metadata.url(), Engine::Auto,
|
engine_->RefreshMarkers(metadata.beginning_nanosec(), metadata.end_nanosec());
|
||||||
metadata.beginning_nanosec(), metadata.end_nanosec());
|
|
||||||
|
|
||||||
#ifdef HAVE_LIBLASTFM
|
#ifdef HAVE_LIBLASTFM
|
||||||
lastfm_->NowPlaying(metadata);
|
lastfm_->NowPlaying(metadata);
|
||||||
|
@ -64,6 +64,13 @@ class Base : public QObject, boost::noncopyable {
|
|||||||
// in miliseconds.
|
// in miliseconds.
|
||||||
virtual bool Load(const QUrl& url, TrackChangeType change,
|
virtual bool Load(const QUrl& url, TrackChangeType change,
|
||||||
quint64 beginning_nanosec, qint64 end_nanosec);
|
quint64 beginning_nanosec, qint64 end_nanosec);
|
||||||
|
// Sets new values for the beginning and end markers of the currently playing
|
||||||
|
// song.
|
||||||
|
// This doesn't change the state of engine or the stream's current position.
|
||||||
|
virtual void RefreshMarkers(quint64 beginning_nanosec, qint64 end_nanosec) {
|
||||||
|
beginning_nanosec_ = beginning_nanosec;
|
||||||
|
end_nanosec_ = end_nanosec;
|
||||||
|
}
|
||||||
|
|
||||||
// Plays a media stream represented with the URL 'u' from the given 'beginning'
|
// Plays a media stream represented with the URL 'u' from the given 'beginning'
|
||||||
// to the given 'end' (usually from 0 to a song's length). Both markers
|
// to the given 'end' (usually from 0 to a song's length). Both markers
|
||||||
|
Loading…
x
Reference in New Issue
Block a user