Revision 5bfcf25...

Go back to digest for 28th July 2013

Optimization in Multimedia

Konrad Zemek committed changes in [amarok] /:

Reimplement RecentlyPlayedListWidget

Rewrote RecentlyPlayedListWidget from the basics. There was a major
inconsistency in this widget, where tracks were added to it if they were
recently played at all, but the time shown was the "Last Played"
statistic which is only updated after whole song is played. This
caused gravely incorrect data to be displayed (see bug 302485).

There were two different methods of solving the inconsistency: focusing
on the "Last Played" time, and adding songs to the widget only if the
"Last Played" changed; and focusing on recent plays completely
disregarding "Last Played". I opted for the latter as I felt it fits the
widget's nature better.

Because we can't rely on already available data, the widget needs to do
its own housekeeping. It saves its data on shutdown, to be restored
on next startup. One other major benefit of this approach is that
widget's data remains correct even if collections change, while
previously tracks from removed collections would disappear.

Finally, I added the feature to add tracks to playlist directly from the
widget, provided that the track exists.




FIXED-IN: 2.8
REVIEW: 111655

File Changes

Modified 3 files
  •   ChangeLog
  •   src/context/widgets/RecentlyPlayedListWidget.cpp
  •   src/context/widgets/RecentlyPlayedListWidget.h
3 files changed in total