mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-11 08:34:34 +02:00
Allow plugins to enforce reloading of the resolver, to invalidate old results
This commit is contained in:
@@ -906,6 +906,14 @@ JSResolverHelper::deleteFuzzyIndex()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
JSResolverHelper::readdResolver()
|
||||||
|
{
|
||||||
|
Pipeline::instance()->removeResolver( m_resolver );
|
||||||
|
Pipeline::instance()->addResolver( m_resolver );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
JSResolverHelper::returnStreamUrl( const QString& streamUrl, const QMap<QString, QString>& headers,
|
JSResolverHelper::returnStreamUrl( const QString& streamUrl, const QMap<QString, QString>& headers,
|
||||||
std::function< void( const QString&, QSharedPointer< QIODevice >& ) > callback )
|
std::function< void( const QString&, QSharedPointer< QIODevice >& ) > callback )
|
||||||
|
@@ -115,12 +115,20 @@ public:
|
|||||||
Q_INVOKABLE QVariantList resolveFromFuzzyIndex( const QString& artist, const QString& album, const QString& tracks );
|
Q_INVOKABLE QVariantList resolveFromFuzzyIndex( const QString& artist, const QString& album, const QString& tracks );
|
||||||
Q_INVOKABLE void deleteFuzzyIndex();
|
Q_INVOKABLE void deleteFuzzyIndex();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is horrible, we can use it to invalidate resolver results when the config changes
|
||||||
|
* TODO: register the resolver through registerPlugin and remove it through standard methods
|
||||||
|
*/
|
||||||
|
Q_INVOKABLE void readdResolver();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* INTERNAL USE ONLY!
|
* INTERNAL USE ONLY!
|
||||||
*/
|
*/
|
||||||
void customIODeviceFactory( const Tomahawk::result_ptr&, const QString& url,
|
void customIODeviceFactory( const Tomahawk::result_ptr&, const QString& url,
|
||||||
std::function< void( const QString&, QSharedPointer< QIODevice >& ) > callback ); // async
|
std::function< void( const QString&, QSharedPointer< QIODevice >& ) > callback ); // async
|
||||||
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
QByteArray readRaw( const QString& fileName );
|
QByteArray readRaw( const QString& fileName );
|
||||||
QString readBase64( const QString& fileName );
|
QString readBase64( const QString& fileName );
|
||||||
|
Reference in New Issue
Block a user