mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
Remove QJson usage from Grooveshark Parser
This commit is contained in:
@@ -29,8 +29,6 @@
|
|||||||
#include <QWebFrame>
|
#include <QWebFrame>
|
||||||
#include <QWebElement>
|
#include <QWebElement>
|
||||||
|
|
||||||
#include <qjson/parser.h>
|
|
||||||
|
|
||||||
#include "Query.h"
|
#include "Query.h"
|
||||||
#include "SourceList.h"
|
#include "SourceList.h"
|
||||||
#include "DropJob.h"
|
#include "DropJob.h"
|
||||||
@@ -206,13 +204,13 @@ GroovesharkParser::groovesharkLookupFinished()
|
|||||||
|
|
||||||
if ( r->reply()->error() == QNetworkReply::NoError )
|
if ( r->reply()->error() == QNetworkReply::NoError )
|
||||||
{
|
{
|
||||||
QJson::Parser p;
|
|
||||||
bool ok;
|
bool ok;
|
||||||
QVariantMap res = p.parse( r->reply(), &ok ).toMap();
|
QByteArray jsonData = r->reply()->readAll();
|
||||||
|
QVariantMap res = TomahawkUtils::parseJson( jsonData, &ok ).toMap();
|
||||||
|
|
||||||
if ( !ok )
|
if ( !ok )
|
||||||
{
|
{
|
||||||
tLog() << "Failed to parse json from Grooveshark browse item:" << p.errorString() << "On line" << p.errorLine();
|
tLog() << "Failed to parse json from Grooveshark browse item:" << jsonData;
|
||||||
checkTrackFinished();
|
checkTrackFinished();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user