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:
parent
a5596e0288
commit
825903f294
@ -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" );
|
||||
|
@ -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 )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user