mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-21 08:19:42 +01:00
Merge remote branch 'origin/master' into osxrelesae
This commit is contained in:
commit
cdcc6516df
@ -564,8 +564,9 @@ DatabaseImpl::resultFromHint( const Tomahawk::query_ptr& origquery )
|
||||
res->setAlbum( Tomahawk::album_ptr( new Tomahawk::Album( 0, origquery->album(), res->artist() ) ) );
|
||||
res->setTrack( origquery->track() );
|
||||
res->setDuration( origquery->duration() );
|
||||
res->setFriendlySource( url );
|
||||
return res;*/
|
||||
res->setFriendlySource( url );*/
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
res = Tomahawk::result_ptr( new Tomahawk::Result() );
|
||||
|
@ -39,6 +39,7 @@ ResolversModel::ResolversModel( const QStringList& allResolvers, const QStringLi
|
||||
if( changed )
|
||||
TomahawkSettings::instance()->setEnabledScriptResolvers( m_enabledResolvers );
|
||||
|
||||
addInstalledResolvers();
|
||||
}
|
||||
|
||||
|
||||
@ -152,3 +153,30 @@ ResolversModel::enabledResolvers() const
|
||||
return m_enabledResolvers;
|
||||
}
|
||||
|
||||
void
|
||||
ResolversModel::addInstalledResolvers()
|
||||
{
|
||||
QList< QDir > pluginDirs;
|
||||
|
||||
QDir appDir( qApp->applicationDirPath() );
|
||||
QDir libDir( CMAKE_INSTALL_PREFIX "/lib" );
|
||||
|
||||
QDir lib64Dir( appDir );
|
||||
lib64Dir.cdUp();
|
||||
lib64Dir.cd( "lib64" );
|
||||
|
||||
pluginDirs << appDir << libDir << lib64Dir << QDir( qApp->applicationDirPath() );
|
||||
foreach ( const QDir& pluginDir, pluginDirs )
|
||||
{
|
||||
qDebug() << "Checking directory for resolvers:" << pluginDir;
|
||||
foreach ( QString fileName, pluginDir.entryList( QStringList() << "*_tomahawkresolver*", QDir::Files ) ){
|
||||
if ( fileName.contains( "_tomahawkresolver" ) ) {
|
||||
const QString path = pluginDir.absoluteFilePath( fileName );
|
||||
if( !m_allResolvers.contains( path ) ) {
|
||||
m_allResolvers.append( path );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -48,6 +48,8 @@ public:
|
||||
QStringList allResolvers() const;
|
||||
QStringList enabledResolvers() const;
|
||||
private:
|
||||
void addInstalledResolvers();
|
||||
|
||||
QStringList m_allResolvers;
|
||||
QStringList m_enabledResolvers;
|
||||
};
|
||||
|
@ -182,7 +182,7 @@ TomahawkApp::init()
|
||||
registerMetaTypes();
|
||||
|
||||
new TomahawkSettings( this );
|
||||
|
||||
|
||||
#ifdef LIBLASTFM_FOUND
|
||||
qDebug() << "Setting NAM.";
|
||||
TomahawkUtils::setNam( lastfm::nam() );
|
||||
@ -204,7 +204,7 @@ TomahawkApp::init()
|
||||
}
|
||||
else
|
||||
TomahawkUtils::setProxy( new QNetworkProxy( QNetworkProxy::NoProxy ) );
|
||||
|
||||
|
||||
Echonest::Config::instance()->setAPIKey( "JRIHWEP6GPOER2QQ6" );
|
||||
|
||||
m_audioEngine = new AudioEngine;
|
||||
|
Loading…
x
Reference in New Issue
Block a user