1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-13 12:31:52 +02:00

Fix copying automatic playlists and stations

This commit is contained in:
Leo Franchi 2011-08-14 22:22:58 -04:00
parent a5596e0288
commit 825903f294
2 changed files with 6 additions and 2 deletions

View File

@ -187,8 +187,12 @@ GlobalActionManager::copyToClipboard( const query_ptr& query ) const
bool
GlobalActionManager::parseTomahawkLink( const QString& url )
GlobalActionManager::parseTomahawkLink( const QString& urlIn )
{
QString url = urlIn;
if( urlIn.startsWith( "http://toma.hk" ) )
url.replace( "http://toma.hk/", "tomahawk://" );
if( url.contains( "tomahawk://" ) ) {
QString cmd = url.mid( 11 );
cmd.replace( "%2B", "%20" );

View File

@ -326,7 +326,7 @@ SourceTreeView::addToLocal()
// copy to a link and then generate a new playlist from that
// this way we cheaply regenerate the needed controls
QString link = GlobalActionManager::instance()->copyPlaylistToClipboard( playlist );
dynplaylist_ptr p = GlobalActionManager::instance()->loadDynamicPlaylist( link, type == SourcesModel::Station );
GlobalActionManager::instance()->parseTomahawkLink( link );
}
else if ( type == SourcesModel::StaticPlaylist )
{