Make the lyric providers configurable again

This commit is contained in:
David Sansome 2010-10-10 16:46:35 +00:00
parent 2f3732e73e
commit 2aa20d3dee
50 changed files with 349 additions and 182 deletions

View File

@ -135,6 +135,7 @@ set(SOURCES
songinfo/lyricsettings.cpp songinfo/lyricsettings.cpp
songinfo/songinfobase.cpp songinfo/songinfobase.cpp
songinfo/songinfofetcher.cpp songinfo/songinfofetcher.cpp
songinfo/songinfoprovider.cpp
songinfo/songinfoview.cpp songinfo/songinfoview.cpp
songinfo/ultimatelyricsprovider.cpp songinfo/ultimatelyricsprovider.cpp
songinfo/ultimatelyricsreader.cpp songinfo/ultimatelyricsreader.cpp

View File

@ -15,13 +15,16 @@
*/ */
#include "lyricsettings.h" #include "lyricsettings.h"
#include "songinfoview.h"
#include "ultimatelyricsprovider.h"
#include "ui_lyricsettings.h" #include "ui_lyricsettings.h"
#include <QSettings> #include <QSettings>
LyricSettings::LyricSettings(QWidget *parent) LyricSettings::LyricSettings(QWidget *parent)
: QWidget(parent), : QWidget(parent),
ui_(new Ui_LyricSettings) ui_(new Ui_LyricSettings),
view_(NULL)
{ {
ui_->setupUi(this); ui_->setupUi(this);
@ -38,23 +41,21 @@ LyricSettings::~LyricSettings() {
} }
void LyricSettings::Load() { void LyricSettings::Load() {
/*QList<LyricProvider*> providers = fetcher_->providers(); QList<const UltimateLyricsProvider*> providers = view_->lyric_providers();
ui_->providers->clear(); ui_->providers->clear();
foreach (const LyricProvider* provider, providers) { foreach (const UltimateLyricsProvider* provider, providers) {
QListWidgetItem* item = new QListWidgetItem(ui_->providers); QListWidgetItem* item = new QListWidgetItem(ui_->providers);
item->setText(provider->name()); item->setText(provider->name());
item->setCheckState(provider->is_enabled() ? Qt::Checked : Qt::Unchecked); item->setCheckState(provider->is_enabled() ? Qt::Checked : Qt::Unchecked);
item->setForeground(provider->is_enabled() ? palette().color(QPalette::Active, QPalette::Text) item->setForeground(provider->is_enabled() ? palette().color(QPalette::Active, QPalette::Text)
: palette().color(QPalette::Disabled, QPalette::Text)); : palette().color(QPalette::Disabled, QPalette::Text));
}*/ }
} }
void LyricSettings::Save() { void LyricSettings::Save() {
/*QSettings s; QSettings s;
s.beginGroup(LyricFetcher::kSettingsGroup); s.beginGroup(SongInfoView::kSettingsGroup);
s.setValue("download", ui_->download->isChecked());
QVariantList search_order; QVariantList search_order;
for (int i=0 ; i<ui_->providers->count() ; ++i) { for (int i=0 ; i<ui_->providers->count() ; ++i) {
@ -62,7 +63,7 @@ void LyricSettings::Save() {
if (item->checkState() == Qt::Checked) if (item->checkState() == Qt::Checked)
search_order << item->text(); search_order << item->text();
} }
s.setValue("search_order", search_order);*/ s.setValue("search_order", search_order);
} }
void LyricSettings::CurrentItemChanged(QListWidgetItem* item) { void LyricSettings::CurrentItemChanged(QListWidgetItem* item) {

View File

@ -19,6 +19,7 @@
#include <QWidget> #include <QWidget>
class SongInfoView;
class Ui_LyricSettings; class Ui_LyricSettings;
class QListWidgetItem; class QListWidgetItem;
@ -30,6 +31,8 @@ public:
LyricSettings(QWidget *parent = 0); LyricSettings(QWidget *parent = 0);
~LyricSettings(); ~LyricSettings();
void SetSongInfoView(SongInfoView* view) { view_ = view; }
void Load(); void Load();
void Save(); void Save();
@ -43,6 +46,7 @@ private slots:
private: private:
Ui_LyricSettings* ui_; Ui_LyricSettings* ui_;
SongInfoView* view_;
}; };
#endif // LYRICSETTINGS_H #endif // LYRICSETTINGS_H

View File

@ -15,21 +15,17 @@
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">
<item> <item>
<widget class="QCheckBox" name="download"> <widget class="QLabel" name="label">
<property name="text"> <property name="text">
<string>Download lyrics from the Internet</string> <string>Choose the websites you want Clementine to use when searching for lyrics.</string>
</property> </property>
<property name="checked"> <property name="wordWrap">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QWidget" name="internet_container" native="true">
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="margin">
<number>0</number>
</property>
<item> <item>
<widget class="QListWidget" name="providers"/> <widget class="QListWidget" name="providers"/>
</item> </item>
@ -71,27 +67,9 @@
</layout> </layout>
</item> </item>
</layout> </layout>
</widget>
</item> </item>
</layout> </layout>
</widget> </widget>
<resources/> <resources/>
<connections> <connections/>
<connection>
<sender>download</sender>
<signal>toggled(bool)</signal>
<receiver>internet_container</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>67</x>
<y>18</y>
</hint>
<hint type="destinationlabel">
<x>114</x>
<y>52</y>
</hint>
</hints>
</connection>
</connections>
</ui> </ui>

View File

@ -40,6 +40,7 @@ public:
public slots: public slots:
void SongChanged(const Song& metadata); void SongChanged(const Song& metadata);
void SongFinished(); void SongFinished();
virtual void ReloadSettings() {}
protected: protected:
void showEvent(QShowEvent* e); void showEvent(QShowEvent* e);

View File

@ -35,9 +35,11 @@ int SongInfoFetcher::FetchInfo(const Song& metadata) {
results_[id] = Result(); results_[id] = Result();
foreach (SongInfoProvider* provider, providers_) { foreach (SongInfoProvider* provider, providers_) {
if (provider->is_enabled()) {
waiting_for_[id].append(provider); waiting_for_[id].append(provider);
provider->FetchInfo(id, metadata); provider->FetchInfo(id, metadata);
} }
}
return id; return id;
} }

