Summary: | TrackChange - receiving signal twice | ||
---|---|---|---|
Product: | [Applications] amarok | Reporter: | Florent Peterschmitt <florent> |
Component: | D-Bus interfaces | Assignee: | Amarok Developers <amarok-bugs-dist> |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | alex.merry |
Priority: | NOR | ||
Version: | 2.7.1 | ||
Target Milestone: | 2.8 | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/amarok/f5d15e9465c6fa3d0a3997bf57130fe5e592c56e | Version Fixed In: | 2.8 |
Sentry Crash Report: |
Description
Florent Peterschmitt
2013-06-25 15:34:47 UTC
It does the same also on FreeBSD. Review request at https://git.reviewboard.kde.org/r/111512/ Git commit f5d15e9465c6fa3d0a3997bf57130fe5e592c56e by Alex Merry. Committed on 14/07/2013 at 22:53. Pushed by alexmerry into branch 'master'. MPRIS2: avoid updating Metadata when between tracks When changing tracks, we would emit PropertiesChanged for Metadata twice, once with mpris:trackid set to /org/kde/amarok/PendingTrack and once with the actual new trackid (because the first time the playlist code had not yet updated the active track). If the track was changed manually (not just progressing to the next one) we would often also emit a PropertiesChanged with an empty Metadata before repopulating it. This solves the first issue by making the signal connection for trackChanged from EngineController queued, meaning that by the time the MPRIS2 code gets the signal, the playlist has updated the activeTrack and we can easily figure out the correct trackid. It solves the second issue by ignoring the trackLengthChanged signal when it has a meaningless value (<0), which seems to happen at some point during track changes that are not predictable. REVIEW: 111512 M +1 -0 ChangeLog M +9 -3 src/dbus/mpris2/MediaPlayer2Player.cpp http://commits.kde.org/amarok/f5d15e9465c6fa3d0a3997bf57130fe5e592c56e |