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 findIcon(const QString &type, const QString &name, bool ignoreCache = false);
23 
26 
28 META_PUBLIC bool isNewTune(const QString &artist, const QString &album, const QString &title);
META_PUBLIC QString filenameFromMetadata(MusicMetadata *track)
create a filename using the template in the settings and a MusicMetadata object
Definition: musicutils.cpp:77
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
#define META_PUBLIC
Definition: mythmetaexp.h:9
const char * name
Definition: ParseText.cpp:328
META_PUBLIC QString fixFilename(const QString &filename)
remove any bad filename characters
Definition: musicutils.cpp:26
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
Definition: musicutils.cpp:139