1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-19 15:29:42 +01:00

Add position to currenttrack response of json api

This commit is contained in:
Dominik Schmidt 2014-12-05 02:07:25 +01:00
parent f7a6b32d08
commit 52e9aad61b

View File

@ -96,6 +96,7 @@ Api_v1_5::playback( QxtWebRequestEvent* event, const QString& command )
{
QVariantMap trackInfo;
trackInfo.insert( "playing", true );
trackInfo.insert( "position", AudioEngine::instance()->currentTime() / 1000 );
trackInfo.insert( "bitrate", currentTrack->bitrate() );
if ( !currentTrack->resolvedBy().isNull() ) {
QString resolverName = currentTrack->resolvedBy()->name();