musicutils.cpp File Reference

Go to the source code of this file.

Functions

QString fixFilename (const QString &filename)
 remove any bad filename characters
QString findIcon (const QString &type, const QString &name)
 find an image for a artist or genre
uint calcTrackLength (const QString &musicFile)
 calculate a tracks length by parsing the frames
QString fixFileToken_sl (QString token)
QString filenameFromMetadata (Metadata *track, bool createDir)
 create a filename using the template in the settings and a Metadata object
bool isNewTune (const QString &artist, const QString &album, const QString &title)
 try to find a track in the db using the given artist, album and title

Variables

static QRegExp badChars = QRegExp("(/|\\\\|:|\'|\"|\\?|\\|)")

Function Documentation

QString fixFilename ( const QString &  filename  ) 

remove any bad filename characters

Definition at line 25 of file musicutils.cpp.

QString findIcon ( const QString &  type,
const QString &  name 
)

find an image for a artist or genre

Definition at line 32 of file musicutils.cpp.

Referenced by AlbumArtImages::findImages(), EditMetadataDialog::updateArtistImage(), and EditMetadataDialog::updateGenreImage().

uint calcTrackLength ( const QString &  musicFile  ) 

calculate a tracks length by parsing the frames

Definition at line 53 of file musicutils.cpp.

QString fixFileToken_sl ( QString  token  )  [inline]

Definition at line 134 of file musicutils.cpp.

Referenced by filenameFromMetadata().

QString filenameFromMetadata ( Metadata track,
bool  createDir 
)

create a filename using the template in the settings and a Metadata object

Definition at line 142 of file musicutils.cpp.

Referenced by ImportMusicDialog::addPressed(), CDRipperThread::run(), and ImportCoverArtDialog::updateStatus().

bool isNewTune ( const QString &  artist,
const QString &  album,
const QString &  title 
)

Variable Documentation

QRegExp badChars = QRegExp("(/|\\\\|:|\'|\"|\\?|\\|)") [static]

Definition at line 23 of file musicutils.cpp.

Referenced by fixFilename().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends
Generated on Sun May 27 06:41:46 2012 for MythTV by  doxygen 1.6.3