mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 06:07:37 +02:00
Fix copying automatic playlists and stations
This commit is contained in:
@@ -187,8 +187,12 @@ GlobalActionManager::copyToClipboard( const query_ptr& query ) const
|
|||||||
|
|
||||||
|
|
||||||
bool
|
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://" ) ) {
|
if( url.contains( "tomahawk://" ) ) {
|
||||||
QString cmd = url.mid( 11 );
|
QString cmd = url.mid( 11 );
|
||||||
cmd.replace( "%2B", "%20" );
|
cmd.replace( "%2B", "%20" );
|
||||||
|
@@ -326,7 +326,7 @@ SourceTreeView::addToLocal()
|
|||||||
// copy to a link and then generate a new playlist from that
|
// copy to a link and then generate a new playlist from that
|
||||||
// this way we cheaply regenerate the needed controls
|
// this way we cheaply regenerate the needed controls
|
||||||
QString link = GlobalActionManager::instance()->copyPlaylistToClipboard( playlist );
|
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 )
|
else if ( type == SourcesModel::StaticPlaylist )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user