mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 06:07:37 +02:00
Merge pull request #157 from xhochy/feature/support-sharemyplaylist-spotify-urls2
Urlencode Spotify URLs to open playlist encoded in Apps links
This commit is contained in:
@@ -85,6 +85,11 @@ SpotifyParser::lookupUrl( const QString& rawLink )
|
|||||||
link.replace( "/", ":" );
|
link.replace( "/", ":" );
|
||||||
link = "spotify:" + link;
|
link = "spotify:" + link;
|
||||||
}
|
}
|
||||||
|
// Some spotify apps contain the link to the playlist as url-encoded in their link (e.g. ShareMyPlaylists)
|
||||||
|
if ( link.contains( "%3A" ) )
|
||||||
|
{
|
||||||
|
link = QUrl::fromPercentEncoding( link.toUtf8() );
|
||||||
|
}
|
||||||
// TODO: Ignoring search and user querys atm
|
// TODO: Ignoring search and user querys atm
|
||||||
// (spotify:(?:(?:artist|album|track|user:[^:]+:playlist):[a-zA-Z0-9]+|user:[^:]+|search:(?:[-\w$\.+!*'(),<>:\s]+|%[a-fA-F0-9\s]{2})+))
|
// (spotify:(?:(?:artist|album|track|user:[^:]+:playlist):[a-zA-Z0-9]+|user:[^:]+|search:(?:[-\w$\.+!*'(),<>:\s]+|%[a-fA-F0-9\s]{2})+))
|
||||||
QRegExp rx( "(spotify:(?:(?:artist|album|track|user:[^:]+:playlist):[a-zA-Z0-9]+[^:]))" );
|
QRegExp rx( "(spotify:(?:(?:artist|album|track|user:[^:]+:playlist):[a-zA-Z0-9]+[^:]))" );
|
||||||
|
Reference in New Issue
Block a user