MythTV  master
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
AllMusic Class Reference

#include <musicmetadata.h>

Collaboration diagram for AllMusic:
Collaboration graph
[legend]

Public Member Functions

 AllMusic (void)
 
 ~AllMusic ()
 
MusicMetadatagetMetadata (int an_id)
 
bool updateMetadata (int an_id, MusicMetadata *the_track)
 
int count () const
 
int countLoaded () const
 
void save ()
 Check each MusicMetadata entry and save those that have changed (ratings, etc.) More...
 
bool startLoading (void)
 Start loading metadata. More...
 
void resync ()
 resync our cache with the database More...
 
void clearCDData (void)
 
void addCDTrack (const MusicMetadata &the_track)
 
bool checkCDTrack (MusicMetadata *the_track)
 
MusicMetadatagetCDMetadata (int m_the_track)
 
QString getCDTitle (void) const
 
void setCDTitle (const QString &a_title)
 
int getCDTrackCount (void) const
 
bool doneLoading () const
 
bool cleanOutThreads ()
 
MetadataPtrListgetAllMetadata (void)
 
MetadataPtrListgetAllCDMetadata (void)
 
bool isValidID (int an_id)
 

Private Types

using MusicMap = QMap< int, MusicMetadata * >
 

Private Member Functions

 Q_DECLARE_TR_FUNCTIONS (AllMusic)
 

Private Attributes

MetadataPtrList m_allMusic
 
int m_numPcs {0}
 
int m_numLoaded {0}
 
MusicMap m_musicMap
 
MetadataPtrList m_cdData
 
QString m_cdTitle
 
MetadataLoadingThreadm_metadataLoader {nullptr}
 
bool m_doneLoading {false}
 
int m_playCountMin {0}
 
int m_playCountMax {0}
 
qint64 m_lastPlayMin {0}
 
qint64 m_lastPlayMax {0}
 

Detailed Description

Definition at line 409 of file musicmetadata.h.

Member Typedef Documentation

◆ MusicMap

using AllMusic::MusicMap = QMap<int, MusicMetadata*>
private

Definition at line 449 of file musicmetadata.h.

Constructor & Destructor Documentation

◆ AllMusic()

AllMusic::AllMusic ( void  )

Definition at line 1405 of file musicmetadata.cpp.

◆ ~AllMusic()

AllMusic::~AllMusic ( )

Definition at line 1411 of file musicmetadata.cpp.

Member Function Documentation

◆ Q_DECLARE_TR_FUNCTIONS()

AllMusic::Q_DECLARE_TR_FUNCTIONS ( AllMusic  )
private

◆ getMetadata()

MusicMetadata * AllMusic::getMetadata ( int  an_id)

◆ updateMetadata()

bool AllMusic::updateMetadata ( int  an_id,
MusicMetadata the_track 
)

Definition at line 1647 of file musicmetadata.cpp.

◆ count()

int AllMusic::count ( ) const
inline

Definition at line 420 of file musicmetadata.h.

◆ countLoaded()

int AllMusic::countLoaded ( ) const
inline

Definition at line 421 of file musicmetadata.h.

◆ save()

void AllMusic::save ( void  )

Check each MusicMetadata entry and save those that have changed (ratings, etc.)

Definition at line 1662 of file musicmetadata.cpp.

Referenced by mythplugin_destroy().

◆ startLoading()

bool AllMusic::startLoading ( void  )

Start loading metadata.

Makes the AllMusic object run it's resync in a thread. Once done, the doneLoading() method will return true.

Note
Alternatively, this could be made to emit a signal so the caller won't have to poll for completion.
Returns
true if the loader thread was started

Definition at line 1455 of file musicmetadata.cpp.

Referenced by MusicData::reloadMusic().

◆ resync()

void AllMusic::resync ( )

resync our cache with the database

Definition at line 1474 of file musicmetadata.cpp.

◆ clearCDData()

void AllMusic::clearCDData ( void  )

Definition at line 1672 of file musicmetadata.cpp.

Referenced by handleMedia().

◆ addCDTrack()

void AllMusic::addCDTrack ( const MusicMetadata the_track)

Definition at line 1687 of file musicmetadata.cpp.

Referenced by handleMedia().

◆ checkCDTrack()

bool AllMusic::checkCDTrack ( MusicMetadata the_track)

Definition at line 1696 of file musicmetadata.cpp.

◆ getCDMetadata()

MusicMetadata * AllMusic::getCDMetadata ( int  m_the_track)

Definition at line 1704 of file musicmetadata.cpp.

Referenced by MusicCommon::fromCD(), and handleMedia().

◆ getCDTitle()

QString AllMusic::getCDTitle ( void  ) const
inline

Definition at line 431 of file musicmetadata.h.

Referenced by PlaylistEditorView::createRootNode().

◆ setCDTitle()

void AllMusic::setCDTitle ( const QString &  a_title)
inline

Definition at line 432 of file musicmetadata.h.

◆ getCDTrackCount()

int AllMusic::getCDTrackCount ( void  ) const
inline

◆ doneLoading()

bool AllMusic::doneLoading ( ) const
inline

◆ cleanOutThreads()

bool AllMusic::cleanOutThreads ( )

Definition at line 1429 of file musicmetadata.cpp.

Referenced by mythplugin_destroy().

◆ getAllMetadata()

MetadataPtrList* AllMusic::getAllMetadata ( void  )
inline

◆ getAllCDMetadata()

MetadataPtrList* AllMusic::getAllCDMetadata ( void  )
inline

◆ isValidID()

bool AllMusic::isValidID ( int  an_id)

Definition at line 1642 of file musicmetadata.cpp.

Referenced by Playlist::fillSongsFromSonglist().

Member Data Documentation

◆ m_allMusic

MetadataPtrList AllMusic::m_allMusic
private

Definition at line 444 of file musicmetadata.h.

◆ m_numPcs

int AllMusic::m_numPcs {0}
private

Definition at line 446 of file musicmetadata.h.

◆ m_numLoaded

int AllMusic::m_numLoaded {0}
private

Definition at line 447 of file musicmetadata.h.

◆ m_musicMap

MusicMap AllMusic::m_musicMap
private

Definition at line 450 of file musicmetadata.h.

◆ m_cdData

MetadataPtrList AllMusic::m_cdData
private

Definition at line 453 of file musicmetadata.h.

◆ m_cdTitle

QString AllMusic::m_cdTitle
private

Definition at line 454 of file musicmetadata.h.

◆ m_metadataLoader

MetadataLoadingThread* AllMusic::m_metadataLoader {nullptr}
private

Definition at line 456 of file musicmetadata.h.

◆ m_doneLoading

bool AllMusic::m_doneLoading {false}
private

Definition at line 457 of file musicmetadata.h.

◆ m_playCountMin

int AllMusic::m_playCountMin {0}
private

Definition at line 459 of file musicmetadata.h.

◆ m_playCountMax

int AllMusic::m_playCountMax {0}
private

Definition at line 460 of file musicmetadata.h.

◆ m_lastPlayMin

qint64 AllMusic::m_lastPlayMin {0}
private

Definition at line 465 of file musicmetadata.h.

◆ m_lastPlayMax

qint64 AllMusic::m_lastPlayMax {0}
private

Definition at line 466 of file musicmetadata.h.


The documentation for this class was generated from the following files: