Version: 2.3.1 OS: Linux When Amarok starts and "Continue playing when Amarok is started" is selected, the applet shows five songs of the artist instead of the current track info. Reproducible: Always OS: Linux (i686) release 2.6.32-22-generic Compiler: cc
Confirmed here but for me it shows the last 5 played songs + how long ago they were played.
(In reply to comment #1) > Confirmed here but for me it shows the last 5 played songs + how long ago they > were played. Yes, that's the case.
I see this too even though I don't have "Resume playback on start" selected.
Mark, that is absolutely normal, it will change once you play something :)
The first track I play after loading Amarok doesn't show the current track info in the context window, only the last 5 tracks played. When the next song starts, it displays correctly.
Confirmed on another computer. If I start Amarok playing from the system tray without the main window showing and then bring up the main window, I'll see a short glimpse of the currently playing track followed by 'no track playing' and then a display of the last 5 tracks played.
*** Bug 250483 has been marked as a duplicate of this bug. ***
commit 82ba1151783e3cb3f19f567d9422f8e07d43bf0e Author: Mark Kretschmann <kretschmann@kde.org> Date: Fri Oct 1 14:05:31 2010 +0200 This Patch fixes Bug 241641 which causes the current engine to be not up-to-date after startup when a should continue playing. Now the current track and the albums applet show the right information just after startup. Patch by Conrad Hübler, thanks! BUG: 241641 diff --git a/src/App.cpp b/src/App.cpp index 4d0625b..cd0efa3 100644 --- a/src/App.cpp +++ b/src/App.cpp @@ -643,6 +643,12 @@ App::continueInit() splash->show(); } + if( AmarokConfig::resumePlayback() && restoreSession && !args->isSet( "stop" ) ) { + //restore session as long as the user didn't specify media to play etc. + //do this after applySettings() so OSD displays correctly + The::engineController()->restoreSession(); + } + PERF_LOG( "Creating MainWindow" ) m_mainWindow = new MainWindow(); PERF_LOG( "Done creating MainWindow" ) @@ -682,13 +688,6 @@ App::continueInit() Amarok::KNotificationBackend::instance()->setEnabled( AmarokConfig::kNotifyEnabled() ); Amarok::OSD::instance()->applySettings(); // Create after setting volume (don't show OSD for that) - - if( AmarokConfig::resumePlayback() && restoreSession && !args->isSet( "stop" ) ) { - //restore session as long as the user didn't specify media to play etc. - //do this after applySettings() so OSD displays correctly - The::engineController()->restoreSession(); - } - if( AmarokConfig::monitorChanges() ) CollectionManager::instance()->checkCollectionChanges(); diff --git a/src/context/engines/current/CurrentEngine.cpp b/src/context/engines/current/CurrentEngine.cpp index bb8e869..475b170 100644 --- a/src/context/engines/current/CurrentEngine.cpp +++ b/src/context/engines/current/CurrentEngine.cpp @@ -49,13 +49,19 @@ CurrentEngine::CurrentEngine( QObject* parent, const QList<QVariant>& args ) m_sources << "current" << "albums"; m_requested[ "current" ] = true; m_requested[ "albums" ] = false; - update(); } CurrentEngine::~CurrentEngine() { } +void +CurrentEngine::init() +{ + m_currentTrack = The::engineController()->currentTrack(); + Plasma::DataEngine::init(); +} + QStringList CurrentEngine::sources() const { diff --git a/src/context/engines/current/CurrentEngine.h b/src/context/engines/current/CurrentEngine.h index 1214e50..0369065 100644 --- a/src/context/engines/current/CurrentEngine.h +++ b/src/context/engines/current/CurrentEngine.h @@ -54,6 +54,7 @@ class CurrentEngine : public Context::DataEngine, public: CurrentEngine( QObject* parent, const QList<QVariant>& args ); virtual ~CurrentEngine(); + virtual void init(); QStringList sources() const;