MythTV  master
Macros | Functions
musicutils.h File Reference
#include <QString>
#include "mythmetaexp.h"
Include dependency graph for musicutils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


#define QStringToTString(s)   TagLib::String((s).toUtf8().data(), TagLib::String::UTF8)
#define TStringToQString(s)   QString::fromUtf8((s).toCString(true))


META_PUBLIC QString fixFilename (const QString &filename)
 remove any bad filename characters More...
META_PUBLIC QString fixFileToken_sl (QString token)
 remove any bad filename characters (leaving '/' untouched) More...
META_PUBLIC QString findIcon (const QString &type, const QString &name, bool ignoreCache=false)
 find an image for a artist or genre More...
META_PUBLIC QString filenameFromMetadata (MusicMetadata *track)
 create a filename using the template in the settings and a MusicMetadata object More...
META_PUBLIC 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 More...

Macro Definition Documentation

◆ QStringToTString

#define QStringToTString (   s)    TagLib::String((s).toUtf8().data(), TagLib::String::UTF8)

Definition at line 14 of file musicutils.h.

◆ TStringToQString

#define TStringToQString (   s)    QString::fromUtf8((s).toCString(true))

Definition at line 16 of file musicutils.h.

Function Documentation

◆ fixFilename()

META_PUBLIC QString fixFilename ( const QString &  filename)

remove any bad filename characters

Definition at line 27 of file musicutils.cpp.

Referenced by findIcon().

◆ fixFileToken_sl()

META_PUBLIC QString fixFileToken_sl ( QString  token)

remove any bad filename characters (leaving '/' untouched)

Definition at line 69 of file musicutils.cpp.

◆ findIcon()

META_PUBLIC QString findIcon ( const QString &  type,
const QString &  name,
bool  ignoreCache = false 

◆ filenameFromMetadata()

META_PUBLIC QString filenameFromMetadata ( MusicMetadata track)

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

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

◆ isNewTune()

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