View File

@ -40,6 +40,8 @@ public:
void AddProvider(SongInfoProvider* provider); void AddProvider(SongInfoProvider* provider);
int FetchInfo(const Song& metadata); int FetchInfo(const Song& metadata);
QList<SongInfoProvider*> providers() const { return providers_; }
signals: signals:
void ResultReady(int id, const SongInfoFetcher::Result& result); void ResultReady(int id, const SongInfoFetcher::Result& result);

View File

@ -0,0 +1,22 @@
/* This file is part of Clementine.
Clementine is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Clementine is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
*/
#include "songinfoprovider.h"
SongInfoProvider::SongInfoProvider()
: enabled_(true)
{
}

View File

@ -27,12 +27,20 @@ class SongInfoProvider : public QObject {
Q_OBJECT Q_OBJECT
public: public:
SongInfoProvider();
virtual void FetchInfo(int id, const Song& metadata) = 0; virtual void FetchInfo(int id, const Song& metadata) = 0;
bool is_enabled() const { return enabled_; }
void set_enabled(bool enabled) { enabled_ = enabled; }
signals: signals:
void ImageReady(int id, const QUrl& url); void ImageReady(int id, const QUrl& url);
void InfoReady(int id, const CollapsibleInfoPane::Data& data); void InfoReady(int id, const CollapsibleInfoPane::Data& data);
void Finished(int id); void Finished(int id);
private:
bool enabled_;
}; };
#endif // SONGINFOPROVIDER_H #endif // SONGINFOPROVIDER_H

View File

@ -21,8 +21,11 @@
#include <QFuture> #include <QFuture>
#include <QFutureWatcher> #include <QFutureWatcher>
#include <QSettings>
#include <QtConcurrentRun> #include <QtConcurrentRun>
const char* SongInfoView::kSettingsGroup = "SongInfo";
typedef QList<SongInfoProvider*> ProviderList; typedef QList<SongInfoProvider*> ProviderList;
SongInfoView::SongInfoView(NetworkAccessManager* network, QWidget* parent) SongInfoView::SongInfoView(NetworkAccessManager* network, QWidget* parent)
@ -51,6 +54,8 @@ void SongInfoView::UltimateLyricsParsed() {
watcher->deleteLater(); watcher->deleteLater();
ultimate_reader_.reset(); ultimate_reader_.reset();
ReloadSettings();
} }
void SongInfoView::ResultReady(int id, const SongInfoFetcher::Result& result) { void SongInfoView::ResultReady(int id, const SongInfoFetcher::Result& result) {
@ -63,3 +68,87 @@ void SongInfoView::ResultReady(int id, const SongInfoFetcher::Result& result) {
AddSection(new CollapsibleInfoPane(data, this)); AddSection(new CollapsibleInfoPane(data, this));
} }
} }
void SongInfoView::ReloadSettings() {
QSettings s;
s.beginGroup(kSettingsGroup);
// Put the providers in the right order
QList<SongInfoProvider*> ordered_providers;
QVariant saved_order = s.value("search_order");
if (saved_order.isNull()) {
// Hardcoded default order
ordered_providers << ProviderByName("lyrics.wikia.com")
<< ProviderByName("lyricstime.com")
<< ProviderByName("lyricsreg.com")
<< ProviderByName("lyricsmania.com")
<< ProviderByName("metrolyrics.com")
<< ProviderByName("seeklyrics.com")
<< ProviderByName("azlyrics.com")
<< ProviderByName("mp3lyrics.org")
<< ProviderByName("songlyrics.com")
<< ProviderByName("lyricsmode.com")
<< ProviderByName("elyrics.net")
<< ProviderByName("lyricsdownload.com")
<< ProviderByName("lyrics.com")
<< ProviderByName("lyricsbay.com")
<< ProviderByName("directlyrics.com")
<< ProviderByName("loudson.gs")
<< ProviderByName("teksty.org")
<< ProviderByName("tekstowo.pl (Polish translations)")
<< ProviderByName("vagalume.uol.com.br")
<< ProviderByName("vagalume.uol.com.br (Portuguese translations)");
} else {
foreach (const QVariant& name, saved_order.toList()) {
SongInfoProvider* provider = ProviderByName(name.toString());
if (provider)
ordered_providers << provider;
}
}
// Enable all the providers in the list and rank them
int relevance = ordered_providers.count();
foreach (SongInfoProvider* provider, ordered_providers) {
provider->set_enabled(true);
qobject_cast<UltimateLyricsProvider*>(provider)->set_relevance(relevance--);
}
// Any lyric providers we don't have in ordered_providers are considered disabled
foreach (SongInfoProvider* provider, fetcher_->providers()) {
if (qobject_cast<UltimateLyricsProvider*>(provider) && !ordered_providers.contains(provider)) {
provider->set_enabled(false);
}
}
}
SongInfoProvider* SongInfoView::ProviderByName(const QString& name) const {
foreach (SongInfoProvider* provider, fetcher_->providers()) {
if (UltimateLyricsProvider* lyrics = qobject_cast<UltimateLyricsProvider*>(provider)) {
if (lyrics->name() == name)
return provider;
}
}
return NULL;
}
namespace {
bool CompareLyricProviders(const UltimateLyricsProvider* a, const UltimateLyricsProvider* b) {
if (a->is_enabled() && !b->is_enabled())
return true;
if (!a->is_enabled() && b->is_enabled())
return false;
return a->relevance() > b->relevance();
}
}
QList<const UltimateLyricsProvider*> SongInfoView::lyric_providers() const {
QList<const UltimateLyricsProvider*> ret;
foreach (SongInfoProvider* provider, fetcher_->providers()) {
if (UltimateLyricsProvider* lyrics = qobject_cast<UltimateLyricsProvider*>(provider)) {
ret << lyrics;
}
}
qSort(ret.begin(), ret.end(), CompareLyricProviders);
return ret;
}

