Fix formating in src/covers
This commit is contained in:
parent
bb554a4685
commit
0ff2e33d55
|
@ -1,5 +1,7 @@
|
||||||
/* This file is part of Clementine.
|
/* This file is part of Clementine.
|
||||||
Copyright 2010, David Sansome <me@davidsansome.com>
|
Copyright 2013, Andreas <asfa194@gmail.com>
|
||||||
|
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
|
||||||
|
Copyright 2014, John Maguire <john.maguire@gmail.com>
|
||||||
|
|
||||||
Clementine is free software: you can redistribute it and/or modify
|
Clementine is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/* This file is part of Clementine.
|
/* This file is part of Clementine.
|
||||||
Copyright 2010, David Sansome <me@davidsansome.com>
|
Copyright 2013, Andreas <asfa194@gmail.com>
|
||||||
|
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
|
||||||
|
|
||||||
Clementine is free software: you can redistribute it and/or modify
|
Clementine is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -15,8 +16,8 @@
|
||||||
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef ALBUMCOVEREXPORTER_H
|
#ifndef COVERS_ALBUMCOVEREXPORTER_H_
|
||||||
#define ALBUMCOVEREXPORTER_H
|
#define COVERS_ALBUMCOVEREXPORTER_H_
|
||||||
|
|
||||||
#include "coverexportrunnable.h"
|
#include "coverexportrunnable.h"
|
||||||
#include "core/song.h"
|
#include "core/song.h"
|
||||||
|
@ -32,7 +33,7 @@ class AlbumCoverExporter : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AlbumCoverExporter(QObject* parent = nullptr);
|
explicit AlbumCoverExporter(QObject* parent = nullptr);
|
||||||
virtual ~AlbumCoverExporter() {}
|
virtual ~AlbumCoverExporter() {}
|
||||||
|
|
||||||
static const int kMaxConcurrentRequests;
|
static const int kMaxConcurrentRequests;
|
||||||
|
@ -44,7 +45,7 @@ class AlbumCoverExporter : public QObject {
|
||||||
|
|
||||||
int request_count() { return requests_.size(); }
|
int request_count() { return requests_.size(); }
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void AlbumCoversExportUpdate(int exported, int skipped, int all);
|
void AlbumCoversExportUpdate(int exported, int skipped, int all);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
@ -63,4 +64,4 @@ signals:
|
||||||
int all_;
|
int all_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ALBUMCOVEREXPORTER_H
|
#endif // COVERS_ALBUMCOVEREXPORTER_H_
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
/* This file is part of Clementine.
|
/* This file is part of Clementine.
|
||||||
Copyright 2010, David Sansome <me@davidsansome.com>
|
Copyright 2011, Paweł Bara <keirangtp@gmail.com>
|
||||||
|
Copyright 2011-2012, David Sansome <me@davidsansome.com>
|
||||||
|
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
|
||||||
|
Copyright 2014, John Maguire <john.maguire@gmail.com>
|
||||||
|
|
||||||
Clementine is free software: you can redistribute it and/or modify
|
Clementine is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -83,9 +86,7 @@ void AlbumCoverFetcher::StartRequests() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (!queued_requests_.isEmpty() &&
|
while (!queued_requests_.isEmpty() && active_requests_.size() < kMaxConcurrentRequests) {
|
||||||
active_requests_.size() < kMaxConcurrentRequests) {
|
|
||||||
|
|
||||||
CoverSearchRequest request = queued_requests_.dequeue();
|
CoverSearchRequest request = queued_requests_.dequeue();
|
||||||
|
|
||||||
// search objects are this fetcher's children so worst case scenario - they
|
// search objects are this fetcher's children so worst case scenario - they
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
/* This file is part of Clementine.
|
/* This file is part of Clementine.
|
||||||
Copyright 2010, David Sansome <me@davidsansome.com>
|
Copyright 2010-2011, David Sansome <me@davidsansome.com>
|
||||||
|
Copyright 2010, 2012, 2014, John Maguire <john.maguire@gmail.com>
|
||||||
|
Copyright 2011, Paweł Bara <keirangtp@gmail.com>
|
||||||
|
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
|
||||||
|
|
||||||
Clementine is free software: you can redistribute it and/or modify
|
Clementine is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -15,8 +18,8 @@
|
||||||
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef ALBUMCOVERFETCHER_H
|
#ifndef COVERS_ALBUMCOVERFETCHER_H_
|
||||||
#define ALBUMCOVERFETCHER_H
|
#define COVERS_ALBUMCOVERFETCHER_H_
|
||||||
|
|
||||||
#include "coversearchstatistics.h"
|
#include "coversearchstatistics.h"
|
||||||
|
|
||||||
|
@ -89,7 +92,7 @@ class AlbumCoverFetcher : public QObject {
|
||||||
|
|
||||||
void Clear();
|
void Clear();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void AlbumCoverFetched(quint64, const QImage& cover,
|
void AlbumCoverFetched(quint64, const QImage& cover,
|
||||||
const CoverSearchStatistics& statistics);
|
const CoverSearchStatistics& statistics);
|
||||||
void SearchFinished(quint64, const CoverSearchResults& results,
|
void SearchFinished(quint64, const CoverSearchResults& results,
|
||||||
|
@ -113,4 +116,4 @@ signals:
|
||||||
QTimer* request_starter_;
|
QTimer* request_starter_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ALBUMCOVERFETCHER_H
|
#endif // COVERS_ALBUMCOVERFETCHER_H_
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
/* This file is part of Clementine.
|
/* This file is part of Clementine.
|
||||||
Copyright 2010, David Sansome <me@davidsansome.com>
|
Copyright 2011, Paweł Bara <keirangtp@gmail.com>
|
||||||
|
Copyright 2011, David Sansome <me@davidsansome.com>
|
||||||
|
Copyright 2012, 2014, John Maguire <john.maguire@gmail.com>
|
||||||
|
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
|
||||||
|
|
||||||
Clementine is free software: you can redistribute it and/or modify
|
Clementine is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -215,10 +218,10 @@ float AlbumCoverFetcherSearch::ScoreImage(const QImage& image) const {
|
||||||
|
|
||||||
// A 500x500px image scores 1.0, bigger scores higher
|
// A 500x500px image scores 1.0, bigger scores higher
|
||||||
const float size_score =
|
const float size_score =
|
||||||
std::sqrt(float(image.width() * image.height())) / kTargetSize;
|
std::sqrt(static_cast<float>(image.width() * image.height())) / kTargetSize;
|
||||||
|
|
||||||
// A 1:1 image scores 1.0, anything else scores less
|
// A 1:1 image scores 1.0, anything else scores less
|
||||||
const float aspect_score = 1.0 - float(image.height() - image.width()) /
|
const float aspect_score = 1.0 - static_cast<float>(image.height() - image.width()) /
|
||||||
std::max(image.height(), image.width());
|
std::max(image.height(), image.width());
|
||||||
|
|
||||||
return size_score + aspect_score;
|
return size_score + aspect_score;
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
/* This file is part of Clementine.
|
/* This file is part of Clementine.
|
||||||
Copyright 2010, David Sansome <me@davidsansome.com>
|
Copyright 2011, Paweł Bara <keirangtp@gmail.com>
|
||||||
|
Copyright 2011, David Sansome <me@davidsansome.com>
|
||||||
|
Copyright 2012, 2014, John Maguire <john.maguire@gmail.com>
|
||||||
|
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
|
||||||
|
|
||||||
Clementine is free software: you can redistribute it and/or modify
|
Clementine is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -15,8 +18,8 @@
|
||||||
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef ALBUMCOVERFETCHERSEARCH_H
|
#ifndef COVERS_ALBUMCOVERFETCHERSEARCH_H_
|
||||||
#define ALBUMCOVERFETCHERSEARCH_H
|
#define COVERS_ALBUMCOVERFETCHERSEARCH_H_
|
||||||
|
|
||||||
#include "albumcoverfetcher.h"
|
#include "albumcoverfetcher.h"
|
||||||
|
|
||||||
|
@ -48,7 +51,7 @@ class AlbumCoverFetcherSearch : public QObject {
|
||||||
|
|
||||||
CoverSearchStatistics statistics() const { return statistics_; }
|
CoverSearchStatistics statistics() const { return statistics_; }
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
// It's the end of search (when there was no fetch-me-a-cover request).
|
// 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);
|
||||||
|
|
||||||
|
@ -94,4 +97,4 @@ signals:
|
||||||
bool cancel_requested_;
|
bool cancel_requested_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ALBUMCOVERFETCHERSEARCH_H
|
#endif // COVERS_ALBUMCOVERFETCHERSEARCH_H_
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
/* This file is part of Clementine.
|
/* This file is part of Clementine.
|
||||||
Copyright 2010, David Sansome <me@davidsansome.com>
|
Copyright 2010-2013, David Sansome <me@davidsansome.com>
|
||||||
|
Copyright 2010-2012, 2014, John Maguire <john.maguire@gmail.com>
|
||||||
|
Copyright 2011, Paweł Bara <keirangtp@gmail.com>
|
||||||
|
Copyright 2014, Andreas <asfa194@gmail.com>
|
||||||
|
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
|
||||||
|
|
||||||
Clementine is free software: you can redistribute it and/or modify
|
Clementine is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
/* This file is part of Clementine.
|
/* This file is part of Clementine.
|
||||||
Copyright 2010, David Sansome <me@davidsansome.com>
|
Copyright 2010-2012, David Sansome <me@davidsansome.com>
|
||||||
|
Copyright 2010-2012, 2014, John Maguire <john.maguire@gmail.com>
|
||||||
|
Copyright 2011, Paweł Bara <keirangtp@gmail.com>
|
||||||
|
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
|
||||||
|
|
||||||
Clementine is free software: you can redistribute it and/or modify
|
Clementine is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -15,8 +18,8 @@
|
||||||
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef ALBUMCOVERLOADER_H
|
#ifndef COVERS_ALBUMCOVERLOADER_H_
|
||||||
#define ALBUMCOVERLOADER_H
|
#define COVERS_ALBUMCOVERLOADER_H_
|
||||||
|
|
||||||
#include "albumcoverloaderoptions.h"
|
#include "albumcoverloaderoptions.h"
|
||||||
#include "core/song.h"
|
#include "core/song.h"
|
||||||
|
@ -34,7 +37,7 @@ class AlbumCoverLoader : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AlbumCoverLoader(QObject* parent = nullptr);
|
explicit AlbumCoverLoader(QObject* parent = nullptr);
|
||||||
|
|
||||||
void Stop() { stop_requested_ = true; }
|
void Stop() { stop_requested_ = true; }
|
||||||
|
|
||||||
|
@ -56,7 +59,7 @@ class AlbumCoverLoader : public QObject {
|
||||||
static QImage ScaleAndPad(const AlbumCoverLoaderOptions& options,
|
static QImage ScaleAndPad(const AlbumCoverLoaderOptions& options,
|
||||||
const QImage& image);
|
const QImage& image);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void ImageLoaded(quint64 id, const QImage& image);
|
void ImageLoaded(quint64 id, const QImage& image);
|
||||||
void ImageLoaded(quint64 id, const QImage& scaled, const QImage& original);
|
void ImageLoaded(quint64 id, const QImage& scaled, const QImage& original);
|
||||||
|
|
||||||
|
@ -110,4 +113,4 @@ signals:
|
||||||
static const int kMaxRedirects = 3;
|
static const int kMaxRedirects = 3;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ALBUMCOVERLOADER_H
|
#endif // COVERS_ALBUMCOVERLOADER_H_
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
/* This file is part of Clementine.
|
/* This file is part of Clementine.
|
||||||
Copyright 2012, David Sansome <me@davidsansome.com>
|
Copyright 2012, David Sansome <me@davidsansome.com>
|
||||||
|
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
|
||||||
|
Copyright 2014, John Maguire <john.maguire@gmail.com>
|
||||||
|
|
||||||
Clementine is free software: you can redistribute it and/or modify
|
Clementine is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
/* This file is part of Clementine.
|
/* This file is part of Clementine.
|
||||||
Copyright 2012, David Sansome <me@davidsansome.com>
|
Copyright 2012, David Sansome <me@davidsansome.com>
|
||||||
|
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
|
||||||
|
Copyright 2014, John Maguire <john.maguire@gmail.com>
|
||||||
|
|
||||||
Clementine is free software: you can redistribute it and/or modify
|
Clementine is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -15,8 +17,8 @@
|
||||||
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef ALBUMCOVERLOADEROPTIONS_H
|
#ifndef COVERS_ALBUMCOVERLOADEROPTIONS_H_
|
||||||
#define ALBUMCOVERLOADEROPTIONS_H
|
#define COVERS_ALBUMCOVERLOADEROPTIONS_H_
|
||||||
|
|
||||||
#include <QImage>
|
#include <QImage>
|
||||||
|
|
||||||
|
@ -32,4 +34,4 @@ struct AlbumCoverLoaderOptions {
|
||||||
QImage default_output_image_;
|
QImage default_output_image_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ALBUMCOVERLOADEROPTIONS_H
|
#endif // COVERS_ALBUMCOVERLOADEROPTIONS_H_
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
/* This file is part of Clementine.
|
/* This file is part of Clementine.
|
||||||
Copyright 2010, David Sansome <me@davidsansome.com>
|
Copyright 2011-2012, David Sansome <me@davidsansome.com>
|
||||||
|
Copyright 2011, 2014, John Maguire <john.maguire@gmail.com>
|
||||||
|
Copyright 2012, Arnaud Bienner <arnaud.bienner@gmail.com>
|
||||||
|
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
|
||||||
|
|
||||||
Clementine is free software: you can redistribute it and/or modify
|
Clementine is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
/* This file is part of Clementine.
|
/* This file is part of Clementine.
|
||||||
Copyright 2010, David Sansome <me@davidsansome.com>
|
Copyright 2011-2012, David Sansome <me@davidsansome.com>
|
||||||
|
Copyright 2011, 2014, John Maguire <john.maguire@gmail.com>
|
||||||
|
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
|
||||||
|
|
||||||
Clementine is free software: you can redistribute it and/or modify
|
Clementine is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -15,8 +17,8 @@
|
||||||
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef AMAZONCOVERPROVIDER_H
|
#ifndef COVERS_AMAZONCOVERPROVIDER_H_
|
||||||
#define AMAZONCOVERPROVIDER_H
|
#define COVERS_AMAZONCOVERPROVIDER_H_
|
||||||
|
|
||||||
#include "coverprovider.h"
|
#include "coverprovider.h"
|
||||||
|
|
||||||
|
@ -28,7 +30,7 @@ class AmazonCoverProvider : public CoverProvider {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AmazonCoverProvider(QObject* parent = nullptr);
|
explicit AmazonCoverProvider(QObject* parent = nullptr);
|
||||||
|
|
||||||
static const char* kAccessKeyB64;
|
static const char* kAccessKeyB64;
|
||||||
static const char* kSecretAccessKeyB64;
|
static const char* kSecretAccessKeyB64;
|
||||||
|
@ -48,4 +50,4 @@ class AmazonCoverProvider : public CoverProvider {
|
||||||
QNetworkAccessManager* network_;
|
QNetworkAccessManager* network_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // AMAZONCOVERPROVIDER_H
|
#endif // COVERS_AMAZONCOVERPROVIDER_H_
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
/* This file is part of Clementine.
|
/* This file is part of Clementine.
|
||||||
Copyright 2010, David Sansome <me@davidsansome.com>
|
Copyright 2013, Andreas <asfa194@gmail.com>
|
||||||
|
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
|
||||||
|
Copyright 2014, John Maguire <john.maguire@gmail.com>
|
||||||
|
|
||||||
Clementine is free software: you can redistribute it and/or modify
|
Clementine is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -110,27 +112,22 @@ void CoverExportRunnable::ProcessAndExportCover() {
|
||||||
(cover_path == Song::kEmbeddedCover ? "jpg" : extension);
|
(cover_path == Song::kEmbeddedCover ? "jpg" : extension);
|
||||||
|
|
||||||
// If the file exists, do not override!
|
// If the file exists, do not override!
|
||||||
if (dialog_result_.overwrite_ == AlbumCoverExport::OverwriteMode_None &&
|
if (dialog_result_.overwrite_ == AlbumCoverExport::OverwriteMode_None && QFile::exists(new_file)) {
|
||||||
QFile::exists(new_file)) {
|
|
||||||
EmitCoverSkipped();
|
EmitCoverSkipped();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// we're handling overwrite as remove + copy so we need to delete the old file
|
// we're handling overwrite as remove + copy so we need to delete the old file
|
||||||
// first
|
// first
|
||||||
if (QFile::exists(new_file) &&
|
if (QFile::exists(new_file) && dialog_result_.overwrite_ != AlbumCoverExport::OverwriteMode_None) {
|
||||||
dialog_result_.overwrite_ != AlbumCoverExport::OverwriteMode_None) {
|
|
||||||
|
|
||||||
// if the mode is "overwrite smaller" then skip the cover if a bigger one
|
// if the mode is "overwrite smaller" then skip the cover if a bigger one
|
||||||
// is already available in the folder
|
// is already available in the folder
|
||||||
if (dialog_result_.overwrite_ == AlbumCoverExport::OverwriteMode_Smaller) {
|
if (dialog_result_.overwrite_ == AlbumCoverExport::OverwriteMode_Smaller) {
|
||||||
QImage existing;
|
QImage existing;
|
||||||
existing.load(new_file);
|
existing.load(new_file);
|
||||||
|
|
||||||
if (existing.isNull() ||
|
if (existing.isNull() || existing.size().height() >= cover.size().height() ||
|
||||||
existing.size().height() >= cover.size().height() ||
|
|
||||||
existing.size().width() >= cover.size().width()) {
|
existing.size().width() >= cover.size().width()) {
|
||||||
|
|
||||||
EmitCoverSkipped();
|
EmitCoverSkipped();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
/* This file is part of Clementine.
|
/* This file is part of Clementine.
|
||||||
Copyright 2010, David Sansome <me@davidsansome.com>
|
Copyright 2013, Andreas <asfa194@gmail.com>
|
||||||
|
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
|
||||||
|
Copyright 2014, John Maguire <john.maguire@gmail.com>
|
||||||
|
|
||||||
Clementine is free software: you can redistribute it and/or modify
|
Clementine is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -15,8 +17,8 @@
|
||||||
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef COVEREXPORTRUNNABLE_H
|
#ifndef COVERS_COVEREXPORTRUNNABLE_H_
|
||||||
#define COVEREXPORTRUNNABLE_H
|
#define COVERS_COVEREXPORTRUNNABLE_H_
|
||||||
|
|
||||||
#include "core/song.h"
|
#include "core/song.h"
|
||||||
#include "ui/albumcoverexport.h"
|
#include "ui/albumcoverexport.h"
|
||||||
|
@ -36,7 +38,7 @@ class CoverExportRunnable : public QObject, public QRunnable {
|
||||||
|
|
||||||
void run();
|
void run();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void CoverExported();
|
void CoverExported();
|
||||||
void CoverSkipped();
|
void CoverSkipped();
|
||||||
|
|
||||||
|
@ -53,4 +55,4 @@ signals:
|
||||||
AlbumCoverExporter* album_cover_exporter_;
|
AlbumCoverExporter* album_cover_exporter_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // COVEREXPORTRUNNABLE_H
|
#endif // COVERS_COVEREXPORTRUNNABLE_H_
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
/* This file is part of Clementine.
|
/* This file is part of Clementine.
|
||||||
Copyright 2010, David Sansome <me@davidsansome.com>
|
Copyright 2011, Paweł Bara <keirangtp@gmail.com>
|
||||||
|
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
|
||||||
|
Copyright 2014, John Maguire <john.maguire@gmail.com>
|
||||||
|
|
||||||
Clementine is free software: you can redistribute it and/or modify
|
Clementine is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
/* This file is part of Clementine.
|
/* This file is part of Clementine.
|
||||||
Copyright 2010, David Sansome <me@davidsansome.com>
|
Copyright 2011, Paweł Bara <keirangtp@gmail.com>
|
||||||
|
Copyright 2011, David Sansome <davidsansome@gmail.com>
|
||||||
|
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
|
||||||
|
Copyright 2014, John Maguire <john.maguire@gmail.com>
|
||||||
|
|
||||||
Clementine is free software: you can redistribute it and/or modify
|
Clementine is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -15,8 +18,8 @@
|
||||||
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef COVERPROVIDER_H
|
#ifndef COVERS_COVERPROVIDER_H_
|
||||||
#define COVERPROVIDER_H
|
#define COVERS_COVERPROVIDER_H_
|
||||||
|
|
||||||
#include "albumcoverfetcher.h"
|
#include "albumcoverfetcher.h"
|
||||||
#include "coverproviders.h"
|
#include "coverproviders.h"
|
||||||
|
@ -32,7 +35,7 @@ class CoverProvider : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CoverProvider(const QString& name, QObject* parent);
|
explicit CoverProvider(const QString& name, QObject* parent);
|
||||||
|
|
||||||
// A name (very short description) of this provider, like "last.fm".
|
// A name (very short description) of this provider, like "last.fm".
|
||||||
QString name() const { return name_; }
|
QString name() const { return name_; }
|
||||||
|
@ -45,11 +48,11 @@ class CoverProvider : public QObject {
|
||||||
|
|
||||||
virtual void CancelSearch(int id) {}
|
virtual void CancelSearch(int id) {}
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void SearchFinished(int id, const QList<CoverSearchResult>& results);
|
void SearchFinished(int id, const QList<CoverSearchResult>& results);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString name_;
|
QString name_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // COVERPROVIDER_H
|
#endif // COVERS_COVERPROVIDER_H_
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
/* This file is part of Clementine.
|
/* This file is part of Clementine.
|
||||||
Copyright 2010, David Sansome <me@davidsansome.com>
|
Copyright 2011, Paweł Bara <keirangtp@gmail.com>
|
||||||
|
Copyright 2011, David Sansome <me@davidsansome.com>
|
||||||
|
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
|
||||||
|
Copyright 2014, John Maguire <john.maguire@gmail.com>
|
||||||
|
|
||||||
Clementine is free software: you can redistribute it and/or modify
|
Clementine is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
/* This file is part of Clementine.
|
/* This file is part of Clementine.
|
||||||
Copyright 2010, David Sansome <me@davidsansome.com>
|
Copyright 2011, Paweł Bara <keirangtp@gmail.com>
|
||||||
|
Copyright 2011, David Sansome <me@davidsansome.com>
|
||||||
|
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
|
||||||
|
Copyright 2014, John Maguire <john.maguire@gmail.com>
|
||||||
|
|
||||||
Clementine is free software: you can redistribute it and/or modify
|
Clementine is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -15,8 +18,8 @@
|
||||||
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef COVERPROVIDERS_H
|
#ifndef COVERS_COVERPROVIDERS_H_
|
||||||
#define COVERPROVIDERS_H
|
#define COVERS_COVERPROVIDERS_H_
|
||||||
|
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
#include <QMutex>
|
#include <QMutex>
|
||||||
|
@ -32,7 +35,7 @@ class CoverProviders : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CoverProviders(QObject* parent = nullptr);
|
explicit CoverProviders(QObject* parent = nullptr);
|
||||||
|
|
||||||
// Lets a cover provider register itself in the repository.
|
// Lets a cover provider register itself in the repository.
|
||||||
void AddProvider(CoverProvider* provider);
|
void AddProvider(CoverProvider* provider);
|
||||||
|
@ -58,4 +61,4 @@ class CoverProviders : public QObject {
|
||||||
QAtomicInt next_id_;
|
QAtomicInt next_id_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // COVERPROVIDERS_H
|
#endif // COVERS_COVERPROVIDERS_H_
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
/* This file is part of Clementine.
|
/* This file is part of Clementine.
|
||||||
Copyright 2010, David Sansome <me@davidsansome.com>
|
Copyright 2011, David Sansome <davidsansome@gmail.com>
|
||||||
|
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
|
||||||
|
Copyright 2014, John Maguire <john.maguire@gmail.com>
|
||||||
|
|
||||||
Clementine is free software: you can redistribute it and/or modify
|
Clementine is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
/* This file is part of Clementine.
|
/* This file is part of Clementine.
|
||||||
Copyright 2010, David Sansome <me@davidsansome.com>
|
Copyright 2011, David Sansome <davidsansome@gmail.com>
|
||||||
|
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
|
||||||
|
Copyright 2014, John Maguire <john.maguire@gmail.com>
|
||||||
|
|
||||||
Clementine is free software: you can redistribute it and/or modify
|
Clementine is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -15,8 +17,8 @@
|
||||||
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef COVERSEARCHSTATISTICS_H
|
#ifndef COVERS_COVERSEARCHSTATISTICS_H_
|
||||||
#define COVERSEARCHSTATISTICS_H
|
#define COVERS_COVERSEARCHSTATISTICS_H_
|
||||||
|
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
@ -40,4 +42,4 @@ struct CoverSearchStatistics {
|
||||||
QString AverageDimensions() const;
|
QString AverageDimensions() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // COVERSEARCHSTATISTICS_H
|
#endif // COVERS_COVERSEARCHSTATISTICS_H_
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
/* This file is part of Clementine.
|
/* This file is part of Clementine.
|
||||||
Copyright 2010, David Sansome <me@davidsansome.com>
|
Copyright 2011, David Sansome <davidsansome@gmail.com>
|
||||||
|
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
|
||||||
|
Copyright 2014, John Maguire <john.maguire@gmail.com>
|
||||||
|
|
||||||
Clementine is free software: you can redistribute it and/or modify
|
Clementine is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
/* This file is part of Clementine.
|
/* This file is part of Clementine.
|
||||||
Copyright 2010, David Sansome <me@davidsansome.com>
|
Copyright 2011, David Sansome <davidsansome@gmail.com>
|
||||||
|
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
|
||||||
|
Copyright 2014, John Maguire <john.maguire@gmail.com>
|
||||||
|
|
||||||
Clementine is free software: you can redistribute it and/or modify
|
Clementine is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -15,8 +17,8 @@
|
||||||
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef COVERSEARCHSTATISTICSDIALOG_H
|
#ifndef COVERS_COVERSEARCHSTATISTICSDIALOG_H_
|
||||||
#define COVERSEARCHSTATISTICSDIALOG_H
|
#define COVERS_COVERSEARCHSTATISTICSDIALOG_H_
|
||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
|
|
||||||
|
@ -30,7 +32,7 @@ class CoverSearchStatisticsDialog : public QDialog {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CoverSearchStatisticsDialog(QWidget* parent = nullptr);
|
explicit CoverSearchStatisticsDialog(QWidget* parent = nullptr);
|
||||||
~CoverSearchStatisticsDialog();
|
~CoverSearchStatisticsDialog();
|
||||||
|
|
||||||
void Show(const CoverSearchStatistics& statistics);
|
void Show(const CoverSearchStatistics& statistics);
|
||||||
|
@ -44,4 +46,4 @@ class CoverSearchStatisticsDialog : public QDialog {
|
||||||
QVBoxLayout* details_layout_;
|
QVBoxLayout* details_layout_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // COVERSEARCHSTATISTICSDIALOG_H
|
#endif // COVERS_COVERSEARCHSTATISTICSDIALOG_H_
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
/* This file is part of Clementine.
|
/* This file is part of Clementine.
|
||||||
Copyright 2010, David Sansome <me@davidsansome.com>
|
Copyright 2010-2012, 2014, David Sansome <me@davidsansome.com>
|
||||||
|
Copyright 2014, John Maguire <john.maguire@gmail.com>
|
||||||
|
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
|
||||||
|
|
||||||
Clementine is free software: you can redistribute it and/or modify
|
Clementine is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
/* This file is part of Clementine.
|
/* This file is part of Clementine.
|
||||||
Copyright 2010, David Sansome <me@davidsansome.com>
|
Copyright 2011-2012, David Sansome <me@davidsansome.com>
|
||||||
|
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
|
||||||
|
Copyright 2014, John Maguire <john.maguire@gmail.com>
|
||||||
|
|
||||||
Clementine is free software: you can redistribute it and/or modify
|
Clementine is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -15,8 +17,8 @@
|
||||||
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CURRENTARTLOADER_H
|
#ifndef COVERS_CURRENTARTLOADER_H_
|
||||||
#define CURRENTARTLOADER_H
|
#define COVERS_CURRENTARTLOADER_H_
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
@ -34,7 +36,7 @@ class CurrentArtLoader : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CurrentArtLoader(Application* app, QObject* parent = nullptr);
|
explicit CurrentArtLoader(Application* app, QObject* parent = nullptr);
|
||||||
~CurrentArtLoader();
|
~CurrentArtLoader();
|
||||||
|
|
||||||
const AlbumCoverLoaderOptions& options() const { return options_; }
|
const AlbumCoverLoaderOptions& options() const { return options_; }
|
||||||
|
@ -43,7 +45,7 @@ class CurrentArtLoader : public QObject {
|
||||||
public slots:
|
public slots:
|
||||||
void LoadArt(const Song& song);
|
void LoadArt(const Song& song);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void ArtLoaded(const Song& song, const QString& uri, const QImage& image);
|
void ArtLoaded(const Song& song, const QString& uri, const QImage& image);
|
||||||
void ThumbnailLoaded(const Song& song, const QString& uri,
|
void ThumbnailLoaded(const Song& song, const QString& uri,
|
||||||
const QImage& image);
|
const QImage& image);
|
||||||
|
@ -64,4 +66,4 @@ signals:
|
||||||
Song last_song_;
|
Song last_song_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // CURRENTARTLOADER_H
|
#endif // COVERS_CURRENTARTLOADER_H_
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
/* This file is part of Clementine.
|
/* This file is part of Clementine.
|
||||||
Copyright 2012, Martin Björklund <mbj4668@gmail.com>
|
Copyright 2012, Martin Björklund <mbj4668@gmail.com>
|
||||||
|
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
|
||||||
|
Copyright 2014, John Maguire <john.maguire@gmail.com>
|
||||||
|
|
||||||
Clementine is free software: you can redistribute it and/or modify
|
Clementine is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
/* This file is part of Clementine.
|
/* This file is part of Clementine.
|
||||||
Copyright 2012, Martin Björklund <mbj4668@gmail.com>
|
Copyright 2012, Martin Björklund <mbj4668@gmail.com>
|
||||||
|
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
|
||||||
|
Copyright 2014, John Maguire <john.maguire@gmail.com>
|
||||||
|
|
||||||
Clementine is free software: you can redistribute it and/or modify
|
Clementine is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -15,8 +17,8 @@
|
||||||
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef DISCOGSCOVERPROVIDER_H
|
#ifndef COVERS_DISCOGSCOVERPROVIDER_H_
|
||||||
#define DISCOGSCOVERPROVIDER_H
|
#define COVERS_DISCOGSCOVERPROVIDER_H_
|
||||||
|
|
||||||
#include "coverprovider.h"
|
#include "coverprovider.h"
|
||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
|
@ -45,7 +47,7 @@ class DiscogsCoverProvider : public CoverProvider {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DiscogsCoverProvider(QObject* parent = nullptr);
|
explicit DiscogsCoverProvider(QObject* parent = nullptr);
|
||||||
|
|
||||||
static const char* kSearchUrl;
|
static const char* kSearchUrl;
|
||||||
|
|
||||||
|
@ -63,4 +65,4 @@ class DiscogsCoverProvider : public CoverProvider {
|
||||||
void EndSearch(DiscogsCoverSearchContext* ctx);
|
void EndSearch(DiscogsCoverSearchContext* ctx);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DISCOGSCOVERPROVIDER_H
|
#endif // COVERS_DISCOGSCOVERPROVIDER_H_
|
||||||
|
|
|
@ -1,3 +1,23 @@
|
||||||
|
/* This file is part of Clementine.
|
||||||
|
Copyright 2010-2012, 2014, John Maguire <john.maguire@gmail.com>
|
||||||
|
Copyright 2012, David Sansome <me@davidsansome.com>
|
||||||
|
Copyright 2013, Arnaud Bienner <arnaud.bienner@gmail.com>
|
||||||
|
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
|
||||||
|
|
||||||
|
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 "kittenloader.h"
|
#include "kittenloader.h"
|
||||||
|
|
||||||
#include <QNetworkReply>
|
#include <QNetworkReply>
|
||||||
|
|
|
@ -1,5 +1,24 @@
|
||||||
#ifndef KITTENLOADER_H
|
/* This file is part of Clementine.
|
||||||
#define KITTENLOADER_H
|
Copyright 2010, 2012, John Maguire <john.maguire@gmail.com>
|
||||||
|
Copyright 2012, David Sansome <me@davidsansome.com>
|
||||||
|
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
|
||||||
|
|
||||||
|
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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef COVERS_KITTENLOADER_H_
|
||||||
|
#define COVERS_KITTENLOADER_H_
|
||||||
|
|
||||||
#include "albumcoverloader.h"
|
#include "albumcoverloader.h"
|
||||||
|
|
||||||
|
@ -11,7 +30,7 @@ class QNetworkReply;
|
||||||
class KittenLoader : public AlbumCoverLoader {
|
class KittenLoader : public AlbumCoverLoader {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
KittenLoader(QObject* parent = nullptr);
|
explicit KittenLoader(QObject* parent = nullptr);
|
||||||
|
|
||||||
virtual quint64 LoadKitten(const AlbumCoverLoaderOptions& options);
|
virtual quint64 LoadKitten(const AlbumCoverLoaderOptions& options);
|
||||||
|
|
||||||
|
@ -27,4 +46,4 @@ class KittenLoader : public AlbumCoverLoader {
|
||||||
QQueue<QUrl> kitten_urls_;
|
QQueue<QUrl> kitten_urls_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif // COVERS_KITTENLOADER_H_
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
/* This file is part of Clementine.
|
/* This file is part of Clementine.
|
||||||
Copyright 2010, David Sansome <me@davidsansome.com>
|
Copyright 2011, Paweł Bara <keirangtp@gmail.com>
|
||||||
|
Copyright 2011-2012, David Sansome <me@davidsansome.com>
|
||||||
|
Copyright 2012, Harald Sitter <sitter@kde.org>
|
||||||
|
Copyright 2012, 2014, John Maguire <john.maguire@gmail.com>
|
||||||
|
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
|
||||||
|
|
||||||
Clementine is free software: you can redistribute it and/or modify
|
Clementine is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
/* This file is part of Clementine.
|
/* This file is part of Clementine.
|
||||||
Copyright 2010, David Sansome <me@davidsansome.com>
|
Copyright 2011, Paweł Bara <keirangtp@gmail.com>
|
||||||
|
Copyright 2011, David Sansome <davidsansome@gmail.com>
|
||||||
|
Copyright 2011-2012, 2014, John Maguire <john.maguire@gmail.com>
|
||||||
|
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
|
||||||
|
|
||||||
Clementine is free software: you can redistribute it and/or modify
|
Clementine is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -15,8 +18,8 @@
|
||||||
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LASTFMCOVERPROVIDER_H
|
#ifndef COVERS_LASTFMCOVERPROVIDER_H_
|
||||||
#define LASTFMCOVERPROVIDER_H
|
#define COVERS_LASTFMCOVERPROVIDER_H_
|
||||||
|
|
||||||
#include "albumcoverfetcher.h"
|
#include "albumcoverfetcher.h"
|
||||||
#include "coverprovider.h"
|
#include "coverprovider.h"
|
||||||
|
@ -31,7 +34,7 @@ class LastFmCoverProvider : public CoverProvider {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
LastFmCoverProvider(QObject* parent);
|
explicit LastFmCoverProvider(QObject* parent);
|
||||||
|
|
||||||
bool StartSearch(const QString& artist, const QString& album, int id);
|
bool StartSearch(const QString& artist, const QString& album, int id);
|
||||||
|
|
||||||
|
@ -42,4 +45,4 @@ class LastFmCoverProvider : public CoverProvider {
|
||||||
QMap<QNetworkReply*, int> pending_queries_;
|
QMap<QNetworkReply*, int> pending_queries_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // LASTFMCOVERPROVIDER_H
|
#endif // COVERS_LASTFMCOVERPROVIDER_H_
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/* This file is part of Clementine.
|
/* This file is part of Clementine.
|
||||||
Copyright 2012, David Sansome <me@davidsansome.com>
|
Copyright 2012, 2014, John Maguire <john.maguire@gmail.com>
|
||||||
|
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
|
||||||
|
|
||||||
Clementine is free software: you can redistribute it and/or modify
|
Clementine is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/* This file is part of Clementine.
|
/* This file is part of Clementine.
|
||||||
Copyright 2012, David Sansome <me@davidsansome.com>
|
Copyright 2012, John Maguire <john.maguire@gmail.com>
|
||||||
|
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
|
||||||
|
|
||||||
Clementine is free software: you can redistribute it and/or modify
|
Clementine is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -15,8 +16,8 @@
|
||||||
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MUSICBRAINZCOVERPROVIDER_H
|
#ifndef COVERS_MUSICBRAINZCOVERPROVIDER_H_
|
||||||
#define MUSICBRAINZCOVERPROVIDER_H
|
#define COVERS_MUSICBRAINZCOVERPROVIDER_H_
|
||||||
|
|
||||||
#include "coverprovider.h"
|
#include "coverprovider.h"
|
||||||
|
|
||||||
|
@ -28,7 +29,7 @@ class QNetworkReply;
|
||||||
class MusicbrainzCoverProvider : public CoverProvider {
|
class MusicbrainzCoverProvider : public CoverProvider {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
MusicbrainzCoverProvider(QObject* parent = nullptr);
|
explicit MusicbrainzCoverProvider(QObject* parent = nullptr);
|
||||||
|
|
||||||
// CoverProvider
|
// CoverProvider
|
||||||
virtual bool StartSearch(const QString& artist, const QString& album, int id);
|
virtual bool StartSearch(const QString& artist, const QString& album, int id);
|
||||||
|
@ -44,4 +45,4 @@ class MusicbrainzCoverProvider : public CoverProvider {
|
||||||
QMap<int, QString> cover_names_;
|
QMap<int, QString> cover_names_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MUSICBRAINZCOVERPROVIDER_H
|
#endif // COVERS_MUSICBRAINZCOVERPROVIDER_H_
|
||||||
|
|
Loading…
Reference in New Issue