1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-04 16:12:24 +02:00

Reset source last played when going offline---not functional yet

This commit is contained in:
Leo Franchi 2011-11-20 17:31:37 -05:00
parent ea7e641bdd
commit 24bf86fc37

View File

@ -180,6 +180,9 @@ Source::setOffline()
m_online = false;
emit offline();
m_currentTrack.clear();
emit stateChanged();
m_cc = 0;
DatabaseCommand_SourceOffline* cmd = new DatabaseCommand_SourceOffline( id() );
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>(cmd) );
@ -309,6 +312,7 @@ void
Source::onPlaybackStarted( const Tomahawk::query_ptr& query, unsigned int duration )
{
qDebug() << Q_FUNC_INFO << query->toString();
m_currentTrack = query;
m_currentTrackTimer.start( duration * 1000 + 900000 ); // duration comes in seconds