mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-13 01:24:11 +02:00
Better support for play.spotify.com
This commit is contained in:
@@ -196,10 +196,10 @@ SpotifyParser::lookupTrack( const QString& link )
|
|||||||
|
|
||||||
// we need Spotify URIs such as spotify:track:XXXXXX, so if we by chance get a http://open.spotify.com url, convert it
|
// we need Spotify URIs such as spotify:track:XXXXXX, so if we by chance get a http://open.spotify.com url, convert it
|
||||||
QString uri = link;
|
QString uri = link;
|
||||||
if ( link.contains( "open.spotify.com" ) )
|
if ( link.contains( "open.spotify.com" ) || link.contains( "play.spotify.com" ) )
|
||||||
{
|
{
|
||||||
QString hash = link;
|
QString hash = link;
|
||||||
hash.replace( "http://open.spotify.com/track/", "" );
|
hash.replace( "http://open.spotify.com/track/", "" ).replace( "http://play.spotify.com/track/", "" );
|
||||||
uri = QString( "spotify:track:%1" ).arg( hash );
|
uri = QString( "spotify:track:%1" ).arg( hash );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user