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

typedef QMap< int, MusicMetadata * > MusicMap
 

Private Member Functions

 Q_DECLARE_TR_FUNCTIONS (AllMusic)
 

Private Attributes

MetadataPtrList m_all_music
 
int m_numPcs {0}
 
int m_numLoaded {0}
 
MusicMap m_music_map
 
MetadataPtrList m_cdData
 
QString m_cdTitle
 
MetadataLoadingThreadm_metadata_loader {nullptr}
 
bool m_done_loading {false}
 
int m_playcountMin {0}
 
int m_playcountMax {0}
 
qint64 m_lastplayMin {0}
 
qint64 m_lastplayMax {0}
 

Detailed Description

Definition at line 408 of file musicmetadata.h.

Member Typedef Documentation

◆ MusicMap

typedef QMap<int, MusicMetadata*> AllMusic::MusicMap
private

Definition at line 448 of file musicmetadata.h.

Constructor & Destructor Documentation

◆ AllMusic()

AllMusic::AllMusic ( void  )

Definition at line 1392 of file musicmetadata.cpp.

◆ ~AllMusic()

AllMusic::~AllMusic ( )

Definition at line 1398 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 1629 of file musicmetadata.cpp.

◆ count()

int AllMusic::count ( ) const
inline

Definition at line 419 of file musicmetadata.h.

◆ countLoaded()

int AllMusic::countLoaded ( ) const
inline

Definition at line 420 of file musicmetadata.h.

◆ save()

void AllMusic::save ( void  )

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

Definition at line 1644 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 1442 of file musicmetadata.cpp.

Referenced by MusicData::reloadMusic().

◆ resync()

void AllMusic::resync ( )

resync our cache with the database

Definition at line 1461 of file musicmetadata.cpp.

◆ clearCDData()

void AllMusic::clearCDData ( void  )

Definition at line 1655 of file musicmetadata.cpp.

Referenced by handleMedia().

◆ addCDTrack()

void AllMusic::addCDTrack ( const MusicMetadata the_track)

Definition at line 1670 of file musicmetadata.cpp.

Referenced by handleMedia().

◆ checkCDTrack()

bool AllMusic::checkCDTrack ( MusicMetadata the_track)

Definition at line 1679 of file musicmetadata.cpp.

◆ getCDMetadata()

MusicMetadata * AllMusic::getCDMetadata ( int  m_the_track)

Definition at line 1687 of file musicmetadata.cpp.

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

◆ getCDTitle()

QString AllMusic::getCDTitle ( void  ) const
inline

Definition at line 430 of file musicmetadata.h.

Referenced by PlaylistEditorView::createRootNode().

◆ setCDTitle()

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

Definition at line 431 of file musicmetadata.h.

◆ getCDTrackCount()

int AllMusic::getCDTrackCount ( void  ) const
inline

◆ doneLoading()

bool AllMusic::doneLoading ( ) const
inline

◆ cleanOutThreads()

bool AllMusic::cleanOutThreads ( )

Definition at line 1416 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 1624 of file musicmetadata.cpp.

Referenced by Playlist::fillSongsFromSonglist().

Member Data Documentation

◆ m_all_music

MetadataPtrList AllMusic::m_all_music
private

Definition at line 443 of file musicmetadata.h.

◆ m_numPcs

int AllMusic::m_numPcs {0}
private

Definition at line 445 of file musicmetadata.h.

◆ m_numLoaded

int AllMusic::m_numLoaded {0}
private

Definition at line 446 of file musicmetadata.h.

◆ m_music_map

MusicMap AllMusic::m_music_map
private

Definition at line 449 of file musicmetadata.h.

◆ m_cdData

MetadataPtrList AllMusic::m_cdData
private

Definition at line 452 of file musicmetadata.h.

◆ m_cdTitle

QString AllMusic::m_cdTitle
private

Definition at line 453 of file musicmetadata.h.

◆ m_metadata_loader

MetadataLoadingThread* AllMusic::m_metadata_loader {nullptr}
private

Definition at line 455 of file musicmetadata.h.

◆ m_done_loading

bool AllMusic::m_done_loading {false}
private

Definition at line 456 of file musicmetadata.h.

◆ m_playcountMin

int AllMusic::m_playcountMin {0}
private

Definition at line 458 of file musicmetadata.h.

◆ m_playcountMax

int AllMusic::m_playcountMax {0}
private

Definition at line 459 of file musicmetadata.h.

◆ m_lastplayMin

qint64 AllMusic::m_lastplayMin {0}
private

Definition at line 464 of file musicmetadata.h.

◆ m_lastplayMax

qint64 AllMusic::m_lastplayMax {0}
private

Definition at line 465 of file musicmetadata.h.


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