New context with albums and lyrics +++ much more

* Added new lyrics provider with lyrics from AudD and API Seeds
* New improved context widget with albums and lyrics
* Fixed playing and context widget getting stuck in play mode when there was an error
* Changed icons for artists in collection, tidal and cover manager
* Removed "search" icon from "Search automatically" checkbox (right click) that looked ugly
* Removed some unused widgets from the src/widgets directory
* Fixed initial size of window and side panel
* Fixed saving window size correctly
This commit is contained in:
Jonas Kvinge
2018-08-29 21:42:24 +02:00
parent 3b30e66e87
commit ac6cac8da1
96 changed files with 4361 additions and 3135 deletions

View File

@@ -79,7 +79,7 @@ AlbumCoverChoiceController::AlbumCoverChoiceController(QWidget *parent) :
unset_cover_ = new QAction(IconLoader::Load("list-remove"), tr("Unset cover"), this);
show_cover_ = new QAction(IconLoader::Load("zoom-in"), tr("Show fullsize..."), this);
search_cover_auto_ = new QAction(IconLoader::Load("search"), tr("Search automatically"), this);
search_cover_auto_ = new QAction(tr("Search automatically"), this);
search_cover_auto_->setCheckable(true);
search_cover_auto_->setChecked(false);

View File

@@ -58,26 +58,26 @@ class AlbumCoverFetcherSearch : public QObject {
CoverSearchStatistics statistics() const { return statistics_; }
signals:
signals:
// It's the end of search (when there was no fetch-me-a-cover request).
void SearchFinished(quint64, const CoverSearchResults& results);
void SearchFinished(quint64, const CoverSearchResults &results);
// It's the end of search and we've fetched a cover.
void AlbumCoverFetched(quint64, const QImage &cover);
private slots:
private slots:
void ProviderSearchFinished(int id, const QList<CoverSearchResult> &results);
void ProviderCoverFetchFinished(RedirectFollower *reply);
void TerminateSearch();
private:
private:
void AllProvidersFinished();
void FetchMoreImages();
float ScoreImage(const QImage &image) const;
void SendBestImage();
private:
private:
static const int kSearchTimeoutMs;
static const int kImageLoadTimeoutMs;
static const int kTargetSize;

View File

@@ -226,6 +226,7 @@ void AlbumCoverLoader::RemoteFetchFinished(QNetworkReply *reply) {
}
NextState(&task);
}
QImage AlbumCoverLoader::ScaleAndPad(const AlbumCoverLoaderOptions &options, const QImage &image) {

View File

@@ -92,9 +92,8 @@ AlbumCoverManager::AlbumCoverManager(Application *app, CollectionBackend *collec
cover_searcher_(nullptr),
cover_export_(nullptr),
cover_exporter_(new AlbumCoverExporter(this)),
artist_icon_(IconLoader::Load("guitar" )),
all_artists_icon_(IconLoader::Load("cd" )),
//no_cover_icon_(IconLoader::Load("nocover")),
artist_icon_(IconLoader::Load("folder-sound" )),
all_artists_icon_(IconLoader::Load("vinyl" )),
no_cover_icon_(":/pictures/noalbumart.png"),
no_cover_image_(GenerateNoCoverImage(no_cover_icon_)),
no_cover_item_icon_(QPixmap::fromImage(no_cover_image_)),

View File

@@ -111,7 +111,7 @@ void AmazonCoverProvider::QueryFinished(QNetworkReply *reply, int id) {
reply->deleteLater();
QString data=(QString)reply->readAll();
QString data(reply->readAll());
CoverSearchResults results;

View File

@@ -37,7 +37,7 @@
class LastFmCoverProvider : public CoverProvider {
Q_OBJECT
public:
public:
explicit LastFmCoverProvider(QObject *parent = nullptr);
bool StartSearch(const QString &artist, const QString &album, int id);
@@ -45,10 +45,10 @@ public:
static const char *kApiKey;
static const char *kSecret;
private slots:
private slots:
void QueryFinished(QNetworkReply *reply, int id);
private:
private:
QNetworkAccessManager *network_;
QMap <QNetworkReply *, int> pending_queries_;