MythTV  master
Functions | Variables
musicutils.cpp File Reference
#include <iostream>
#include <QFile>
#include <QRegularExpression>
#include <QDir>
#include <mythdirs.h>
#include <mythlogging.h>
#include <mythcorecontext.h>
#include <remotefile.h>
#include <libavformat/avformat.h>
#include <libavcodec/avcodec.h>
#include "musicmetadata.h"
#include "musicutils.h"
Include dependency graph for musicutils.cpp:

Go to the source code of this file.

Functions

QString fixFilename (const QString &filename)
 remove any bad filename characters More...
 
QString findIcon (const QString &type, const QString &name, bool ignoreCache)
 find an image for a artist or genre More...
 
QString fixFileToken_sl (QString token)
 remove any bad filename characters (leaving '/' untouched) More...
 

Variables

const static QRegularExpression badChars1 { R"((/|\\|:|'|"|\?|\|))" }
 
const static QRegularExpression badChars2 { R"((/|\\|:|'|\,|\!|\(|\)|"|\?|\|))" }
 
static QMap< QString, QString > iconMap
 

Function Documentation

◆ fixFilename()

QString fixFilename ( const QString &  filename)

remove any bad filename characters

Definition at line 27 of file musicutils.cpp.

Referenced by findIcon().

◆ findIcon()

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

◆ fixFileToken_sl()

QString fixFileToken_sl ( QString  token)

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

Definition at line 69 of file musicutils.cpp.

Variable Documentation

◆ badChars1

const static QRegularExpression badChars1 { R"((/|\\|:|'|"|\?|\|))" }
static

Definition at line 24 of file musicutils.cpp.

Referenced by fixFilename().

◆ badChars2

const static QRegularExpression badChars2 { R"((/|\\|:|'|\,|\!|\(|\)|"|\?|\|))" }
static

Definition at line 25 of file musicutils.cpp.

◆ iconMap

QMap<QString, QString> iconMap
static

Definition at line 33 of file musicutils.cpp.

Referenced by findIcon(), and PlaybackBox::updateIcons().