MythTV  master
musicutils.h
Go to the documentation of this file.
1 // qt
2 #include <QString>
3 
4 // mythtv
5 #include "mythmetaexp.h"
6 
7 class MusicMetadata;
8 
9 // These are needed to handle taglib < 1.10 which has obsolete Qt utf8
10 // calls. Once all supported releases have taglib 1.10 these can be
11 // deleted. (They're copied from taglib 1.10.) Currently centos7,
12 // debian jessie, and Ubuntu 16.06 still have taglib 1.8 or 1.9.
13 #undef QStringToTString
14 #define QStringToTString(s) TagLib::String((s).toUtf8().data(), TagLib::String::UTF8)
15 #undef TStringToQString
16 #define TStringToQString(s) QString::fromUtf8((s).toCString(true))
17 
19 META_PUBLIC QString fixFilename(const QString &filename);
20 
22 META_PUBLIC QString fixFileToken_sl (QString token);
23 
25 META_PUBLIC QString findIcon(const QString &type, const QString &name, bool ignoreCache = false);
26 
29 
31 META_PUBLIC bool isNewTune(const QString &artist, const QString &album, const QString &title);
fixFilename
META_PUBLIC QString fixFilename(const QString &filename)
remove any bad filename characters
Definition: musicutils.cpp:27
MusicMetadata
Definition: musicmetadata.h:80
mythmetaexp.h
isNewTune
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
filenameFromMetadata
META_PUBLIC QString filenameFromMetadata(MusicMetadata *track)
create a filename using the template in the settings and a MusicMetadata object
fixFileToken_sl
META_PUBLIC QString fixFileToken_sl(QString token)
remove any bad filename characters (leaving '/' untouched)
Definition: musicutils.cpp:69
build_compdb.filename
filename
Definition: build_compdb.py:21
META_PUBLIC
#define META_PUBLIC
Definition: mythmetaexp.h:9
findIcon
META_PUBLIC QString findIcon(const QString &type, const QString &name, bool ignoreCache=false)
find an image for a artist or genre
Definition: musicutils.cpp:34