blob: 459c77eca132c59cf5dce52d56d86326a59e4d3a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
#include <QtDebug>
#include "library/coverart.h"
#include "util/debug.h"
QString sourceToString(CoverInfo::Source source) {
switch (source) {
case CoverInfo::UNKNOWN:
return "UNKNOWN";
case CoverInfo::GUESSED:
return "GUESSED";
case CoverInfo::USER_SELECTED:
return "USER_SELECTED";
}
return "INVALID INFO VALUE";
}
QString typeToString(CoverInfo::Type type) {
switch (type) {
case CoverInfo::NONE:
return "NONE";
case CoverInfo::METADATA:
return "METADATA";
case CoverInfo::FILE:
return "FILE";
}
return "INVALID TYPE VALUE";
}
QDebug operator<<(QDebug dbg, const CoverInfo& info) {
return dbg.maybeSpace() << QString("CoverInfo(%1,%2,%3,%4,%5)")
.arg(typeToString(info.type),
sourceToString(info.source),
info.coverLocation,
QString::number(info.hash),
info.trackLocation);
}
QDebug operator<<(QDebug dbg, const CoverArt& art) {
return dbg.maybeSpace() << QString("CoverArt(%1,%2)")
.arg(toDebugString(art.image.size()),
toDebugString(art.info));
}
|