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:
@@ -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();
|
||||||
|
@@ -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 );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user