Add setting for lyric providers and add more providers

Fixes #335
This commit is contained in:
Jonas Kvinge
2020-05-08 18:35:36 +02:00
parent 6ef69f6b32
commit f44ce49ea7
39 changed files with 1834 additions and 105 deletions

View File

@@ -39,6 +39,9 @@ class LyricsProviders : public QObject {
explicit LyricsProviders(QObject *parent = nullptr);
~LyricsProviders();
void ReloadSettings();
LyricsProvider *ProviderByName(const QString &name) const;
void AddProvider(LyricsProvider *provider);
void RemoveProvider(LyricsProvider *provider);
QList<LyricsProvider*> List() const { return lyrics_providers_.keys(); }
@@ -51,7 +54,8 @@ class LyricsProviders : public QObject {
private:
Q_DISABLE_COPY(LyricsProviders)
QMap<LyricsProvider *, QString> lyrics_providers_;
QMap<LyricsProvider*, QString> lyrics_providers_;
QList<LyricsProvider*> ordered_providers_;
QMutex mutex_;
QAtomicInt next_id_;