View File

@ -21,6 +21,7 @@
#include <boost/scoped_ptr.hpp> #include <boost/scoped_ptr.hpp>
class UltimateLyricsProvider;
class UltimateLyricsReader; class UltimateLyricsReader;
class SongInfoView : public SongInfoBase { class SongInfoView : public SongInfoBase {
@ -30,9 +31,19 @@ public:
SongInfoView(NetworkAccessManager* network, QWidget* parent = 0); SongInfoView(NetworkAccessManager* network, QWidget* parent = 0);
~SongInfoView(); ~SongInfoView();
static const char* kSettingsGroup;
QList<const UltimateLyricsProvider*> lyric_providers() const;
public slots:
void ReloadSettings();
protected slots: protected slots:
void ResultReady(int id, const SongInfoFetcher::Result& result); void ResultReady(int id, const SongInfoFetcher::Result& result);
private:
SongInfoProvider* ProviderByName(const QString& name) const;
private slots: private slots:
void UltimateLyricsParsed(); void UltimateLyricsParsed();

View File

@ -28,6 +28,7 @@ const int UltimateLyricsProvider::kRedirectLimit = 5;
UltimateLyricsProvider::UltimateLyricsProvider(NetworkAccessManager* network) UltimateLyricsProvider::UltimateLyricsProvider(NetworkAccessManager* network)
: network_(network), : network_(network),
relevance_(0),
redirect_count_(0) redirect_count_(0)
{ {
} }

View File

@ -43,6 +43,7 @@ public:
void set_title(const QString& title) { title_ = title; } void set_title(const QString& title) { title_ = title; }
void set_url(const QString& url) { url_ = url; } void set_url(const QString& url) { url_ = url; }
void set_charset(const QString& charset) { charset_ = charset; } void set_charset(const QString& charset) { charset_ = charset; }
void set_relevance(int relevance) { relevance_ = relevance; }
void add_url_format(const QString& replace, const QString& with) { void add_url_format(const QString& replace, const QString& with) {
url_formats_ << UrlFormat(replace, with); } url_formats_ << UrlFormat(replace, with); }
@ -51,6 +52,9 @@ public:
void add_exclude_rule(const Rule& rule) { exclude_rules_ << rule; } void add_exclude_rule(const Rule& rule) { exclude_rules_ << rule; }
void add_invalid_indicator(const QString& indicator) { invalid_indicators_ << indicator; } void add_invalid_indicator(const QString& indicator) { invalid_indicators_ << indicator; }
QString name() const { return name_; }
int relevance() const { return relevance_; }
void FetchInfo(int id, const Song& metadata); void FetchInfo(int id, const Song& metadata);
private slots: private slots:
@ -75,6 +79,7 @@ private:
QString title_; QString title_;
QString url_; QString url_;
QString charset_; QString charset_;
int relevance_;
QList<UrlFormat> url_formats_; QList<UrlFormat> url_formats_;
QList<Rule> extract_rules_; QList<Rule> extract_rules_;

View File

@ -358,6 +358,10 @@ msgstr ""
msgid "Choose manual cover" msgid "Choose manual cover"
msgstr "" msgstr ""
msgid ""
"Choose the websites you want Clementine to use when searching for lyrics."
msgstr ""
msgid "Classical" msgid "Classical"
msgstr "" msgstr ""
@ -651,9 +655,6 @@ msgstr ""
msgid "Download directory" msgid "Download directory"
msgstr "" msgstr ""
msgid "Download lyrics from the Internet"
msgstr ""
msgid "Download membership" msgid "Download membership"
msgstr "" msgstr ""

View File

@ -359,6 +359,10 @@ msgstr ""
msgid "Choose manual cover" msgid "Choose manual cover"
msgstr "" msgstr ""
msgid ""
"Choose the websites you want Clementine to use when searching for lyrics."
msgstr ""
msgid "Classical" msgid "Classical"
msgstr "" msgstr ""
@ -652,9 +656,6 @@ msgstr ""
msgid "Download directory" msgid "Download directory"
msgstr "" msgstr ""
msgid "Download lyrics from the Internet"
msgstr ""
msgid "Download membership" msgid "Download membership"
msgstr "" msgstr ""

View File

@ -368,6 +368,10 @@ msgstr "Tria de la llista"
msgid "Choose manual cover" msgid "Choose manual cover"
msgstr "Tria la caràtula manualment" msgstr "Tria la caràtula manualment"
msgid ""
"Choose the websites you want Clementine to use when searching for lyrics."
msgstr ""
msgid "Classical" msgid "Classical"
msgstr "Clàssica" msgstr "Clàssica"
@ -670,9 +674,6 @@ msgstr "Fer doble click sobre una canço netejara la llista de reproducció"
msgid "Download directory" msgid "Download directory"
msgstr "Directori de descàrregues" msgstr "Directori de descàrregues"
msgid "Download lyrics from the Internet"
msgstr ""
msgid "Download membership" msgid "Download membership"
msgstr "Membres de descarrega" msgstr "Membres de descarrega"

View File

@ -360,6 +360,10 @@ msgstr ""
msgid "Choose manual cover" msgid "Choose manual cover"
msgstr "Vybrat obal ručně" msgstr "Vybrat obal ručně"
msgid ""
"Choose the websites you want Clementine to use when searching for lyrics."
msgstr ""
msgid "Classical" msgid "Classical"
msgstr "Klasická" msgstr "Klasická"
@ -653,9 +657,6 @@ msgstr ""
msgid "Download directory" msgid "Download directory"
msgstr "Adresář pro download" msgstr "Adresář pro download"
msgid "Download lyrics from the Internet"
msgstr ""
msgid "Download membership" msgid "Download membership"
msgstr "" msgstr ""

View File

@ -360,6 +360,10 @@ msgstr "Vælg fra listen"
msgid "Choose manual cover" msgid "Choose manual cover"
msgstr "Vælg omslag manuelt" msgstr "Vælg omslag manuelt"
msgid ""
"Choose the websites you want Clementine to use when searching for lyrics."
msgstr ""
msgid "Classical" msgid "Classical"
msgstr "Klassisk" msgstr "Klassisk"
@ -653,9 +657,6 @@ msgstr ""
msgid "Download directory" msgid "Download directory"
msgstr "" msgstr ""
msgid "Download lyrics from the Internet"
msgstr ""
msgid "Download membership" msgid "Download membership"
msgstr "" msgstr ""

View File

@ -366,6 +366,10 @@ msgstr "Von der Liste wählen"
msgid "Choose manual cover" msgid "Choose manual cover"
msgstr "Cover selbst auswählen" msgstr "Cover selbst auswählen"
msgid ""
"Choose the websites you want Clementine to use when searching for lyrics."
msgstr ""
msgid "Classical" msgid "Classical"
msgstr "Klassisch" msgstr "Klassisch"
@ -669,9 +673,6 @@ msgstr "Stück doppelklicken um Wiedergabeliste zu ersetzen"
msgid "Download directory" msgid "Download directory"
msgstr "Downloadverzeichnis" msgstr "Downloadverzeichnis"
msgid "Download lyrics from the Internet"
msgstr ""
msgid "Download membership" msgid "Download membership"
msgstr "Downloadmitgliedschaft" msgstr "Downloadmitgliedschaft"

View File

@ -367,6 +367,10 @@ msgstr "Επιλογή από τη λίστα"
msgid "Choose manual cover" msgid "Choose manual cover"
msgstr "Επιλογή εξώφυλλου χειροκίνητα" msgstr "Επιλογή εξώφυλλου χειροκίνητα"
msgid ""
"Choose the websites you want Clementine to use when searching for lyrics."
msgstr ""
msgid "Classical" msgid "Classical"
msgstr "Κλασσική" msgstr "Κλασσική"
@ -673,9 +677,6 @@ msgstr "Διπλό κλικ σε ένα τραγούδι θα καθαρίσει
msgid "Download directory" msgid "Download directory"
msgstr "Φάκελος λήψης" msgstr "Φάκελος λήψης"
msgid "Download lyrics from the Internet"
msgstr ""
msgid "Download membership" msgid "Download membership"
msgstr "\"Κατέβασμα\" συνδρομής" msgstr "\"Κατέβασμα\" συνδρομής"

View File

@ -358,6 +358,10 @@ msgstr ""
msgid "Choose manual cover" msgid "Choose manual cover"
msgstr "Choose manual cover" msgstr "Choose manual cover"
msgid ""
"Choose the websites you want Clementine to use when searching for lyrics."
msgstr ""
msgid "Classical" msgid "Classical"
msgstr "Classical" msgstr "Classical"
@ -653,9 +657,6 @@ msgstr "Double-clicking a song clears the playlist first"
msgid "Download directory" msgid "Download directory"
msgstr "" msgstr ""
msgid "Download lyrics from the Internet"
msgstr ""
msgid "Download membership" msgid "Download membership"
msgstr "" msgstr ""

View File

@ -358,6 +358,10 @@ msgstr ""
msgid "Choose manual cover" msgid "Choose manual cover"
msgstr "Choose manual cover" msgstr "Choose manual cover"
msgid ""
"Choose the websites you want Clementine to use when searching for lyrics."
msgstr ""
msgid "Classical" msgid "Classical"
msgstr "Classical" msgstr "Classical"
@ -651,9 +655,6 @@ msgstr ""
msgid "Download directory" msgid "Download directory"
msgstr "" msgstr ""
msgid "Download lyrics from the Internet"
msgstr ""
msgid "Download membership" msgid "Download membership"
msgstr "" msgstr ""

View File

@ -368,6 +368,10 @@ msgstr "Elegir de la lista"
msgid "Choose manual cover" msgid "Choose manual cover"
msgstr "Establecer carátula personalizada" msgstr "Establecer carátula personalizada"
msgid ""
"Choose the websites you want Clementine to use when searching for lyrics."
msgstr ""
msgid "Classical" msgid "Classical"
msgstr "Clásico" msgstr "Clásico"
@ -672,9 +676,6 @@ msgstr ""
msgid "Download directory" msgid "Download directory"
msgstr "Directorio de descargas" msgstr "Directorio de descargas"
msgid "Download lyrics from the Internet"
msgstr ""
msgid "Download membership" msgid "Download membership"
msgstr "Membrecía para descarga" msgstr "Membrecía para descarga"

View File

@ -359,6 +359,10 @@ msgstr ""
msgid "Choose manual cover" msgid "Choose manual cover"
msgstr "" msgstr ""
msgid ""
"Choose the websites you want Clementine to use when searching for lyrics."
msgstr ""
msgid "Classical" msgid "Classical"
msgstr "" msgstr ""
@ -652,9 +656,6 @@ msgstr ""
msgid "Download directory" msgid "Download directory"
msgstr "" msgstr ""
msgid "Download lyrics from the Internet"
msgstr ""
msgid "Download membership" msgid "Download membership"
msgstr "" msgstr ""

View File

@ -371,6 +371,10 @@ msgstr "Choisir depuis la liste"
msgid "Choose manual cover" msgid "Choose manual cover"
msgstr "Choisir une jaquette manuellement" msgstr "Choisir une jaquette manuellement"
msgid ""
"Choose the websites you want Clementine to use when searching for lyrics."
msgstr ""
msgid "Classical" msgid "Classical"
msgstr "Classique" msgstr "Classique"
@ -674,9 +678,6 @@ msgstr "Un double clic sur une chanson efface d'abord la liste de lecture"
msgid "Download directory" msgid "Download directory"
msgstr "Dossier de téléchargement" msgstr "Dossier de téléchargement"
msgid "Download lyrics from the Internet"
msgstr ""
msgid "Download membership" msgid "Download membership"
msgstr "Adhésion au téléchargement" msgstr "Adhésion au téléchargement"

View File

@ -359,6 +359,10 @@ msgstr "Elixir da lista"
msgid "Choose manual cover" msgid "Choose manual cover"
msgstr "Escoller unha capa manualmente" msgstr "Escoller unha capa manualmente"
msgid ""
"Choose the websites you want Clementine to use when searching for lyrics."
msgstr ""
msgid "Classical" msgid "Classical"
msgstr "Clásica" msgstr "Clásica"
@ -656,9 +660,6 @@ msgstr ""
msgid "Download directory" msgid "Download directory"
msgstr "" msgstr ""
msgid "Download lyrics from the Internet"
msgstr ""
msgid "Download membership" msgid "Download membership"
msgstr "" msgstr ""

View File

@ -364,6 +364,10 @@ msgstr "Választás a listáról"
msgid "Choose manual cover" msgid "Choose manual cover"
msgstr "Borító választása manuálisan" msgstr "Borító választása manuálisan"
msgid ""
"Choose the websites you want Clementine to use when searching for lyrics."
msgstr ""
msgid "Classical" msgid "Classical"
msgstr "Klasszikus" msgstr "Klasszikus"
@ -668,9 +672,6 @@ msgstr "Dupla kattintás egy számon előbb törli a lejátszási listát"
msgid "Download directory" msgid "Download directory"
msgstr "Letöltési mappa" msgstr "Letöltési mappa"
msgid "Download lyrics from the Internet"
msgstr ""
msgid "Download membership" msgid "Download membership"
msgstr "Tagsági információk betöltése" msgstr "Tagsági információk betöltése"

View File

@ -371,6 +371,10 @@ msgstr "Scegli dall'elenco"
msgid "Choose manual cover" msgid "Choose manual cover"
msgstr "Scelta manuale della copertina" msgstr "Scelta manuale della copertina"
msgid ""
"Choose the websites you want Clementine to use when searching for lyrics."
msgstr ""
msgid "Classical" msgid "Classical"
msgstr "Classica" msgstr "Classica"
@ -674,9 +678,6 @@ msgstr "Il doppio clic su un brano svuota la scaletta"
msgid "Download directory" msgid "Download directory"
msgstr "Cartella degli scaricamenti" msgstr "Cartella degli scaricamenti"
msgid "Download lyrics from the Internet"
msgstr ""
msgid "Download membership" msgid "Download membership"
msgstr "Scaricamento" msgstr "Scaricamento"

View File

@ -358,6 +358,10 @@ msgstr ""
msgid "Choose manual cover" msgid "Choose manual cover"
msgstr "" msgstr ""
msgid ""
"Choose the websites you want Clementine to use when searching for lyrics."
msgstr ""
msgid "Classical" msgid "Classical"
msgstr "Классикалық" msgstr "Классикалық"
@ -651,9 +655,6 @@ msgstr ""
msgid "Download directory" msgid "Download directory"
msgstr "" msgstr ""
msgid "Download lyrics from the Internet"
msgstr ""
msgid "Download membership" msgid "Download membership"
msgstr "" msgstr ""

View File

@ -359,6 +359,10 @@ msgstr ""
msgid "Choose manual cover" msgid "Choose manual cover"
msgstr "" msgstr ""
msgid ""
"Choose the websites you want Clementine to use when searching for lyrics."
msgstr ""
msgid "Classical" msgid "Classical"
msgstr "" msgstr ""
@ -652,9 +656,6 @@ msgstr ""
msgid "Download directory" msgid "Download directory"
msgstr "" msgstr ""
msgid "Download lyrics from the Internet"
msgstr ""
msgid "Download membership" msgid "Download membership"
msgstr "" msgstr ""

View File

@ -359,6 +359,10 @@ msgstr ""
msgid "Choose manual cover" msgid "Choose manual cover"
msgstr "Velg cover manuelt" msgstr "Velg cover manuelt"
msgid ""
"Choose the websites you want Clementine to use when searching for lyrics."
msgstr ""
msgid "Classical" msgid "Classical"
msgstr "Klassisk" msgstr "Klassisk"
@ -652,9 +656,6 @@ msgstr ""
msgid "Download directory" msgid "Download directory"
msgstr "" msgstr ""
msgid "Download lyrics from the Internet"
msgstr ""
msgid "Download membership" msgid "Download membership"
msgstr "" msgstr ""

View File

@ -367,6 +367,10 @@ msgstr "Kies uit de lijst"
msgid "Choose manual cover" msgid "Choose manual cover"
msgstr "Albumhoes handmatig kiezen" msgstr "Albumhoes handmatig kiezen"
msgid ""
"Choose the websites you want Clementine to use when searching for lyrics."
msgstr ""
msgid "Classical" msgid "Classical"
msgstr "Klassiek" msgstr "Klassiek"
@ -670,9 +674,6 @@ msgstr "Dubbelklikken op een nummer maakt eerst de afspeellijst leeg"
msgid "Download directory" msgid "Download directory"
msgstr "Downloadmap" msgstr "Downloadmap"
msgid "Download lyrics from the Internet"
msgstr ""
msgid "Download membership" msgid "Download membership"
msgstr "Download lidmaatschap" msgstr "Download lidmaatschap"

View File

@ -358,6 +358,10 @@ msgstr ""
msgid "Choose manual cover" msgid "Choose manual cover"
msgstr "" msgstr ""
msgid ""
"Choose the websites you want Clementine to use when searching for lyrics."
msgstr ""
msgid "Classical" msgid "Classical"
msgstr "Classic" msgstr "Classic"
@ -651,9 +655,6 @@ msgstr ""
msgid "Download directory" msgid "Download directory"
msgstr "" msgstr ""
msgid "Download lyrics from the Internet"
msgstr ""
msgid "Download membership" msgid "Download membership"
msgstr "" msgstr ""

View File

@ -367,6 +367,10 @@ msgstr "Wybierz z listy"
msgid "Choose manual cover" msgid "Choose manual cover"
msgstr "Wybierz okładkę ręcznie" msgstr "Wybierz okładkę ręcznie"
msgid ""
"Choose the websites you want Clementine to use when searching for lyrics."
msgstr ""
msgid "Classical" msgid "Classical"
msgstr "Muzyka klasyczna" msgstr "Muzyka klasyczna"
@ -671,9 +675,6 @@ msgstr "Podwójne kliknięcie na utworze najpierw czyści listę odtwarzania"
msgid "Download directory" msgid "Download directory"
msgstr "Pobierz katalog" msgstr "Pobierz katalog"
msgid "Download lyrics from the Internet"
msgstr ""
msgid "Download membership" msgid "Download membership"
msgstr "Pobierz członkwstwo" msgstr "Pobierz członkwstwo"

View File

@ -367,6 +367,10 @@ msgstr "Escolher da lista"
msgid "Choose manual cover" msgid "Choose manual cover"
msgstr "Escolher a capa manualmente" msgstr "Escolher a capa manualmente"
msgid ""
"Choose the websites you want Clementine to use when searching for lyrics."
msgstr ""
msgid "Classical" msgid "Classical"
msgstr "Clássica" msgstr "Clássica"
@ -670,9 +674,6 @@ msgstr "Duplo clique na música limpa a lista de reprodução"
msgid "Download directory" msgid "Download directory"
msgstr "Diretório de transferências" msgstr "Diretório de transferências"
msgid "Download lyrics from the Internet"
msgstr ""
msgid "Download membership" msgid "Download membership"
msgstr "Transferência" msgstr "Transferência"

View File

@ -364,6 +364,10 @@ msgstr "Escolher da lista"
msgid "Choose manual cover" msgid "Choose manual cover"
msgstr "Escolher capa manualmente" msgstr "Escolher capa manualmente"
msgid ""
"Choose the websites you want Clementine to use when searching for lyrics."
msgstr ""
msgid "Classical" msgid "Classical"
msgstr "Clássica" msgstr "Clássica"
@ -663,9 +667,6 @@ msgstr "Duplo clique em música limpa a lista de reprodução primeiro"
msgid "Download directory" msgid "Download directory"
msgstr "Pasta de Download" msgstr "Pasta de Download"
msgid "Download lyrics from the Internet"
msgstr ""
msgid "Download membership" msgid "Download membership"
msgstr "Download de membro" msgstr "Download de membro"

View File

@ -358,6 +358,10 @@ msgstr ""
msgid "Choose manual cover" msgid "Choose manual cover"
msgstr "" msgstr ""
msgid ""
"Choose the websites you want Clementine to use when searching for lyrics."
msgstr ""
msgid "Classical" msgid "Classical"
msgstr "Clasică" msgstr "Clasică"
@ -651,9 +655,6 @@ msgstr ""
msgid "Download directory" msgid "Download directory"
msgstr "" msgstr ""
msgid "Download lyrics from the Internet"
msgstr ""
msgid "Download membership" msgid "Download membership"
msgstr "" msgstr ""

View File

@ -362,6 +362,10 @@ msgstr "Выбор из списка"
msgid "Choose manual cover" msgid "Choose manual cover"
msgstr "Укажите обложку вручную" msgstr "Укажите обложку вручную"
msgid ""
"Choose the websites you want Clementine to use when searching for lyrics."
msgstr ""
msgid "Classical" msgid "Classical"
msgstr "Classical" msgstr "Classical"
@ -665,9 +669,6 @@ msgstr "Двойной щелчок мышью на композиции сти
msgid "Download directory" msgid "Download directory"
msgstr "Каталог загрузок" msgstr "Каталог загрузок"
msgid "Download lyrics from the Internet"
msgstr ""
msgid "Download membership" msgid "Download membership"
msgstr "Загрузить membership" msgstr "Загрузить membership"

View File

@ -364,6 +364,10 @@ msgstr "Vybrať zo zoznamu"
msgid "Choose manual cover" msgid "Choose manual cover"
msgstr "Vybrať obal ručne" msgstr "Vybrať obal ručne"
msgid ""
"Choose the websites you want Clementine to use when searching for lyrics."
msgstr ""
msgid "Classical" msgid "Classical"
msgstr "Classical" msgstr "Classical"
@ -667,9 +671,6 @@ msgstr "Dvojklik na pieseň najprv vymaže playlist"
msgid "Download directory" msgid "Download directory"
msgstr "Priečinok na sťahovanie" msgstr "Priečinok na sťahovanie"
msgid "Download lyrics from the Internet"
msgstr ""
msgid "Download membership" msgid "Download membership"
msgstr "Členstvo sťahovania" msgstr "Členstvo sťahovania"

View File

@ -363,6 +363,10 @@ msgstr "Izberi s seznama"
msgid "Choose manual cover" msgid "Choose manual cover"
msgstr "Ročno izberite ovitek" msgstr "Ročno izberite ovitek"
msgid ""
"Choose the websites you want Clementine to use when searching for lyrics."
msgstr ""
msgid "Classical" msgid "Classical"
msgstr "Klasična" msgstr "Klasična"
@ -666,9 +670,6 @@ msgstr "Dvoklik na skladbo počisti predvajalni seznam"
msgid "Download directory" msgid "Download directory"
msgstr "Mapa prejemov" msgstr "Mapa prejemov"
msgid "Download lyrics from the Internet"
msgstr ""
msgid "Download membership" msgid "Download membership"
msgstr "Članstvo prejemanja" msgstr "Članstvo prejemanja"

View File

@ -359,6 +359,10 @@ msgstr "Одабери са листе"
msgid "Choose manual cover" msgid "Choose manual cover"
msgstr "Ручно одабери омот" msgstr "Ручно одабери омот"
msgid ""
"Choose the websites you want Clementine to use when searching for lyrics."
msgstr ""
msgid "Classical" msgid "Classical"
msgstr "Класика" msgstr "Класика"
@ -654,9 +658,6 @@ msgstr "Двоструки клик на песму претходно ће оч
msgid "Download directory" msgid "Download directory"
msgstr "Фасцикла за преузимање" msgstr "Фасцикла за преузимање"
msgid "Download lyrics from the Internet"
msgstr ""
msgid "Download membership" msgid "Download membership"
msgstr "" msgstr ""

View File

@ -359,6 +359,10 @@ msgstr "Välj från listan"
msgid "Choose manual cover" msgid "Choose manual cover"
msgstr "Ange omslag manuellt" msgstr "Ange omslag manuellt"
msgid ""
"Choose the websites you want Clementine to use when searching for lyrics."
msgstr ""
msgid "Classical" msgid "Classical"
msgstr "Klassiskt" msgstr "Klassiskt"
@ -656,9 +660,6 @@ msgstr "Dubbelklick på en sång rensar spellistan först"
msgid "Download directory" msgid "Download directory"
msgstr "Nedladdningskatalog" msgstr "Nedladdningskatalog"
msgid "Download lyrics from the Internet"
msgstr ""
msgid "Download membership" msgid "Download membership"
msgstr "Ladda ned medlemskap" msgstr "Ladda ned medlemskap"

View File

@ -363,6 +363,10 @@ msgstr "Listeden seç"
msgid "Choose manual cover" msgid "Choose manual cover"
msgstr "Elle kapak seç" msgstr "Elle kapak seç"
msgid ""
"Choose the websites you want Clementine to use when searching for lyrics."
msgstr ""
msgid "Classical" msgid "Classical"
msgstr "Klasik" msgstr "Klasik"
@ -666,9 +670,6 @@ msgstr "Bir şarkıya çift tıklamak önce çalma listesini temizler"
msgid "Download directory" msgid "Download directory"
msgstr "İndirme dizini" msgstr "İndirme dizini"
msgid "Download lyrics from the Internet"
msgstr ""
msgid "Download membership" msgid "Download membership"
msgstr "İndirme üyeliği" msgstr "İndirme üyeliği"

View File

@ -349,6 +349,10 @@ msgstr ""
msgid "Choose manual cover" msgid "Choose manual cover"
msgstr "" msgstr ""
msgid ""
"Choose the websites you want Clementine to use when searching for lyrics."
msgstr ""
msgid "Classical" msgid "Classical"
msgstr "" msgstr ""
@ -642,9 +646,6 @@ msgstr ""
msgid "Download directory" msgid "Download directory"
msgstr "" msgstr ""
msgid "Download lyrics from the Internet"
msgstr ""
msgid "Download membership" msgid "Download membership"
msgstr "" msgstr ""

View File

@ -363,6 +363,10 @@ msgstr "Вибрати зі списку"
msgid "Choose manual cover" msgid "Choose manual cover"
msgstr "Виберіть обкладинку вручну" msgstr "Виберіть обкладинку вручну"
msgid ""
"Choose the websites you want Clementine to use when searching for lyrics."
msgstr ""
msgid "Classical" msgid "Classical"
msgstr "Класична" msgstr "Класична"
@ -666,9 +670,6 @@ msgstr "Подвійнне клацання на композиції споча
msgid "Download directory" msgid "Download directory"
msgstr "Каталог завантаження" msgstr "Каталог завантаження"
msgid "Download lyrics from the Internet"
msgstr ""
msgid "Download membership" msgid "Download membership"
msgstr "Завантажити членство" msgstr "Завантажити членство"

View File

@ -358,6 +358,10 @@ msgstr ""
msgid "Choose manual cover" msgid "Choose manual cover"
msgstr "" msgstr ""
msgid ""
"Choose the websites you want Clementine to use when searching for lyrics."
msgstr ""
msgid "Classical" msgid "Classical"
msgstr "" msgstr ""
@ -651,9 +655,6 @@ msgstr ""
msgid "Download directory" msgid "Download directory"
msgstr "" msgstr ""
msgid "Download lyrics from the Internet"
msgstr ""
msgid "Download membership" msgid "Download membership"
msgstr "" msgstr ""

View File

@ -363,6 +363,10 @@ msgstr "從清單中選擇"
msgid "Choose manual cover" msgid "Choose manual cover"
msgstr "選擇手動覆蓋" msgstr "選擇手動覆蓋"
msgid ""
"Choose the websites you want Clementine to use when searching for lyrics."
msgstr ""
msgid "Classical" msgid "Classical"
msgstr "古典" msgstr "古典"
@ -656,9 +660,6 @@ msgstr ""
msgid "Download directory" msgid "Download directory"
msgstr "下載目錄" msgstr "下載目錄"
msgid "Download lyrics from the Internet"
msgstr ""
msgid "Download membership" msgid "Download membership"
msgstr "下載會員" msgstr "下載會員"

View File

@ -1501,13 +1501,15 @@ void MainWindow::EnsureSettingsDialogCreated() {
#endif #endif
settings_dialog_->SetGlobalShortcutManager(global_shortcuts_); settings_dialog_->SetGlobalShortcutManager(global_shortcuts_);
settings_dialog_->SetSongInfoView(song_info_view_);
// Settings // Settings
connect(settings_dialog_.get(), SIGNAL(accepted()), SLOT(ReloadSettings())); connect(settings_dialog_.get(), SIGNAL(accepted()), SLOT(ReloadSettings()));
connect(settings_dialog_.get(), SIGNAL(accepted()), library_, SLOT(ReloadSettings())); connect(settings_dialog_.get(), SIGNAL(accepted()), library_, SLOT(ReloadSettings()));
connect(settings_dialog_.get(), SIGNAL(accepted()), player_, SLOT(ReloadSettings())); connect(settings_dialog_.get(), SIGNAL(accepted()), player_, SLOT(ReloadSettings()));
connect(settings_dialog_.get(), SIGNAL(accepted()), osd_, SLOT(ReloadSettings())); connect(settings_dialog_.get(), SIGNAL(accepted()), osd_, SLOT(ReloadSettings()));
connect(settings_dialog_.get(), SIGNAL(accepted()), library_view_, SLOT(ReloadSettings())); connect(settings_dialog_.get(), SIGNAL(accepted()), library_view_->view(), SLOT(ReloadSettings()));
connect(settings_dialog_.get(), SIGNAL(accepted()), song_info_view_, SLOT(ReloadSettings()));
connect(settings_dialog_.get(), SIGNAL(accepted()), player_->GetEngine(), SLOT(ReloadSettings())); connect(settings_dialog_.get(), SIGNAL(accepted()), player_->GetEngine(), SLOT(ReloadSettings()));
connect(settings_dialog_.get(), SIGNAL(accepted()), ui_->playlist->view(), SLOT(ReloadSettings())); connect(settings_dialog_.get(), SIGNAL(accepted()), ui_->playlist->view(), SLOT(ReloadSettings()));
#ifdef ENABLE_WIIMOTEDEV #ifdef ENABLE_WIIMOTEDEV

View File

@ -509,3 +509,7 @@ void SettingsDialog::OpenAtPage(Page page) {
ui_->list->setCurrentRow(page); ui_->list->setCurrentRow(page);
show(); show();
} }
void SettingsDialog::SetSongInfoView(SongInfoView* view) {
ui_->lyric_settings->SetSongInfoView(view);
}

View File

@ -25,6 +25,7 @@
class GlobalShortcuts; class GlobalShortcuts;
class LibraryDirectoryModel; class LibraryDirectoryModel;
class OSDPretty; class OSDPretty;
class SongInfoView;
class Ui_SettingsDialog; class Ui_SettingsDialog;
#ifdef ENABLE_WIIMOTEDEV #ifdef ENABLE_WIIMOTEDEV
@ -57,6 +58,7 @@ class SettingsDialog : public QDialog {
void SetLibraryDirectoryModel(LibraryDirectoryModel* model); void SetLibraryDirectoryModel(LibraryDirectoryModel* model);
void SetGlobalShortcutManager(GlobalShortcuts* manager); void SetGlobalShortcutManager(GlobalShortcuts* manager);
void SetGstEngine(const GstEngine* engine) { gst_engine_ = engine; } void SetGstEngine(const GstEngine* engine) { gst_engine_ = engine; }
void SetSongInfoView(SongInfoView* view);
void OpenAtPage(Page page); void OpenAtPage(Page page);