Sayonara Player
CoverLookupAlternative.h
1 /* CoverLookupAlternative.h */
2 
3 /* Copyright (C) 2011-2016 Lucio Carreras
4  *
5  * This file is part of sayonara player
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11 
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16 
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 
22 
23 #ifndef COVERLOOKUPALTERNATIVE_H
24 #define COVERLOOKUPALTERNATIVE_H
25 
26 #include "Components/CoverLookup/CoverLookup.h"
27 #include "Helper/MetaData/Artist.h"
28 #include "Helper/MetaData/Album.h"
29 
35 {
36 
37  Q_OBJECT
38 
39 private:
40 
41  CoverLookupAlternative(QObject* parent, int n_covers);
42 
43  CoverLookupPtr _cl;
44 
45  Artist _artist;
46  QString _artist_name;
47  QStringList _artists_name;
48 
49  int _album_id;
50  QString _album_name;
51  Album _album;
52 
53  quint8 _db_id;
54 
55  int _n_covers;
56  bool _run;
57 
58  enum class SearchType : quint8 {
59 
60  Standard=0,
61  Sampler=1,
62  ByID=2,
63  ByAlbum=3,
64  ByArtistName = 4,
65  ByArtist = 5
66  } _search_type;
67 
68 
69 public:
70 
71  CoverLookupAlternative(QObject* parent, const QString& album_name, const QString& artist_name, int n_covers);
72  CoverLookupAlternative(QObject* parent, const QString& album_name, const QStringList& artists_name, int n_covers);
73  CoverLookupAlternative(QObject* parent, const Album& album, int n_covers);
74  CoverLookupAlternative(QObject* parent, int album_id, quint8 db_id, int n_covers);
75  CoverLookupAlternative(QObject* parent, const QString& artist, int n_covers);
76  CoverLookupAlternative(QObject* parent, const Artist& artist, int n_covers);
77 
79 
80  void stop() override;
81  void start();
82 
83 
84 private slots:
85  void cover_found(const CoverLocation& );
86  void finished(bool);
87 };
88 
89 
90 #endif // COVERLOOKUPALTERNATIVE_H
The CoverLookupAlternative class.
Definition: CoverLookupAlternative.h:34
The CoverLookupInterface class.
Definition: CoverLookup.h:45
The CoverLocation class.
Definition: CoverLocation.h:37
The Album class.
Definition: Album.h:41
The Artist class.
Definition: Artist.h:36
std::shared_ptr< CoverLookup > CoverLookupPtr
CoverLookupPtr.
Definition: CoverLookup.h:180