1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-07-31 19:30:21 +02:00

Charts: Add DjShop.de

This commit is contained in:
Hugo Lindström
2013-01-24 19:52:39 +01:00
parent e345a42125
commit 96c5e7ebca

View File

@@ -423,7 +423,7 @@ ChartsPlugin::chartsList()
QVariantMap charts; QVariantMap charts;
QString chartName; QString chartName;
QStringList defaultChain; QStringList defaultChain;
if ( source == "wearehunted" || source == "itunes" || source == "hotnewhiphop" ) if ( source == "wearehunted" || source == "itunes" || source == "hotnewhiphop" || source == "djshop.de" )
{ {
// Some charts can have an extra param, itunes has geo, WAH has emerging/mainstream // Some charts can have an extra param, itunes has geo, WAH has emerging/mainstream
// Itunes has geographic-area based charts. So we build a breadcrumb of // Itunes has geographic-area based charts. So we build a breadcrumb of
@@ -481,6 +481,8 @@ ChartsPlugin::chartsList()
if ( source == "hotnewhiphop" ) if ( source == "hotnewhiphop" )
name = chart.value( "name" ).toString(); name = chart.value( "name" ).toString();
if ( source == "djshop.de" )
name = chart.value( "name" ).toString();
if ( name.isEmpty() ) // not a specific chart, an all chart if ( name.isEmpty() ) // not a specific chart, an all chart
name = tr( "Top Overall" ); name = tr( "Top Overall" );
@@ -495,6 +497,8 @@ ChartsPlugin::chartsList()
/// 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 ) );
qDebug() << Q_FUNC_INFO << "Setting type to " << type << " Extra to " << extra;
QList< Tomahawk::InfoSystem::InfoStringHash > extraTypeData = extraType[ extra ][ type ].value< QList< Tomahawk::InfoSystem::InfoStringHash > >(); QList< Tomahawk::InfoSystem::InfoStringHash > extraTypeData = extraType[ extra ][ type ].value< QList< Tomahawk::InfoSystem::InfoStringHash > >();
extraTypeData.append( c ); extraTypeData.append( c );
extraType[ extra ][ type ] = QVariant::fromValue< QList< Tomahawk::InfoSystem::InfoStringHash > >( extraTypeData ); extraType[ extra ][ type ] = QVariant::fromValue< QList< Tomahawk::InfoSystem::InfoStringHash > >( extraTypeData );
@@ -527,6 +531,10 @@ ChartsPlugin::chartsList()
{ {
chartName = "HotNewHiphop"; chartName = "HotNewHiphop";
} }
else if ( source == "djshop.de" )
{
chartName = "DjShop";
}
} }
} }
else else