mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 05:37:29 +02:00
Adding ex.fm + If genre is not empty, use that instead of name
This commit is contained in:
@@ -34,8 +34,8 @@
|
|||||||
#include "utils/tomahawkutils.h"
|
#include "utils/tomahawkutils.h"
|
||||||
#include "utils/logger.h"
|
#include "utils/logger.h"
|
||||||
|
|
||||||
#define CHART_URL "http://charts.tomahawk-player.org:10080/"
|
//#define CHART_URL "http://charts.tomahawk-player.org:10080/"
|
||||||
//#define CHART_URL "http://localhost:8080/"
|
#define CHART_URL "http://localhost:8080/"
|
||||||
#include <qjson/parser.h>
|
#include <qjson/parser.h>
|
||||||
#include <qjson/serializer.h>
|
#include <qjson/serializer.h>
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ ChartsPlugin::ChartsPlugin()
|
|||||||
|
|
||||||
|
|
||||||
/// Add resources here
|
/// Add resources here
|
||||||
m_chartResources << "billboard" << "itunes" << "rdio" << "wearehunted";
|
m_chartResources << "billboard" << "itunes" << "rdio" << "wearehunted" << "ex.fm";
|
||||||
m_supportedGetTypes << InfoChart << InfoChartCapabilities;
|
m_supportedGetTypes << InfoChart << InfoChartCapabilities;
|
||||||
|
|
||||||
|
|
||||||
@@ -327,6 +327,7 @@ ChartsPlugin::chartTypes()
|
|||||||
if( source == "itunes" ){
|
if( source == "itunes" ){
|
||||||
chartName = "iTunes";
|
chartName = "iTunes";
|
||||||
}
|
}
|
||||||
|
|
||||||
if( source == "wearehunted" ){
|
if( source == "wearehunted" ){
|
||||||
chartName = "WeAreHunted";
|
chartName = "WeAreHunted";
|
||||||
}
|
}
|
||||||
@@ -350,6 +351,9 @@ ChartsPlugin::chartTypes()
|
|||||||
|
|
||||||
InfoStringHash c;
|
InfoStringHash c;
|
||||||
c[ "id" ] = chart.value( "id" ).toString();
|
c[ "id" ] = chart.value( "id" ).toString();
|
||||||
|
if( chart.value( "genre").isValid() )
|
||||||
|
c[ "label" ] = chart.value( "genre" ).toString();
|
||||||
|
else
|
||||||
c[ "label" ] = chart.value( "name" ).toString();
|
c[ "label" ] = chart.value( "name" ).toString();
|
||||||
if ( isDefault )
|
if ( isDefault )
|
||||||
c[ "default" ] = "true";
|
c[ "default" ] = "true";
|
||||||
|
Reference in New Issue
Block a user