1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-12 09:04:33 +02:00

* If we couldn't shorten the url, emit the longUrl as shortUrl.

This commit is contained in:
Christian Muehlhaeuser
2011-09-10 12:07:22 +02:00
parent 89f39f1a1f
commit efaa1eb18f
2 changed files with 2 additions and 4 deletions

View File

@@ -837,7 +837,7 @@ GlobalActionManager::shortenLinkRequestFinished()
if ( !error ) if ( !error )
emit shortLinkReady( longUrl, shortUrl ); emit shortLinkReady( longUrl, shortUrl );
else else
emit shortLinkReady( longUrl, QUrl( "" ) ); emit shortLinkReady( longUrl, longUrl );
} }
reply->deleteLater(); reply->deleteLater();

View File

@@ -101,9 +101,8 @@ AdiumPlugin::shortLinkReady( QUrl longUrl, QUrl shortUrl )
nowPlaying.replace( "\"", "\\\"" ); // Escape quotes, or Applescript gets confused nowPlaying.replace( "\"", "\\\"" ); // Escape quotes, or Applescript gets confused
// We failed to get the short URL, just update the status with the metadata // We failed to get the short URL, just update the status with the metadata
if( ( longUrl.toString() == "" ) || ( shortUrl.toString() == "" ) ) if( ( longUrl.toString() == "" ) )
{ {
qDebug() << "nowPlaying: " << nowPlaying;
setStatus( nowPlaying ); setStatus( nowPlaying );
return; return;
} }
@@ -111,7 +110,6 @@ AdiumPlugin::shortLinkReady( QUrl longUrl, QUrl shortUrl )
// Add the short URL // Add the short URL
nowPlaying.append( " " ); nowPlaying.append( " " );
nowPlaying.append( shortUrl.toEncoded() ); nowPlaying.append( shortUrl.toEncoded() );
qDebug() << "nowPlaying: " << nowPlaying;
setStatus( nowPlaying ); setStatus( nowPlaying );
} }