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 {
36  IT_LAST
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,
62  RT_Radio = 2
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 {
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, int llength = 0, 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  int Length() const { return m_length; }
206  void setLength(int llength) { m_length = llength; }
207 
208  int DiscNumber() const {return m_discNum;}
209  void setDiscNumber(int discnum) { m_discNum = discnum; }
210 
211  int DiscCount() const {return m_discCount;}
212  void setDiscCount(int disccount) { m_discCount = disccount; }
213 
214  int Playcount() const { return m_playCount; }
215  void setPlaycount(int lplaycount) { m_playCount = lplaycount; }
216 
217  IdType ID() const { return m_id; }
218  void setID(IdType lid) { m_id = lid; }
219  void setRepo(RepoType repo) { m_id = (m_id & METADATA_ID_MASK) | (repo << METADATA_REPO_SHIFT); }
220 
221  bool isCDTrack(void) const { return ID_TO_REPO(m_id) == RT_CD; }
222  bool isDBTrack(void) const { return ID_TO_REPO(m_id) == RT_Database; }
223  bool isRadio(void) const { return ID_TO_REPO(m_id) == RT_Radio; }
224 
225  QString Filename(bool find = true);
226  void setFilename(const QString &lfilename);
227  QString getLocalFilename(void);
228 
229  QString Hostname(void) { return m_hostname; }
230  void setHostname(const QString &host) { m_hostname = host; }
231 
232  uint64_t FileSize() const { return m_fileSize; }
233  void setFileSize(uint64_t lfilesize) { m_fileSize = lfilesize; }
234 
235  QString Format() const { return m_format; }
236  void setFormat(const QString &lformat) { m_format = lformat; }
237 
238  int Rating() const { return m_rating; }
239  void decRating();
240  void incRating();
241  void setRating(int lrating) { m_rating = lrating; }
242 
243  QDateTime LastPlay() const { return m_lastPlay; }
244  void setLastPlay();
245  void setLastPlay(const QDateTime& lastPlay);
246 
247  int PlayCount() const { return m_playCount; }
248  void incPlayCount();
249 
250  // track is part of a compilation album
251  bool Compilation() const { return m_compilation; }
252  void setCompilation(bool state)
253  {
254  m_compilation = state;
255  m_formattedArtist.clear();
256  m_formattedTitle.clear();
257  }
258  bool determineIfCompilation(bool cd = false);
259 
260  // for radio streams
261  void setBroadcaster(const QString &broadcaster) { m_broadcaster = broadcaster; }
262  QString Broadcaster(void) { return m_broadcaster; }
263 
264  void setChannel(const QString &channel) { m_channel = channel; }
265  QString Channel(void) { return m_channel; }
266 
267  void setDescription(const QString &description) { m_description = description; }
268  QString Description(void) { return m_description; }
269 
270  void setUrl(const QString &url, uint index = 0);
271  QString Url(uint index = 0);
272 
273  void setLogoUrl(const QString &logourl) { m_logoUrl = logourl; }
274  QString LogoUrl(void) { return m_logoUrl; }
275 
276  void setMetadataFormat(const QString &metaformat) { m_metaFormat = metaformat; }
277  QString MetadataFormat(void) { return m_metaFormat; }
278 
279  void setCountry(const QString &country) { m_country = country; }
280  QString Country(void) { return m_country; }
281 
282  void setLanguage(const QString &language) { m_language = language; }
283  QString Language(void) { return m_language; }
284 
285  void setEmbeddedAlbumArt(AlbumArtList &albumart);
286 
287  void reloadMetadata(void);
288  void dumpToDatabase(void);
289  void setField(const QString &field, const QString &data);
290  void getField(const QString& field, QString *data);
291  void toMap(InfoMap &metadataMap, const QString &prefix = "");
292 
293  void persist(void);
294 
295  bool hasChanged(void) const { return m_changed; }
296 
297  bool compare(MusicMetadata *mdata) const;
298 
299  // static functions
300  static MusicMetadata *createFromFilename(const QString &filename);
301  static MusicMetadata *createFromID(int trackid);
302  static void setArtistAndTrackFormats();
303  static QStringList fillFieldList(const QString& field);
304  static bool updateStreamList(void);
305 
306  // this looks for any image available - preferring a front cover if available
307  QString getAlbumArtFile(void);
308  // this looks only for the given image type
309  QString getAlbumArtFile(ImageType type);
310 
311  AlbumArtImages *getAlbumArtImages(void);
312  void reloadAlbumArtImages(void);
313 
314  LyricsData *getLyricsData(void);
315 
316  MetaIO *getTagger(void);
317 
318  private:
319  void setCompilationFormatting(bool cd = false);
320  QString formatReplaceSymbols(const QString &format);
321  void checkEmptyFields(void);
322  void ensureSortFields(void);
323  void saveHostname(void);
324 
325  QString m_artist;
326  QString m_artistSort;
329  QString m_album;
330  QString m_albumSort;
331  QString m_title;
332  QString m_titleSort;
335  QString m_genre;
336  QString m_format;
337  int m_year {0};
338  int m_trackNum {0};
339  int m_trackCount {0};
340  int m_discNum {0};
341  int m_discCount {0};
342  int m_length {0};
343  int m_rating {0};
344  int m_directoryId {-1};
345  int m_artistId {-1};
346  int m_compartistId {-1};
347  int m_albumId {-1};
348  int m_genreId {-1};
349  QDateTime m_lastPlay;
350  QDateTime m_tempLastPlay;
351  QDateTime m_dateAdded;
352  int m_playCount {0};
353  int m_tempPlayCount {0};
354  bool m_compilation {false};
355 
356  AlbumArtImages *m_albumArt {nullptr};
357 
358  LyricsData *m_lyricsData {nullptr};
359 
360  IdType m_id {0};
361  QString m_filename; // file name as stored in the DB
362  QString m_hostname; // host where file is located as stored in the DB
363  QString m_actualFilename; // actual URL of the file if found
364  uint64_t m_fileSize {0};
365  bool m_changed {false};
366 
367  // radio stream stuff
368  QString m_broadcaster;
369  QString m_channel;
370  QString m_description;
372  QString m_logoUrl;
373  QString m_metaFormat;
374  QString m_country;
375  QString m_language;
376 
377  // Various formatting strings
378  static QString s_formatNormalFileArtist;
379  static QString s_formatNormalFileTrack;
380  static QString s_formatNormalCdArtist;
381  static QString s_formatNormalCdTrack;
382 
387 };
388 
391 
394 
398 
399 //---------------------------------------------------------------------------
400 
402 {
403 
404  public:
405 
406  explicit MetadataLoadingThread(AllMusic *parent_ptr)
407  : MThread("MetadataLoading"), m_parent(parent_ptr) {}
408  void run() override; // MThread
409 
410  private:
411 
412  AllMusic *m_parent {nullptr};
413 };
414 
415 //---------------------------------------------------------------------------
416 
418 {
420 
421  public:
422 
423  AllMusic(void);
424  ~AllMusic();
425 
426  MusicMetadata* getMetadata(int an_id);
427  bool updateMetadata(int an_id, MusicMetadata *the_track);
428  int count() const { return m_numPcs; }
429  int countLoaded() const { return m_numLoaded; }
430  void save();
431  bool startLoading(void);
432  void resync(); // After a CD rip, for example
433 
434  // cd stuff
435  void clearCDData(void);
436  void addCDTrack(const MusicMetadata &the_track);
437  bool checkCDTrack(MusicMetadata *the_track);
438  MusicMetadata* getCDMetadata(int m_the_track);
439  QString getCDTitle(void) const { return m_cdTitle; }
440  void setCDTitle(const QString &a_title) { m_cdTitle = a_title; }
441  int getCDTrackCount(void) const { return m_cdData.count(); }
442 
443  bool doneLoading() const { return m_doneLoading; }
444  bool cleanOutThreads();
445 
446  MetadataPtrList *getAllMetadata(void) { return &m_allMusic; }
447  MetadataPtrList *getAllCDMetadata(void) { return &m_cdData; }
448 
449  bool isValidID(int an_id);
450 
451  private:
453 
454  int m_numPcs {0};
455  int m_numLoaded {0};
456 
457  using MusicMap = QMap<int, MusicMetadata*>;
459 
460  // cd stuff
461  MetadataPtrList m_cdData; // More than one cd player?
462  QString m_cdTitle;
463 
464  MetadataLoadingThread *m_metadataLoader {nullptr};
465  bool m_doneLoading {false};
466 
467  int m_playCountMin {0};
468  int m_playCountMax {0};
469  qint64 m_lastPlayMin {0};
470  qint64 m_lastPlayMax {0};
471 };
472 
473 using StreamList = QList<MusicMetadata*>;
474 
476 {
477  public:
478 
479  AllStream(void);
480  ~AllStream();
481 
482  void loadStreams(void);
483 
484  bool isValidID(MusicMetadata::IdType an_id);
485 
486  MusicMetadata* getMetadata(MusicMetadata::IdType an_id);
487 
488  StreamList *getStreams(void) { return &m_streamList; }
489 
490  void addStream(MusicMetadata *mdata);
491  void removeStream(MusicMetadata *mdata);
492  void updateStream(MusicMetadata *mdata);
493 
494  private:
496 };
497 
498 //----------------------------------------------------------------------------
499 
501 {
502  public:
503  explicit AlbumArtScannerThread(QStringList strList) :
504  MThread("AlbumArtScanner"), m_strList(std::move(strList)) {}
505 
506  void run() override // MThread
507  {
508  RunProlog();
510  RunEpilog();
511  }
512 
513  QStringList getResult(void) { return m_strList; }
514 
515  private:
516  QStringList m_strList;
517 };
518 
520 {
522 
523  public:
524  explicit AlbumArtImages(MusicMetadata *metadata, bool loadFromDB = true);
525  ~AlbumArtImages();
526 
527  void scanForImages(void);
528  void addImage(const AlbumArtImage * newImage);
529  uint getImageCount() { return m_imageList.size(); }
530  AlbumArtImage *getImage(ImageType type);
531  AlbumArtImage *getImageByID(int imageID);
532  QStringList getImageFilenames(void) const;
533  AlbumArtList *getImageList(void) { return &m_imageList; }
534  AlbumArtImage *getImageAt(uint index);
535 
536  void dumpToDatabase(void);
537 
538  static ImageType guessImageType(const QString &filename);
539  static QString getTypeName(ImageType type);
540  static QString getTypeFilename(ImageType type);
541  static ImageType getImageTypeFromName(const QString &name);
542 
543  private:
544  void findImages(void);
545 
546  MusicMetadata *m_parent {nullptr};
548 };
549 
551 
552 #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:429
channel
QDomElement channel
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:501
MusicMetadata::Title
QString Title() const
Definition: musicmetadata.h:162
MusicMetadata::LogoUrl
QString LogoUrl(void)
Definition: musicmetadata.h:274
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:267
MusicMetadata::setBroadcaster
void setBroadcaster(const QString &broadcaster)
Definition: musicmetadata.h:261
MusicMetadata::hasChanged
bool hasChanged(void) const
Definition: musicmetadata.h:295
MusicMetadata::s_formatCompilationCdArtist
static QString s_formatCompilationCdArtist
Definition: musicmetadata.h:385
AlbumArtScannerThread::AlbumArtScannerThread
AlbumArtScannerThread(QStringList strList)
Definition: musicmetadata.h:503
MusicMetadata::m_hostname
QString m_hostname
Definition: musicmetadata.h:362
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:1380
MusicMetadata::setLength
void setLength(int llength)
Definition: musicmetadata.h:206
MusicMetadata::m_description
QString m_description
Definition: musicmetadata.h:370
AllMusic
Definition: musicmetadata.h:418
AllMusic::getAllCDMetadata
MetadataPtrList * getAllCDMetadata(void)
Definition: musicmetadata.h:447
MusicMetadata::MetadataFormat
QString MetadataFormat(void)
Definition: musicmetadata.h:277
AllMusic::m_allMusic
MetadataPtrList m_allMusic
Definition: musicmetadata.h:452
MusicMetadata::setDiscNumber
void setDiscNumber(int discnum)
Definition: musicmetadata.h:209
MusicMetadata::CompilationArtist
QString CompilationArtist() const
Definition: musicmetadata.h:138
AlbumArtImages::getImageList
AlbumArtList * getImageList(void)
Definition: musicmetadata.h:533
MusicMetadata::MusicMetadata
MusicMetadata(QString lfilename="", QString lartist="", QString lcompilation_artist="", QString lalbum="", QString ltitle="", QString lgenre="", int lyear=0, int ltracknum=0, int llength=0, 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::m_urls
UrlList m_urls
Definition: musicmetadata.h:371
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:506
MusicMetadata::m_title
QString m_title
Definition: musicmetadata.h:331
operator==
bool operator==(MusicMetadata &a, MusicMetadata &b)
Definition: musicmetadata.cpp:47
MusicMetadata::m_compilationArtistSort
QString m_compilationArtistSort
Definition: musicmetadata.h:328
MusicMetadata::setTrack
void setTrack(int ltrack)
Definition: musicmetadata.h:200
MusicMetadata::isRadio
bool isRadio(void) const
Definition: musicmetadata.h:223
AllMusic::m_musicMap
MusicMap m_musicMap
Definition: musicmetadata.h:458
MusicMetadata::m_artistSort
QString m_artistSort
Definition: musicmetadata.h:326
MetaIO
Definition: metaio.h:18
MusicMetadata::setChannel
void setChannel(const QString &channel)
Definition: musicmetadata.h:264
MusicMetadata::ID
IdType ID() const
Definition: musicmetadata.h:217
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::setRating
void setRating(int lrating)
Definition: musicmetadata.h:241
AllMusic::setCDTitle
void setCDTitle(const QString &a_title)
Definition: musicmetadata.h:440
MThread::RunProlog
void RunProlog(void)
Sets up a thread, call this if you reimplement run().
Definition: mthread.cpp:198
IT_BACKCOVER
@ IT_BACKCOVER
Definition: musicmetadata.h:32
MusicMetadata
Definition: musicmetadata.h:81
AllMusic::count
int count() const
Definition: musicmetadata.h:428
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:402
MusicMetadata::m_format
QString m_format
Definition: musicmetadata.h:336
MusicMetadata::m_formattedTitle
QString m_formattedTitle
Definition: musicmetadata.h:334
MusicMetadata::CompilationArtistSort
QString CompilationArtistSort() const
Definition: musicmetadata.h:139
AllMusic::m_cdTitle
QString m_cdTitle
Definition: musicmetadata.h:462
AllMusic::getAllMetadata
MetadataPtrList * getAllMetadata(void)
Definition: musicmetadata.h:446
InfoMap
QHash< QString, QString > InfoMap
Definition: mythtypes.h:15
AllStream::m_streamList
StreamList m_streamList
Definition: musicmetadata.h:495
MusicMetadata::Channel
QString Channel(void)
Definition: musicmetadata.h:265
AlbumArtImages::getImageCount
uint getImageCount()
Definition: musicmetadata.h:529
RepoType
RepoType
Definition: musicmetadata.h:59
MusicMetadata::setHostname
void setHostname(const QString &host)
Definition: musicmetadata.h:230
MusicMetadata::Description
QString Description(void)
Definition: musicmetadata.h:268
MusicMetadata::m_dateAdded
QDateTime m_dateAdded
Definition: musicmetadata.h:351
MusicMetadata::Playcount
int Playcount() const
Definition: musicmetadata.h:214
AllMusic::doneLoading
bool doneLoading() const
Definition: musicmetadata.h:443
MusicMetadata::m_lastPlay
QDateTime m_lastPlay
Definition: musicmetadata.h:349
MusicMetadata::MusicMetadata
MusicMetadata(const MusicMetadata &other)
Definition: musicmetadata.h:118
RT_Radio
@ RT_Radio
Definition: musicmetadata.h:62
AlbumArtScannerThread
Definition: musicmetadata.h:501
operator!=
bool operator!=(MusicMetadata &a, MusicMetadata &b)
Definition: musicmetadata.cpp:52
MusicMetadata::s_formatCompilationFileTrack
static QString s_formatCompilationFileTrack
Definition: musicmetadata.h:384
RT_CD
@ RT_CD
Definition: musicmetadata.h:61
MusicMetadata::m_tempLastPlay
QDateTime m_tempLastPlay
Definition: musicmetadata.h:350
MusicMetadata::Language
QString Language(void)
Definition: musicmetadata.h:283
MusicMetadata::setLanguage
void setLanguage(const QString &language)
Definition: musicmetadata.h:282
MusicMetadata::setGenre
void setGenre(const QString &lgenre)
Definition: musicmetadata.h:176
AllStream::getStreams
StreamList * getStreams(void)
Definition: musicmetadata.h:488
AllStream
Definition: musicmetadata.h:476
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:233
MusicMetadata::ArtistSort
QString ArtistSort() const
Definition: musicmetadata.h:127
AllMusic::getCDTitle
QString getCDTitle(void) const
Definition: musicmetadata.h:439
mythtypes.h
MusicMetadata::isDBTrack
bool isDBTrack(void) const
Definition: musicmetadata.h:222
MusicMetadata::m_channel
QString m_channel
Definition: musicmetadata.h:369
AllMusic::m_cdData
MetadataPtrList m_cdData
Definition: musicmetadata.h:461
MusicMetadata::setMetadataFormat
void setMetadataFormat(const QString &metaformat)
Definition: musicmetadata.h:276
filename
QString filename
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:637
MThread::RunEpilog
void RunEpilog(void)
Cleans up a thread's resources, call this if you reimplement run().
Definition: mthread.cpp:211
AllMusic::getCDTrackCount
int getCDTrackCount(void) const
Definition: musicmetadata.h:441
LyricsData
Definition: lyricsdata.h:47
uint
unsigned int uint
Definition: compat.h:141
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:329
MusicMetadata::s_formatCompilationCdTrack
static QString s_formatCompilationCdTrack
Definition: musicmetadata.h:386
StreamList
QList< MusicMetadata * > StreamList
Definition: musicmetadata.h:473
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::Q_DECLARE_TR_FUNCTIONS
Q_DECLARE_TR_FUNCTIONS(MusicMetadata)
MusicMetadata::isCDTrack
bool isCDTrack(void) const
Definition: musicmetadata.h:221
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:333
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:229
mythcorecontext.h
AlbumArtImages
Definition: musicmetadata.h:520
AlbumArtList
QList< AlbumArtImage * > AlbumArtList
Definition: musicmetadata.h:56
MusicMetadata::FileSize
uint64_t FileSize() const
Definition: musicmetadata.h:232
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:235
MusicMetadata::setDiscCount
void setDiscCount(int disccount)
Definition: musicmetadata.h:212
MusicMetadata::m_language
QString m_language
Definition: musicmetadata.h:375
MusicMetadata::m_metaFormat
QString m_metaFormat
Definition: musicmetadata.h:373
MusicMetadata::m_artist
QString m_artist
Definition: musicmetadata.h:325
MusicMetadata::Country
QString Country(void)
Definition: musicmetadata.h:280
AllMusic::MusicMap
QMap< int, MusicMetadata * > MusicMap
Definition: musicmetadata.h:457
MusicMetadata::setAlbumId
void setAlbumId(int lalbumid)
Definition: musicmetadata.h:190
MusicMetadata::LastPlay
QDateTime LastPlay() const
Definition: musicmetadata.h:243
AlbumArtImage
Definition: musicmetadata.h:40
MusicMetadata::Compilation
bool Compilation() const
Definition: musicmetadata.h:251
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:330
MusicMetadata::m_logoUrl
QString m_logoUrl
Definition: musicmetadata.h:372
MusicMetadata::m_broadcaster
QString m_broadcaster
Definition: musicmetadata.h:368
MThread
This is a wrapper around QThread that does several additional things.
Definition: mthread.h:49
UrlList
std::array< QString, STREAMURLCOUNT > UrlList
Definition: musicmetadata.h:78
mthread.h
MusicMetadata::PlayCount
int PlayCount() const
Definition: musicmetadata.h:247
MusicMetadata::s_formatNormalFileTrack
static QString s_formatNormalFileTrack
Definition: musicmetadata.h:379
MusicMetadata::m_genre
QString m_genre
Definition: musicmetadata.h:335
MusicMetadata::setPlaycount
void setPlaycount(int lplaycount)
Definition: musicmetadata.h:215
MusicMetadata::setTrackCount
void setTrackCount(int ltrackcount)
Definition: musicmetadata.h:203
AlbumArtScannerThread::getResult
QStringList getResult(void)
Definition: musicmetadata.h:513
IT_FRONTCOVER
@ IT_FRONTCOVER
Definition: musicmetadata.h:31
MusicMetadata::Broadcaster
QString Broadcaster(void)
Definition: musicmetadata.h:262
MetadataPtrList
QList< MusicMetadata * > MetadataPtrList
Definition: musicmetadata.h:395
MusicMetadata::setRepo
void setRepo(RepoType repo)
Definition: musicmetadata.h:219
MusicMetadata::setYear
void setYear(int lyear)
Definition: musicmetadata.h:197
AlbumArtImages::Q_DECLARE_TR_FUNCTIONS
Q_DECLARE_TR_FUNCTIONS(AlbumArtImages)
MusicMetadata::Rating
int Rating() const
Definition: musicmetadata.h:238
MusicMetadata::s_formatCompilationFileArtist
static QString s_formatCompilationFileArtist
Definition: musicmetadata.h:383
MusicMetadata::setID
void setID(IdType lid)
Definition: musicmetadata.h:218
MusicMetadata::m_compilationArtist
QString m_compilationArtist
Definition: musicmetadata.h:327
MusicMetadata::setCompilation
void setCompilation(bool state)
Definition: musicmetadata.h:252
MetadataLoadingThread::MetadataLoadingThread
MetadataLoadingThread(AllMusic *parent_ptr)
Definition: musicmetadata.h:406
MusicMetadata::setFormat
void setFormat(const QString &lformat)
Definition: musicmetadata.h:236
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:363
ID_TO_REPO
#define ID_TO_REPO(x)
Definition: musicmetadata.h:71
MusicMetadata::m_titleSort
QString m_titleSort
Definition: musicmetadata.h:332
AlbumArtScannerThread::m_strList
QStringList m_strList
Definition: musicmetadata.h:516
MusicMetadata::setCountry
void setCountry(const QString &country)
Definition: musicmetadata.h:279
METADATA_ID_MASK
#define METADATA_ID_MASK
Definition: musicmetadata.h:68
AllMusic::Q_DECLARE_TR_FUNCTIONS
Q_DECLARE_TR_FUNCTIONS(AllMusic)
META_PUBLIC
#define META_PUBLIC
Definition: mythmetaexp.h:9
MusicMetadata::m_filename
QString m_filename
Definition: musicmetadata.h:361
MusicMetadata::setCompilationArtistId
void setCompilationArtistId(int lartistid)
Definition: musicmetadata.h:187
MusicMetadata::Length
int Length() const
Definition: musicmetadata.h:205
ImageType
ImageType
Definition: musicmetadata.h:29
AlbumArtImages::m_imageList
AlbumArtList m_imageList
Definition: musicmetadata.h:547
MusicMetadata::s_formatNormalFileArtist
static QString s_formatNormalFileArtist
Definition: musicmetadata.h:378
MusicMetadata::Year
int Year() const
Definition: musicmetadata.h:196
MusicMetadata::DiscCount
int DiscCount() const
Definition: musicmetadata.h:211
MusicMetadata::m_country
QString m_country
Definition: musicmetadata.h:374
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:273
MusicMetadata::s_formatNormalCdArtist
static QString s_formatNormalCdArtist
Definition: musicmetadata.h:380
MusicMetadata::s_formatNormalCdTrack
static QString s_formatNormalCdTrack
Definition: musicmetadata.h:381
AlbumArtImage::m_filename
QString m_filename
Definition: musicmetadata.h:49
MusicMetadata::DiscNumber
int DiscNumber() const
Definition: musicmetadata.h:208