1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-07-31 11:20:22 +02:00

Change echonest API key for the win

This commit is contained in:
Leo Franchi
2011-11-09 17:30:14 -05:00
parent 987e6b97dc
commit 203b2b251c

View File

@@ -86,6 +86,7 @@
#include <sys/sysctl.h>
#endif
const char* enApiSecret = "BNvTzfthHr/d1eNhHLvL1Jo=";
void
increaseMaxFileDescriptors()
@@ -173,7 +174,11 @@ TomahawkApp::init()
tDebug() << "Init Database.";
initDatabase();
Echonest::Config::instance()->setAPIKey( "JRIHWEP6GPOER2QQ6" );
QByteArray magic = QByteArray::fromBase64( enApiSecret );
QByteArray wand = QByteArray::fromBase64( QCoreApplication::applicationName().toLatin1() );
int length = magic.length(), n2 = wand.length();
for ( int i=0; i<length; i++ ) magic[i] = magic[i] ^ wand[i%n2];
Echonest::Config::instance()->setAPIKey( magic );
tDebug() << "Init Echonest Factory.";
GeneratorFactory::registerFactory( "echonest", new EchonestFactory );