Sayonara Player
src
Components
Streaming
LastFM
LFMTrackChangedThread.h
1
/* LFMTrackChangedThread.h
2
3
* Copyright (C) 2011-2019 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
* created by Lucio Carreras,
21
* Jul 18, 2012
22
*
23
*/
24
25
#ifndef LFMTRACKCHANGEDTHREAD_H_
26
#define LFMTRACKCHANGEDTHREAD_H_
27
28
#include "ArtistMatch.h"
29
#include "Utils/Pimpl.h"
30
31
#include <QObject>
32
33
class
SmartCompare;
34
35
namespace
LastFM
36
{
37
class
TrackChangedThread
:
38
public
QObject
39
{
40
Q_OBJECT
41
PIMPL(
TrackChangedThread
)
42
43
signals:
44
void
sig_similar_artists_available(
const
IdList
& artist_ids);
45
46
47
public
:
48
explicit
TrackChangedThread
(QObject* parent=
nullptr
);
49
~
TrackChangedThread
();
50
51
void
search_similar_artists(
const
MetaData
& md);
52
void
update_now_playing(
const
QString& session_key,
const
MetaData
& md);
53
54
55
private
:
56
void
evaluate_artist_match(
const
ArtistMatch
& artist_match);
57
58
QMap<QString, int>
filter_available_artists(
const
ArtistMatch
& artist_match,
ArtistMatch::Quality
quality);
59
60
61
private
slots:
62
void
response_sim_artists(
const
QByteArray& data);
63
void
error_sim_artists(
const
QString& error);
64
65
void
response_update(
const
QByteArray& response);
66
void
error_update(
const
QString& error);
67
};
68
}
69
#endif
/* LFMTRACKCHANGEDTHREAD_H_ */
LastFM::ArtistMatch::Quality
Quality
The Quality enum used to access the bin of interest. See ArtistMatch::get(Quality q)
Definition:
ArtistMatch.h:52
QList
Definition:
EngineUtils.h:33
QMap
Definition:
org_mpris_media_player2_adaptor.h:21
MetaData
The MetaData class.
Definition:
MetaData.h:44
LastFM::TrackChangedThread
Definition:
LFMTrackChangedThread.h:37
LastFM::ArtistMatch
Definition:
ArtistMatch.h:29
Generated on Sun Nov 17 2019 00:00:00 for Sayonara Player by
1.8.16