Bug 168789 - JJ: song playing on exit not remembered
Summary: JJ: song playing on exit not remembered
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Playlist (show other bugs)
Version: 2.0-SVN
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords: junior-jobs
: 175012 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-08-09 01:01 UTC by a thing
Modified: 2008-12-05 00:45 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description a thing 2008-08-09 01:01:05 UTC
Version:           2.0-svn (using KDE 4.1.0)
Installed from:    Fedora RPMs

Amarok remembers the playlist on exit, but not what song it was last playing. It should be selected, but not playing, upon opening Amarok again if the "Resume playback on start" option is not checked.
Comment 1 Dan Meltzer 2008-08-17 19:39:05 UTC
Agreed.

Unfortunatly, doing this requires saving the playlist in the database so we can flag the active track... we should probably do this anyways, however.
Comment 2 Gary Steinert 2008-11-13 18:38:39 UTC
@Dan: How is the playlist stored currently? Surely it must just be a case of saving the position of the track within the playlist (i.e. track 7) rather than saving the entire playlist twice. (First in the database, second wherever it's saved now).
Comment 3 Mark Kretschmann 2008-11-13 19:30:19 UTC
Playlist is stored in current.xspf
Comment 4 Gary Steinert 2008-11-17 16:29:54 UTC
SVN commit 885628 by gsteinert:

If resume playing on startup is not selected, Amarok will select the last song 
playing in the playlist on startup.

BUG:168789



 M  +4 -0      App.cpp  
 M  +4 -0      amarok.kcfg  
 M  +15 -0     playlist/PlaylistModel.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=885628
Comment 5 Mark Kretschmann 2008-11-19 11:54:49 UTC
SVN commit 886469 by markey:

Revert "If resume playing on startup is not selected, Amarok will select the last song "

Sorry Gary, but this commit had side effects: It causes the
EngineController to send out a metadataChanged() notification, which
shows the OSD briefly on startup.

This reverts commit 0d3424a9f3842b0d0b727f64f403a2125b2dfc6a.
(SVN commit 885628 by gsteinert)

CCBUG: 168789

 M  +0 -4      App.cpp  
 M  +0 -4      amarok.kcfg  
 M  +0 -15     playlist/PlaylistModel.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=886469
Comment 6 Gary Steinert 2008-11-20 05:31:55 UTC
SVN commit 886800 by gsteinert:

Remembers the last playing song on restart.

I think I've fixed the problems with the OSD appearing briefly at startup. At 
least, there is no sign of metaDataChanged() in the console output.

This does however expose Playlist::Actions::m_nextTrackCandidate with the 
requestTrack() function. I'm hoping nobody has a problem with this =)

BUG:168789



 M  +4 -0      App.cpp  
 M  +4 -0      amarok.kcfg  
 M  +7 -0      playlist/PlaylistActions.cpp  
 M  +5 -0      playlist/PlaylistActions.h  
 M  +12 -0     playlist/PlaylistModel.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=886800
Comment 7 vinc.man 2008-12-05 00:45:01 UTC
*** Bug 175012 has been marked as a duplicate of this bug. ***