mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 06:07:37 +02:00
TWK-1009: Save spotify id from dragging in playlists to tracks
This commit is contained in:
@@ -181,10 +181,7 @@ Playlist::create( const source_ptr& author,
|
|||||||
p->setGuid( uuid() );
|
p->setGuid( uuid() );
|
||||||
p->setDuration( query->duration() );
|
p->setDuration( query->duration() );
|
||||||
p->setLastmodified( 0 );
|
p->setLastmodified( 0 );
|
||||||
QString annotation = "";
|
p->setAnnotation( query->property( "annotation" ).toString() );
|
||||||
if ( !query->property( "annotation" ).toString().isEmpty() )
|
|
||||||
annotation = query->property( "annotation" ).toString();
|
|
||||||
p->setAnnotation( annotation );
|
|
||||||
p->setQuery( query );
|
p->setQuery( query );
|
||||||
|
|
||||||
entries << p;
|
entries << p;
|
||||||
|
@@ -237,6 +237,7 @@ SpotifyParser::spotifyBrowseFinished()
|
|||||||
|
|
||||||
tLog() << "Setting resulthint to " << trackResult.value( "trackuri" );
|
tLog() << "Setting resulthint to " << trackResult.value( "trackuri" );
|
||||||
q->setResultHint( trackResult.value( "trackuri" ).toString() );
|
q->setResultHint( trackResult.value( "trackuri" ).toString() );
|
||||||
|
q->setProperty( "annotation", trackResult.value( "trackuri" ).toString() );
|
||||||
|
|
||||||
m_tracks << q;
|
m_tracks << q;
|
||||||
}
|
}
|
||||||
@@ -337,8 +338,12 @@ SpotifyParser::playlistListingResult( const QString& msgType, const QVariantMap&
|
|||||||
if ( q.isNull() )
|
if ( q.isNull() )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if( !trackMap.value( "id" ).toString().isEmpty() )
|
const QString id = trackMap.value( "id" ).toString();
|
||||||
q->setResultHint( trackMap.value( "id" ).toString() );
|
if( !id.isEmpty() )
|
||||||
|
{
|
||||||
|
q->setResultHint( id );
|
||||||
|
q->setProperty( "annotation", id );
|
||||||
|
}
|
||||||
|
|
||||||
m_tracks << q;
|
m_tracks << q;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user