MythTV  master
musicmetadata.h
Go to the documentation of this file.
1 #ifndef MUSICMETADATA_H_
2 #define MUSICMETADATA_H_
3 
4 // C/C++
5 #include <cstdint>
6 #include <utility>
7 
8 
9 // qt
10 #include <QCoreApplication>
11 #include <QDateTime>
12 #include <QImage>
13 #include <QMap>
14 #include <QMetaType>
15 #include <QStringList>
16 
17 // mythtv
18 #include "mythtypes.h"
19 #include "mythmetaexp.h"
20 #include "mthread.h"
21 #include "mythcorecontext.h"
22 
23 class AllMusic;
24 class AlbumArtImages;
25 class LyricsData;
26 class MetaIO;
27 
29 {
37 };
38 
40 {
41  public:
42  AlbumArtImage(void) :
43  m_filename(""), m_hostname(""), m_description("") {}
44  explicit AlbumArtImage(const AlbumArtImage * const image) :
45  m_id(image->m_id), m_filename(image->m_filename),
46  m_hostname(image->m_hostname), m_imageType(image->m_imageType),
47  m_description(image->m_description), m_embedded(image->m_embedded) {}
48  int m_id {0};
49  QString m_filename;
50  QString m_hostname;
51  ImageType m_imageType {IT_UNKNOWN};
52  QString m_description;
53  bool m_embedded {false};
54 };
55 
56 using AlbumArtList = QList<AlbumArtImage*>;
57 
59 {
61  RT_CD = 1,
63 };
64 
65 #define METADATA_BITS_FOR_REPO 8
66 #define METADATA_REPO_SHIFT 24
67 #define METADATA_REPO_MASK 0xff000000
68 #define METADATA_ID_MASK 0x00ffffff
69 
70 #define ID_TO_ID(x) x & METADATA_ID_MASK;
71 #define ID_TO_REPO(x) x >> METADATA_REPO_SHIFT
72 
73 #define METADATA_INVALID_FILENAME "**NOT FOUND**"
74 
75 #define STREAMUPDATEURL "https://services.mythtv.org/music/data/?data=streams"
76 #define STREAMURLCOUNT 5
77 
78 using UrlList = std::array<QString,STREAMURLCOUNT>;
79 
81 {
82  Q_DECLARE_TR_FUNCTIONS(MusicMetadata);
83 
84  public:
85 
86  using IdType = uint32_t;
87 
88  explicit MusicMetadata(QString lfilename = "", QString lartist = "", QString lcompilation_artist = "",
89  QString lalbum = "", QString ltitle = "", QString lgenre = "",
90  int lyear = 0, int ltracknum = 0, std::chrono::milliseconds llength = 0ms, int lid = 0,
91  int lrating = 0, int lplaycount = 0, QDateTime llastplay = QDateTime(),
92  QDateTime ldateadded = QDateTime(), bool lcompilation = false, QString lformat = "")
93  : m_artist(std::move(lartist)),
94  m_compilationArtist(std::move(lcompilation_artist)),
95  m_album(std::move(lalbum)),
96  m_title(std::move(ltitle)),
97  m_genre(std::move(lgenre)),
98  m_format(std::move(lformat)),
99  m_year(lyear),
100  m_trackNum(ltracknum),
101  m_length(llength),
102  m_rating(lrating),
103  m_lastPlay(std::move(llastplay)),
104  m_dateAdded(std::move(ldateadded)),
105  m_playCount(lplaycount),
106  m_compilation(lcompilation),
107  m_id(lid),
108  m_filename(std::move(lfilename))
109  {
110  checkEmptyFields();
111  }
112 
113  MusicMetadata(int lid, QString lbroadcaster, QString lchannel, QString ldescription, const UrlList &lurls, QString llogourl,
114  QString lgenre, QString lmetaformat, QString lcountry, QString llanguage, QString lformat);
115 
116  ~MusicMetadata();
117 
119  {
120  *this = other;
121  m_changed = false;
122  }
123 
124  MusicMetadata& operator=(const MusicMetadata &rhs);
125 
126  QString Artist() const { return m_artist; }
127  QString ArtistSort() const { return m_artistSort; }
128  void setArtist(const QString &lartist,
129  const QString &lartist_sort = nullptr)
130  {
131  m_artist = lartist;
132  m_artistId = -1;
133  m_artistSort = lartist_sort;
134  m_formattedArtist.clear(); m_formattedTitle.clear();
135  ensureSortFields();
136  }
137 
138  QString CompilationArtist() const { return m_compilationArtist; }
139  QString CompilationArtistSort() const { return m_compilationArtistSort; }
140  void setCompilationArtist(const QString &lcompilation_artist,
141  const QString &lcompilation_artist_sort = nullptr)
142  {
143  m_compilationArtist = lcompilation_artist;
144  m_compartistId = -1;
145  m_compilationArtistSort = lcompilation_artist_sort;
146  m_formattedArtist.clear(); m_formattedTitle.clear();
147  ensureSortFields();
148  }
149 
150  QString Album() const { return m_album; }
151  QString AlbumSort() const { return m_albumSort; }
152  void setAlbum(const QString &lalbum,
153  const QString &lalbum_sort = nullptr)
154  {
155  m_album = lalbum;
156  m_albumId = -1;
157  m_albumSort = lalbum_sort;
158  m_formattedArtist.clear(); m_formattedTitle.clear();
159  ensureSortFields();
160  }
161 
162  QString Title() const { return m_title; }
163  QString TitleSort() const { return m_titleSort; }
164  void setTitle(const QString &ltitle,
165  const QString &ltitle_sort = nullptr)
166  {
167  m_title = ltitle;
168  m_titleSort = ltitle_sort;
169  ensureSortFields();
170  }
171 
172  QString FormatArtist();
173  QString FormatTitle();
174 
175  QString Genre() const { return m_genre; }
176  void setGenre(const QString &lgenre) {
177  m_genre = lgenre;
178  m_genreId = -1;
179  }
180 
181  void setDirectoryId(int ldirectoryid) { m_directoryId = ldirectoryid; }
182  int getDirectoryId();
183 
184  void setArtistId(int lartistid) { m_artistId = lartistid; }
185  int getArtistId();
186 
187  void setCompilationArtistId(int lartistid) { m_compartistId = lartistid; }
188  int getCompilationArtistId();
189 
190  void setAlbumId(int lalbumid) { m_albumId = lalbumid; }
191  int getAlbumId();
192 
193  void setGenreId(int lgenreid) { m_genreId = lgenreid; }
194  int getGenreId();
195 
196  int Year() const { return m_year; }
197  void setYear(int lyear) { m_year = lyear; }
198 
199  int Track() const { return m_trackNum; }
200  void setTrack(int ltrack) { m_trackNum = ltrack; }
201 
202  int GetTrackCount() const { return m_trackCount; }
203  void setTrackCount(int ltrackcount) { m_trackCount = ltrackcount; }
204 
205  std::chrono::milliseconds Length() const { return m_length; }
206  template <typename T>
207  typename std::enable_if_t<std::chrono::__is_duration<T>::value, void>
208  setLength(T llength) { m_length = llength; }
209 
210  int DiscNumber() const {return m_discNum;}
211  void setDiscNumber(int discnum) { m_discNum = discnum; }
212 
213  int DiscCount() const {return m_discCount;}
214  void setDiscCount(int disccount) { m_discCount = disccount; }
215 
216  int Playcount() const { return m_playCount; }
217  void setPlaycount(int lplaycount) { m_playCount = lplaycount; }
218 
219  IdType ID() const { return m_id; }
220  void setID(IdType lid) { m_id = lid; }
221  void setRepo(RepoType repo) { m_id = (m_id & METADATA_ID_MASK) | (repo << METADATA_REPO_SHIFT); }
222 
223  bool isCDTrack(void) const { return ID_TO_REPO(m_id) == RT_CD; }
224  bool isDBTrack(void) const { return ID_TO_REPO(m_id) == RT_Database; }
225  bool isRadio(void) const { return ID_TO_REPO(m_id) == RT_Radio; }
226 
227  QString Filename(bool find = true);
228  void setFilename(const QString &lfilename);
229  QString getLocalFilename(void);
230 
231  QString Hostname(void) { return m_hostname; }
232  void setHostname(const QString &host) { m_hostname = host; }
233 
234  uint64_t FileSize() const { return m_fileSize; }
235  void setFileSize(uint64_t lfilesize) { m_fileSize = lfilesize; }
236 
237  QString Format() const { return m_format; }
238  void setFormat(const QString &lformat) { m_format = lformat; }
239 
240  int Rating() const { return m_rating; }
241  void decRating();
242  void incRating();
243  void setRating(int lrating) { m_rating = lrating; }
244 
245  QDateTime LastPlay() const { return m_lastPlay; }
246  void setLastPlay();
247  void setLastPlay(const QDateTime& lastPlay);
248 
249  int PlayCount() const { return m_playCount; }
250  void incPlayCount();
251 
252  // track is part of a compilation album
253  bool Compilation() const { return m_compilation; }
254  void setCompilation(bool state)
255  {
256  m_compilation = state;
257  m_formattedArtist.clear();
258  m_formattedTitle.clear();
259  }
260  bool determineIfCompilation(bool cd = false);
261 
262  // for radio streams
263  void setBroadcaster(const QString &broadcaster) { m_broadcaster = broadcaster; }
264  QString Broadcaster(void) { return m_broadcaster; }
265 
266  void setChannel(const QString &channel) { m_channel = channel; }
267  QString Channel(void) { return m_channel; }
268 
269  void setDescription(const QString &description) { m_description = description; }
270  QString Description(void) { return m_description; }
271 
272  void setUrl(const QString &url, uint index = 0);
273  QString Url(uint index = 0);
274 
275  void setLogoUrl(const QString &logourl) { m_logoUrl = logourl; }
276  QString LogoUrl(void) { return m_logoUrl; }
277 
278  void setMetadataFormat(const QString &metaformat) { m_metaFormat = metaformat; }
279  QString MetadataFormat(void) { return m_metaFormat; }
280 
281  void setCountry(const QString &country) { m_country = country; }
282  QString Country(void) { return m_country; }
283 
284  void setLanguage(const QString &language) { m_language = language; }
285  QString Language(void) { return m_language; }
286 
287  void setEmbeddedAlbumArt(AlbumArtList &albumart);
288 
289  void reloadMetadata(void);
290  void dumpToDatabase(void);
291  void setField(const QString &field, const QString &data);
292  void getField(const QString& field, QString *data);
293  void toMap(InfoMap &metadataMap, const QString &prefix = "");
294 
295  void persist(void);
296 
297  bool hasChanged(void) const { return m_changed; }
298 
299  bool compare(MusicMetadata *mdata) const;
300 
301  // static functions
302  static MusicMetadata *createFromFilename(const QString &filename);
303  static MusicMetadata *createFromID(int trackid);
304  static void setArtistAndTrackFormats();
305  static QStringList fillFieldList(const QString& field);
306  static bool updateStreamList(void);
307 
308  // this looks for any image available - preferring a front cover if available
309  QString getAlbumArtFile(void);
310  // this looks only for the given image type
311  QString getAlbumArtFile(ImageType type);
312 
313  AlbumArtImages *getAlbumArtImages(void);
314  void reloadAlbumArtImages(void);
315 
316  LyricsData *getLyricsData(void);
317 
318  MetaIO *getTagger(void);
319 
320  private:
321  void setCompilationFormatting(bool cd = false);
322  QString formatReplaceSymbols(const QString &format);
323  void checkEmptyFields(void);
324  void ensureSortFields(void);
325  void saveHostname(void);
326 
327  QString m_artist;
328  QString m_artistSort;
331  QString m_album;
332  QString m_albumSort;
333  QString m_title;
334  QString m_titleSort;
337  QString m_genre;
338  QString m_format;
339  int m_year {0};
340  int m_trackNum {0};
341  int m_trackCount {0};
342  int m_discNum {0};
343  int m_discCount {0};
344  std::chrono::milliseconds m_length {0ms};
345  int m_rating {0};
346  int m_directoryId {-1};
347  int m_artistId {-1};
348  int m_compartistId {-1};
349  int m_albumId {-1};
350  int m_genreId {-1};
351  QDateTime m_lastPlay;
352  QDateTime m_tempLastPlay;
353  QDateTime m_dateAdded;
354  int m_playCount {0};
355  int m_tempPlayCount {0};
356  bool m_compilation {false};
357 
358  AlbumArtImages *m_albumArt {nullptr};
359 
360  LyricsData *m_lyricsData {nullptr};
361 
362  IdType m_id {0};
363  QString m_filename; // file name as stored in the DB
364  QString m_hostname; // host where file is located as stored in the DB
365  QString m_actualFilename; // actual URL of the file if found
366  uint64_t m_fileSize {0};
367  bool m_changed {false};
368 
369  // radio stream stuff
370  QString m_broadcaster;
371  QString m_channel;
372  QString m_description;
374  QString m_logoUrl;
375  QString m_metaFormat;
376  QString m_country;
377  QString m_language;
378 
379  // Various formatting strings
380  static QString s_formatNormalFileArtist;
381  static QString s_formatNormalFileTrack;
382  static QString s_formatNormalCdArtist;
383  static QString s_formatNormalCdTrack;
384 
389 };
390 
393 
396 
400 
401 //---------------------------------------------------------------------------
402 
404 {
405 
406  public:
407 
408  explicit MetadataLoadingThread(AllMusic *parent_ptr)
409  : MThread("MetadataLoading"), m_parent(parent_ptr) {}
410  void run() override; // MThread
411 
412  private:
413 
414  AllMusic *m_parent {nullptr};
415 };
416 
417 //---------------------------------------------------------------------------
418 
420 {
421  Q_DECLARE_TR_FUNCTIONS(AllMusic);
422 
423  public:
424 
425  AllMusic(void);
426  ~AllMusic();
427 
428  MusicMetadata* getMetadata(int an_id);
429  bool updateMetadata(int an_id, MusicMetadata *the_track);
430  int count() const { return m_numPcs; }
431  int countLoaded() const { return m_numLoaded; }
432  void save();
433  bool startLoading(void);
434  void resync(); // After a CD rip, for example
435 
436  // cd stuff
437  void clearCDData(void);
438  void addCDTrack(const MusicMetadata &the_track);
439  bool checkCDTrack(MusicMetadata *the_track);
440  MusicMetadata* getCDMetadata(int m_the_track);
441  QString getCDTitle(void) const { return m_cdTitle; }
442  void setCDTitle(const QString &a_title) { m_cdTitle = a_title; }
443  int getCDTrackCount(void) const { return m_cdData.count(); }
444 
445  bool doneLoading() const { return m_doneLoading; }
446  bool cleanOutThreads();
447 
448  MetadataPtrList *getAllMetadata(void) { return &m_allMusic; }
449  MetadataPtrList *getAllCDMetadata(void) { return &m_cdData; }
450 
451  bool isValidID(int an_id);
452 
453  private:
455 
456  int m_numPcs {0};
457  int m_numLoaded {0};
458 
459  using MusicMap = QMap<int, MusicMetadata*>;
461 
462  // cd stuff
463  MetadataPtrList m_cdData; // More than one cd player?
464  QString m_cdTitle;
465 
466  MetadataLoadingThread *m_metadataLoader {nullptr};
467  bool m_doneLoading {false};
468 
469  int m_playCountMin {0};
470  int m_playCountMax {0};
471  qint64 m_lastPlayMin {0};
472  qint64 m_lastPlayMax {0};
473 };
474 
475 using StreamList = QList<MusicMetadata*>;
476 
478 {
479  public:
480 
481  AllStream(void);
482  ~AllStream();
483 
484  void loadStreams(void);
485 
486  bool isValidID(MusicMetadata::IdType an_id);
487 
488  MusicMetadata* getMetadata(MusicMetadata::IdType an_id);
489 
490  StreamList *getStreams(void) { return &m_streamList; }
491 
492  void addStream(MusicMetadata *mdata);
493  void removeStream(MusicMetadata *mdata);
494  void updateStream(MusicMetadata *mdata);
495 
496  private:
498 };
499 
500 //----------------------------------------------------------------------------
501 
503 {
504  public:
505  explicit AlbumArtScannerThread(QStringList strList) :
506  MThread("AlbumArtScanner"), m_strList(std::move(strList)) {}
507 
508  void run() override // MThread
509  {
510  RunProlog();
512  RunEpilog();
513  }
514 
515  QStringList getResult(void) { return m_strList; }
516 
517  private:
518  QStringList m_strList;
519 };
520 
522 {
523  Q_DECLARE_TR_FUNCTIONS(AlbumArtImages);
524 
525  public:
526  explicit AlbumArtImages(MusicMetadata *metadata, bool loadFromDB = true);
527  ~AlbumArtImages();
528 
529  void scanForImages(void);
530  void addImage(const AlbumArtImage * newImage);
531  uint getImageCount() { return m_imageList.size(); }
532  AlbumArtImage *getImage(ImageType type);
533  AlbumArtImage *getImageByID(int imageID);
534  QStringList getImageFilenames(void) const;
535  AlbumArtList *getImageList(void) { return &m_imageList; }
536  AlbumArtImage *getImageAt(uint index);
537 
538  void dumpToDatabase(void);
539 
540  static ImageType guessImageType(const QString &filename);
541  static QString getTypeName(ImageType type);
542  static QString getTypeFilename(ImageType type);
543  static ImageType getImageTypeFromName(const QString &name);
544 
545  private:
546  void findImages(void);
547 
548  MusicMetadata *m_parent {nullptr};
550 };
551 
553 
554 #endif
MusicMetadata::AlbumSort
QString AlbumSort() const
Definition: musicmetadata.h:151
MusicMetadata::setDirectoryId
void setDirectoryId(int ldirectoryid)
Definition: musicmetadata.h:181
AllMusic::countLoaded
int countLoaded() const
Definition: musicmetadata.h:431
MusicMetadata::Title
QString Title() const
Definition: musicmetadata.h:162
MusicMetadata::LogoUrl
QString LogoUrl(void)
Definition: musicmetadata.h:276
MusicMetadata::Genre
QString Genre() const
Definition: musicmetadata.h:175
MusicMetadata::GetTrackCount
int GetTrackCount() const
Definition: musicmetadata.h:202
MusicMetadata::setDescription
void setDescription(const QString &description)
Definition: musicmetadata.h:269
MusicMetadata::setBroadcaster
void setBroadcaster(const QString &broadcaster)
Definition: musicmetadata.h:263
MusicMetadata::hasChanged
bool hasChanged(void) const
Definition: musicmetadata.h:297
MusicMetadata::s_formatCompilationCdArtist
static QString s_formatCompilationCdArtist
Definition: musicmetadata.h:387
AlbumArtScannerThread::AlbumArtScannerThread
AlbumArtScannerThread(QStringList strList)
Definition: musicmetadata.h:505
MusicMetadata::m_hostname
QString m_hostname
Definition: musicmetadata.h:364
AlbumArtImage::AlbumArtImage
AlbumArtImage(void)
Definition: musicmetadata.h:42
MythCoreContext::SendReceiveStringList
bool SendReceiveStringList(QStringList &strlist, bool quickTimeout=false, bool block=true)
Send a message to the backend and wait for a response.
Definition: mythcorecontext.cpp:1383
MusicMetadata::m_description
QString m_description
Definition: musicmetadata.h:372
AllMusic
Definition: musicmetadata.h:419
AllMusic::getAllCDMetadata
MetadataPtrList * getAllCDMetadata(void)
Definition: musicmetadata.h:449
MusicMetadata::MetadataFormat
QString MetadataFormat(void)
Definition: musicmetadata.h:279
AllMusic::m_allMusic
MetadataPtrList m_allMusic
Definition: musicmetadata.h:454
MusicMetadata::setDiscNumber
void setDiscNumber(int discnum)
Definition: musicmetadata.h:211
MusicMetadata::CompilationArtist
QString CompilationArtist() const
Definition: musicmetadata.h:138
AlbumArtImages::getImageList
AlbumArtList * getImageList(void)
Definition: musicmetadata.h:535
MusicMetadata::m_urls
UrlList m_urls
Definition: musicmetadata.h:373
MusicMetadata::setArtistId
void setArtistId(int lartistid)
Definition: musicmetadata.h:184
AlbumArtScannerThread::run
void run() override
Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead.
Definition: musicmetadata.h:508
MusicMetadata::m_title
QString m_title
Definition: musicmetadata.h:333
operator==
bool operator==(MusicMetadata &a, MusicMetadata &b)
Definition: musicmetadata.cpp:46
MusicMetadata::m_compilationArtistSort
QString m_compilationArtistSort
Definition: musicmetadata.h:330
MusicMetadata::setTrack
void setTrack(int ltrack)
Definition: musicmetadata.h:200
MusicMetadata::isRadio
bool isRadio(void) const
Definition: musicmetadata.h:225
AllMusic::m_musicMap
MusicMap m_musicMap
Definition: musicmetadata.h:460
MusicMetadata::m_artistSort
QString m_artistSort
Definition: musicmetadata.h:328
MetaIO
Definition: metaio.h:17
MusicMetadata::setChannel
void setChannel(const QString &channel)
Definition: musicmetadata.h:266
MusicMetadata::ID
IdType ID() const
Definition: musicmetadata.h:219
MusicMetadata::setAlbum
void setAlbum(const QString &lalbum, const QString &lalbum_sort=nullptr)
Definition: musicmetadata.h:152
MusicMetadata::Track
int Track() const
Definition: musicmetadata.h:199
MusicMetadata::MusicMetadata
MusicMetadata(QString lfilename="", QString lartist="", QString lcompilation_artist="", QString lalbum="", QString ltitle="", QString lgenre="", int lyear=0, int ltracknum=0, std::chrono::milliseconds llength=0ms, int lid=0, int lrating=0, int lplaycount=0, QDateTime llastplay=QDateTime(), QDateTime ldateadded=QDateTime(), bool lcompilation=false, QString lformat="")
Definition: musicmetadata.h:88
MusicMetadata::setRating
void setRating(int lrating)
Definition: musicmetadata.h:243
AllMusic::setCDTitle
void setCDTitle(const QString &a_title)
Definition: musicmetadata.h:442
MThread::RunProlog
void RunProlog(void)
Sets up a thread, call this if you reimplement run().
Definition: mthread.cpp:196
IT_BACKCOVER
@ IT_BACKCOVER
Definition: musicmetadata.h:32
MusicMetadata
Definition: musicmetadata.h:80
MusicMetadata::Length
std::chrono::milliseconds Length() const
Definition: musicmetadata.h:205
AllMusic::count
int count() const
Definition: musicmetadata.h:430
mythmetaexp.h
MusicMetadata::Artist
QString Artist() const
Definition: musicmetadata.h:126
RT_Database
@ RT_Database
Definition: musicmetadata.h:60
hardwareprofile.distros.mythtv_data.data_mythtv.prefix
string prefix
Definition: data_mythtv.py:40
MetadataLoadingThread
Definition: musicmetadata.h:403
MusicMetadata::m_format
QString m_format
Definition: musicmetadata.h:338
MusicMetadata::m_formattedTitle
QString m_formattedTitle
Definition: musicmetadata.h:336
MusicMetadata::CompilationArtistSort
QString CompilationArtistSort() const
Definition: musicmetadata.h:139
AllMusic::m_cdTitle
QString m_cdTitle
Definition: musicmetadata.h:464
AllMusic::getAllMetadata
MetadataPtrList * getAllMetadata(void)
Definition: musicmetadata.h:448
InfoMap
QHash< QString, QString > InfoMap
Definition: mythtypes.h:15
AllStream::m_streamList
StreamList m_streamList
Definition: musicmetadata.h:497
MusicMetadata::Channel
QString Channel(void)
Definition: musicmetadata.h:267
AlbumArtImages::getImageCount
uint getImageCount()
Definition: musicmetadata.h:531
MusicMetadata::setLength
std::enable_if_t< std::chrono::__is_duration< T >::value, void > setLength(T llength)
Definition: musicmetadata.h:208
RepoType
RepoType
Definition: musicmetadata.h:58
MusicMetadata::setHostname
void setHostname(const QString &host)
Definition: musicmetadata.h:232
MusicMetadata::Description
QString Description(void)
Definition: musicmetadata.h:270
MusicMetadata::m_dateAdded
QDateTime m_dateAdded
Definition: musicmetadata.h:353
MusicMetadata::Playcount
int Playcount() const
Definition: musicmetadata.h:216
AllMusic::doneLoading
bool doneLoading() const
Definition: musicmetadata.h:445
MusicMetadata::m_lastPlay
QDateTime m_lastPlay
Definition: musicmetadata.h:351
MusicMetadata::MusicMetadata
MusicMetadata(const MusicMetadata &other)
Definition: musicmetadata.h:118
RT_Radio
@ RT_Radio
Definition: musicmetadata.h:62
AlbumArtScannerThread
Definition: musicmetadata.h:502
operator!=
bool operator!=(MusicMetadata &a, MusicMetadata &b)
Definition: musicmetadata.cpp:51
MusicMetadata::s_formatCompilationFileTrack
static QString s_formatCompilationFileTrack
Definition: musicmetadata.h:386
RT_CD
@ RT_CD
Definition: musicmetadata.h:61
MusicMetadata::m_tempLastPlay
QDateTime m_tempLastPlay
Definition: musicmetadata.h:352
MusicMetadata::Language
QString Language(void)
Definition: musicmetadata.h:285
MusicMetadata::setLanguage
void setLanguage(const QString &language)
Definition: musicmetadata.h:284
MusicMetadata::setGenre
void setGenre(const QString &lgenre)
Definition: musicmetadata.h:176
AllStream::getStreams
StreamList * getStreams(void)
Definition: musicmetadata.h:490
AllStream
Definition: musicmetadata.h:477
MusicMetadata::setTitle
void setTitle(const QString &ltitle, const QString &ltitle_sort=nullptr)
Definition: musicmetadata.h:164
MusicMetadata::setFileSize
void setFileSize(uint64_t lfilesize)
Definition: musicmetadata.h:235
MusicMetadata::ArtistSort
QString ArtistSort() const
Definition: musicmetadata.h:127
AllMusic::getCDTitle
QString getCDTitle(void) const
Definition: musicmetadata.h:441
mythtypes.h
MusicMetadata::isDBTrack
bool isDBTrack(void) const
Definition: musicmetadata.h:224
MusicMetadata::m_channel
QString m_channel
Definition: musicmetadata.h:371
AllMusic::m_cdData
MetadataPtrList m_cdData
Definition: musicmetadata.h:463
MusicMetadata::setMetadataFormat
void setMetadataFormat(const QString &metaformat)
Definition: musicmetadata.h:278
MThread::RunEpilog
void RunEpilog(void)
Cleans up a thread's resources, call this if you reimplement run().
Definition: mthread.cpp:209
AllMusic::getCDTrackCount
int getCDTrackCount(void) const
Definition: musicmetadata.h:443
LyricsData
Definition: lyricsdata.h:49
uint
unsigned int uint
Definition: compat.h:140
IT_ARTIST
@ IT_ARTIST
Definition: musicmetadata.h:35
IT_CD
@ IT_CD
Definition: musicmetadata.h:33
gCoreContext
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
Definition: mythcorecontext.cpp:60
MusicMetadata::m_album
QString m_album
Definition: musicmetadata.h:331
MusicMetadata::s_formatCompilationCdTrack
static QString s_formatCompilationCdTrack
Definition: musicmetadata.h:388
StreamList
QList< MusicMetadata * > StreamList
Definition: musicmetadata.h:475
MusicMetadata::Album
QString Album() const
Definition: musicmetadata.h:150
MusicMetadata::IdType
uint32_t IdType
Definition: musicmetadata.h:86
MusicMetadata::setCompilationArtist
void setCompilationArtist(const QString &lcompilation_artist, const QString &lcompilation_artist_sort=nullptr)
Definition: musicmetadata.h:140
MusicMetadata::isCDTrack
bool isCDTrack(void) const
Definition: musicmetadata.h:223
AlbumArtImage::m_hostname
QString m_hostname
Definition: musicmetadata.h:50
IT_UNKNOWN
@ IT_UNKNOWN
Definition: musicmetadata.h:30
MusicMetadata::m_formattedArtist
QString m_formattedArtist
Definition: musicmetadata.h:335
MusicMetadata::setArtist
void setArtist(const QString &lartist, const QString &lartist_sort=nullptr)
Definition: musicmetadata.h:128
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(ImageType)
MusicMetadata::Hostname
QString Hostname(void)
Definition: musicmetadata.h:231
mythcorecontext.h
AlbumArtImages
Definition: musicmetadata.h:521
AlbumArtList
QList< AlbumArtImage * > AlbumArtList
Definition: musicmetadata.h:56
MusicMetadata::FileSize
uint64_t FileSize() const
Definition: musicmetadata.h:234
AlbumArtImage::AlbumArtImage
AlbumArtImage(const AlbumArtImage *const image)
Definition: musicmetadata.h:44
MusicMetadata::TitleSort
QString TitleSort() const
Definition: musicmetadata.h:163
MusicMetadata::Format
QString Format() const
Definition: musicmetadata.h:237
MusicMetadata::setDiscCount
void setDiscCount(int disccount)
Definition: musicmetadata.h:214
MusicMetadata::m_language
QString m_language
Definition: musicmetadata.h:377
MusicMetadata::m_metaFormat
QString m_metaFormat
Definition: musicmetadata.h:375
std
Definition: mythchrono.h:23
MusicMetadata::m_artist
QString m_artist
Definition: musicmetadata.h:327
MusicMetadata::Country
QString Country(void)
Definition: musicmetadata.h:282
AllMusic::MusicMap
QMap< int, MusicMetadata * > MusicMap
Definition: musicmetadata.h:459
MusicMetadata::setAlbumId
void setAlbumId(int lalbumid)
Definition: musicmetadata.h:190
MusicMetadata::LastPlay
QDateTime LastPlay() const
Definition: musicmetadata.h:245
AlbumArtImage
Definition: musicmetadata.h:39
MusicMetadata::Compilation
bool Compilation() const
Definition: musicmetadata.h:253
IT_LAST
@ IT_LAST
Definition: musicmetadata.h:36
METADATA_REPO_SHIFT
#define METADATA_REPO_SHIFT
Definition: musicmetadata.h:66
MusicMetadata::m_albumSort
QString m_albumSort
Definition: musicmetadata.h:332
MusicMetadata::m_logoUrl
QString m_logoUrl
Definition: musicmetadata.h:374
MusicMetadata::m_broadcaster
QString m_broadcaster
Definition: musicmetadata.h:370
MThread
This is a wrapper around QThread that does several additional things.
Definition: mthread.h:48
UrlList
std::array< QString, STREAMURLCOUNT > UrlList
Definition: musicmetadata.h:78
mthread.h
MusicMetadata::PlayCount
int PlayCount() const
Definition: musicmetadata.h:249
MusicMetadata::s_formatNormalFileTrack
static QString s_formatNormalFileTrack
Definition: musicmetadata.h:381
MusicMetadata::m_genre
QString m_genre
Definition: musicmetadata.h:337
MusicMetadata::setPlaycount
void setPlaycount(int lplaycount)
Definition: musicmetadata.h:217
MusicMetadata::setTrackCount
void setTrackCount(int ltrackcount)
Definition: musicmetadata.h:203
AlbumArtScannerThread::getResult
QStringList getResult(void)
Definition: musicmetadata.h:515
IT_FRONTCOVER
@ IT_FRONTCOVER
Definition: musicmetadata.h:31
MusicMetadata::Broadcaster
QString Broadcaster(void)
Definition: musicmetadata.h:264
MetadataPtrList
QList< MusicMetadata * > MetadataPtrList
Definition: musicmetadata.h:397
MusicMetadata::setRepo
void setRepo(RepoType repo)
Definition: musicmetadata.h:221
MusicMetadata::setYear
void setYear(int lyear)
Definition: musicmetadata.h:197
MusicMetadata::Rating
int Rating() const
Definition: musicmetadata.h:240
MusicMetadata::s_formatCompilationFileArtist
static QString s_formatCompilationFileArtist
Definition: musicmetadata.h:385
MusicMetadata::setID
void setID(IdType lid)
Definition: musicmetadata.h:220
MusicMetadata::m_compilationArtist
QString m_compilationArtist
Definition: musicmetadata.h:329
MusicMetadata::setCompilation
void setCompilation(bool state)
Definition: musicmetadata.h:254
MetadataLoadingThread::MetadataLoadingThread
MetadataLoadingThread(AllMusic *parent_ptr)
Definition: musicmetadata.h:408
MusicMetadata::setFormat
void setFormat(const QString &lformat)
Definition: musicmetadata.h:238
IT_INLAY
@ IT_INLAY
Definition: musicmetadata.h:34
AlbumArtImage::m_description
QString m_description
Definition: musicmetadata.h:52
MusicMetadata::m_actualFilename
QString m_actualFilename
Definition: musicmetadata.h:365
ID_TO_REPO
#define ID_TO_REPO(x)
Definition: musicmetadata.h:71
MusicMetadata::m_titleSort
QString m_titleSort
Definition: musicmetadata.h:334
build_compdb.filename
filename
Definition: build_compdb.py:21
AlbumArtScannerThread::m_strList
QStringList m_strList
Definition: musicmetadata.h:518
MusicMetadata::setCountry
void setCountry(const QString &country)
Definition: musicmetadata.h:281
METADATA_ID_MASK
#define METADATA_ID_MASK
Definition: musicmetadata.h:68
META_PUBLIC
#define META_PUBLIC
Definition: mythmetaexp.h:9
MusicMetadata::m_filename
QString m_filename
Definition: musicmetadata.h:363
MusicMetadata::setCompilationArtistId
void setCompilationArtistId(int lartistid)
Definition: musicmetadata.h:187
ImageType
ImageType
Definition: musicmetadata.h:28
AlbumArtImages::m_imageList
AlbumArtList m_imageList
Definition: musicmetadata.h:549
MusicMetadata::s_formatNormalFileArtist
static QString s_formatNormalFileArtist
Definition: musicmetadata.h:380
MusicMetadata::Year
int Year() const
Definition: musicmetadata.h:196
MusicMetadata::DiscCount
int DiscCount() const
Definition: musicmetadata.h:213
MusicMetadata::m_country
QString m_country
Definition: musicmetadata.h:376
find
static pid_list_t::iterator find(const PIDInfoMap &map, pid_list_t &list, pid_list_t::iterator begin, pid_list_t::iterator end, bool find_open)
Definition: dvbstreamhandler.cpp:356
MusicMetadata::setGenreId
void setGenreId(int lgenreid)
Definition: musicmetadata.h:193
MusicMetadata::setLogoUrl
void setLogoUrl(const QString &logourl)
Definition: musicmetadata.h:275
MusicMetadata::s_formatNormalCdArtist
static QString s_formatNormalCdArtist
Definition: musicmetadata.h:382
MusicMetadata::s_formatNormalCdTrack
static QString s_formatNormalCdTrack
Definition: musicmetadata.h:383
AlbumArtImage::m_filename
QString m_filename
Definition: musicmetadata.h:49
MusicMetadata::DiscNumber
int DiscNumber() const
Definition: musicmetadata.h:210