From 094e8653ff758eea3cf946c6520a1e2688089807 Mon Sep 17 00:00:00 2001 From: Leo Franchi Date: Sun, 2 Oct 2011 16:01:54 -0400 Subject: [PATCH] Properly name artist stations --- src/sourcetree/items/categoryitems.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/sourcetree/items/categoryitems.cpp b/src/sourcetree/items/categoryitems.cpp index 3ee9aabcf..c1237cd97 100644 --- a/src/sourcetree/items/categoryitems.cpp +++ b/src/sourcetree/items/categoryitems.cpp @@ -290,7 +290,12 @@ CategoryAddItem::parsedDroppedTracks( const QList< query_ptr >& tracks ) QTimer::singleShot( 300, APP->mainWindow()->sourceTreeView(), SLOT( renamePlaylist() ) ); } else if( m_categoryType == SourcesModel::StationsCategory ) { // seed the playlist with these song or artist filters - QString name = tracks.isEmpty() ? tr( "New Station" ) : tr( "%1 Station" ).arg( tracks.first()->track() ); + QString name; + if ( sender() && sender()->property( "dragsource" ).toString() == "artist" ) + name = tracks.isEmpty() ? tr( "New Station" ) : tr( "%1 Station" ).arg( ( tracks.first()->artist() ) ); + else + name = tracks.isEmpty() ? tr( "New Station" ) : tr( "%1 Station" ).arg( tracks.first()->track() ); + dynplaylist_ptr newpl = DynamicPlaylist::create( SourceList::instance()->getLocal(), uuid(), name, "", SourceList::instance()->getLocal()->friendlyName(), OnDemand, false ); newpl->setMode( OnDemand );