1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-19 15:29:42 +01:00

Allow parsing of grooveshark tinysong.com links

This commit is contained in:
Stefan Derkits 2011-12-24 22:43:25 +01:00
parent 9634d3230f
commit bd893995c3
2 changed files with 4 additions and 1 deletions

View File

@ -93,7 +93,9 @@ GroovesharkParser::lookupGroovesharkPlaylist( const QString& linkRaw )
QStringList urlParts = linkRaw.split( "/" );
bool ok;
int playlistID = urlParts.last().toInt( &ok, 10 );
QString playlistStr = urlParts.last();
playlistStr.truncate(playlistStr.indexOf("?"));
int playlistID = playlistStr.toInt( &ok, 10 );
if (!ok)
{
tDebug() << "incorrect grooveshark url";

View File

@ -56,6 +56,7 @@ ShortenedLinkParser::handlesUrl( const QString& url )
url.contains( "fb.me" ) ||
url.contains( "itun.es" ) ||
url.contains( "tinyurl.com" ) ||
url.contains( "tinysong.com" ) ||
url.contains( "rd.io" ) );
}