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