mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-10 16:14:40 +02:00
Style fix, constants
This commit is contained in:
@@ -406,9 +406,11 @@ ChartsPlugin::chartsList()
|
|||||||
|
|
||||||
if ( !ok )
|
if ( !ok )
|
||||||
{
|
{
|
||||||
|
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << "Failed to parse expire headers!";
|
||||||
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << reply->url();
|
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << reply->url();
|
||||||
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << reply->rawHeaderPairs();
|
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << reply->rawHeaderPairs();
|
||||||
}
|
}
|
||||||
|
|
||||||
// We'll populate charts with the data from the server
|
// We'll populate charts with the data from the server
|
||||||
QVariantMap charts;
|
QVariantMap charts;
|
||||||
QString chartName;
|
QString chartName;
|
||||||
@@ -433,7 +435,7 @@ ChartsPlugin::chartsList()
|
|||||||
const QString geo = chart.value( "geo" ).toString();
|
const QString geo = chart.value( "geo" ).toString();
|
||||||
QString name = chart.value( "genre" ).toString();
|
QString name = chart.value( "genre" ).toString();
|
||||||
const QString type = QString( chart.value( "type" ).toString() + "s" );
|
const QString type = QString( chart.value( "type" ).toString() + "s" );
|
||||||
bool isDefault = ( chart.contains( "default" ) && chart[ "default" ].toInt() == 1 );
|
const bool isDefault = ( chart.contains( "default" ) && chart[ "default" ].toInt() == 1 );
|
||||||
|
|
||||||
// Hack!
|
// Hack!
|
||||||
// Japan charts contains multiple duplicates, all which are linked
|
// Japan charts contains multiple duplicates, all which are linked
|
||||||
@@ -477,9 +479,7 @@ ChartsPlugin::chartsList()
|
|||||||
c[ "label" ] = name;
|
c[ "label" ] = name;
|
||||||
c[ "type" ] = "album";
|
c[ "type" ] = "album";
|
||||||
if ( isDefault )
|
if ( isDefault )
|
||||||
{
|
|
||||||
c[ "default" ] = "true";
|
c[ "default" ] = "true";
|
||||||
}
|
|
||||||
|
|
||||||
/// If this item has expired, set it to 0.
|
/// If this item has expired, set it to 0.
|
||||||
c[ "expires" ] = ( ok ? QString::number (expires ) : QString::number( 0 ) );
|
c[ "expires" ] = ( ok ? QString::number (expires ) : QString::number( 0 ) );
|
||||||
|
Reference in New Issue
Block a user