mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
Show creator of playlist in infobar if it exists
This commit is contained in:
@@ -80,7 +80,7 @@ PlaylistModel::loadPlaylist( const Tomahawk::playlist_ptr& playlist, bool loadEn
|
||||
setReadOnly( !m_playlist->author()->isLocal() );
|
||||
setTitle( playlist->title() );
|
||||
setDescription( tr( "A playlist by %1, created %2" )
|
||||
.arg( playlist->author()->isLocal() ? tr( "you" ) : playlist->author()->friendlyName() )
|
||||
.arg( playlist->creator().isEmpty() ? ( playlist->author()->isLocal() ? tr( "you" ) : playlist->author()->friendlyName() ) : playlist->creator() )
|
||||
.arg( TomahawkUtils::ageToString( QDateTime::fromTime_t( playlist->createdOn() ), true ) ) );
|
||||
|
||||
m_isTemporary = false;
|
||||
|
@@ -105,7 +105,7 @@ SpotifyParser::lookupSpotifyBrowse( const QString& linkRaw )
|
||||
m_browseUri.replace( "/", ":" );
|
||||
m_browseUri = "spotify:" + m_browseUri;
|
||||
}
|
||||
|
||||
|
||||
if ( m_browseUri.contains( "playlist" ) &&
|
||||
Tomahawk::Accounts::SpotifyAccount::instance() != 0 &&
|
||||
Tomahawk::Accounts::SpotifyAccount::instance()->loggedIn() )
|
||||
@@ -303,7 +303,7 @@ SpotifyParser::spotifyTrackLookupFinished()
|
||||
if ( !q.isNull() )
|
||||
{
|
||||
q->setResultHint( t.value( "trackuri" ).toString() );
|
||||
|
||||
|
||||
m_tracks << q;
|
||||
}
|
||||
}
|
||||
@@ -333,10 +333,10 @@ SpotifyParser::playlistListingResult( const QString& msgType, const QVariantMap&
|
||||
{
|
||||
QVariantMap trackMap = blob.toMap();
|
||||
const query_ptr q = Query::get( trackMap.value( "artist" ).toString(), trackMap.value( "track" ).toString(), trackMap.value( "album" ).toString(), uuid(), false );
|
||||
|
||||
|
||||
if ( q.isNull() )
|
||||
continue;
|
||||
|
||||
|
||||
m_tracks << q;
|
||||
}
|
||||
|
||||
@@ -355,7 +355,6 @@ SpotifyParser::checkBrowseFinished()
|
||||
|
||||
if ( m_createNewPlaylist && !m_tracks.isEmpty() )
|
||||
{
|
||||
|
||||
m_playlist = Playlist::create( SourceList::instance()->getLocal(),
|
||||
uuid(),
|
||||
m_title,
|
||||
|
Reference in New Issue
Block a user