1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-14 04:51:53 +02:00

Merge branch 'master' of github.com:tomahawk-player/tomahawk

This commit is contained in:
Jason Herskowitz 2012-12-31 15:31:28 -05:00
commit 361e1aa225
2 changed files with 24 additions and 24 deletions

View File

@ -87,7 +87,8 @@ connect and stream from you?</source>
<message>
<location filename="../src/widgets/AccountWidget.cpp" line="125"/>
<source>Invite</source>
<translation type="unfinished"/>
<translation>Пригласить
</translation>
</message>
</context>
<context>
@ -95,7 +96,7 @@ connect and stream from you?</source>
<message>
<location filename="../src/widgets/AccountsToolButton.cpp" line="88"/>
<source>Configure Accounts</source>
<translation type="unfinished"/>
<translation>Настройки аккаунта</translation>
</message>
</context>
<context>
@ -200,7 +201,7 @@ connect and stream from you?</source>
<message>
<location filename="../src/libtomahawk/ActionCollection.cpp" line="113"/>
<source>Zoom</source>
<translation type="unfinished"/>
<translation>Увеличить</translation>
</message>
<message>
<location filename="../src/libtomahawk/ActionCollection.cpp" line="116"/>
@ -363,7 +364,7 @@ connect and stream from you?</source>
<message>
<location filename="../src/AudioControls.cpp" line="282"/>
<source>Love</source>
<translation type="unfinished"/>
<translation>Любимый</translation>
</message>
</context>
<context>
@ -2074,7 +2075,7 @@ connect and stream from you?</source>
<message>
<location filename="../src/accounts/xmpp/googlewrapper/GoogleWrapper.cpp" line="89"/>
<source>Google Address:</source>
<translation type="unfinished"/>
<translation>Адрес Google:</translation>
</message>
<message>
<location filename="../src/accounts/xmpp/googlewrapper/GoogleWrapper.cpp" line="90"/>

View File

@ -941,30 +941,29 @@ LastFmInfoPlugin::onAuthenticated()
return;
}
if ( authJob->error() == QNetworkReply::NoError )
lastfm::XmlQuery lfm;
lfm.parse( authJob->readAll() );
if ( authJob->error() == QNetworkReply::NoError && lfm.attribute("status") == "ok" )
{
lastfm::XmlQuery lfm;
lfm.parse( authJob->readAll() );
lastfm::ws::SessionKey = lfm[ "session" ][ "key" ].text();
m_account.data()->setSessionKey( lastfm::ws::SessionKey.toLatin1() );
if ( lfm.children( "error" ).size() > 0 )
{
tLog() << "Error from authenticating with Last.fm service:" << lfm.text();
m_account.data()->setSessionKey( QByteArray() );
}
else
{
lastfm::ws::SessionKey = lfm[ "session" ][ "key" ].text();
m_account.data()->setSessionKey( lastfm::ws::SessionKey.toLatin1() );
// qDebug() << "Got session key from last.fm";
if ( m_account.data()->scrobble() )
m_scrobbler = new lastfm::Audioscrobbler( "thk" );
}
if ( m_account.data()->scrobble() )
m_scrobbler = new lastfm::Audioscrobbler( "thk" );
}
else
{
tLog() << "Got error in Last.fm authentication job:" << authJob->errorString();
m_account.data()->setSessionKey( QByteArray() );
QString error = "Got error in Last.fm authentication job";
if ( lfm.children( "error" ).size() > 0 )
error += ": " + lfm.text();
else if ( authJob->error() != QNetworkReply::NoError )
error += ": " + authJob->errorString();
else
error += ".";
tLog() << error.simplified();
}
authJob->deleteLater();