5#include <QCoreApplication>
25 QCoreApplication::translate(
"(VideoUtils)",
"None",
"No cover");
27 QCoreApplication::translate(
"(VideoUtils)",
"No Cover");
32 for (
auto p = src.cbegin();
p != src.cend(); ++
p)
34 dest.push_back((*p).second);
81 for (
const auto& dir : std::as_const(tmp2))
87 QString seperator =
";";
89 QString seperator =
":";
93 for (
const auto& dir : std::as_const(tmp3))
96 QString newpath = dir;
97 if (!newpath.endsWith(
"/"))
100 for (
const auto& comp : std::as_const(tmp2))
102 if (comp.endsWith(newpath))
109 tmp.append(QDir::cleanPath(dir));
147 return QString::number(userrating,
'f', 1);
154 return QCoreApplication::translate(
"(Common)",
"%n minute(s)",
"",
163 ret = QCoreApplication::translate(
"(Common)",
"Yes");
165 ret = QCoreApplication::translate(
"(Common)",
"No");
175 ret = QCoreApplication::translate(
"(Common)",
"Yes");
177 ret = QCoreApplication::translate(
"(Common)",
"No");
188 ret = QCoreApplication::translate(
"(VideoUtils)",
189 "Details Downloaded");
193 ret = QCoreApplication::translate(
"(VideoUtils)",
194 "Waiting for Detail Download");
208 return QCoreApplication::translate(
"(VideoUtils)",
"No rating available.");
216 return ret.join(
", ");
223 return ret.join(
", ");
260 if (!trailerFile.isEmpty())
283 else if (
type ==
"TELEVISION")
285 else if (
type ==
"ADULT")
287 else if (
type ==
"MUSICVIDEO")
289 else if (
type ==
"HOMEVIDEO")
297 QString ret =
"UNKNOWN";
QString GetSetting(const QString &key, const QString &defaultval="")
Image widget, displays a single image or multiple images in sequence.
bool Load(bool allowLoadInBackground=true, bool forceStat=false)
Load the image(s), wraps ImageLoader::LoadImage()
void SetFilename(const QString &filename)
Must be followed by a call to Load() to load the image.
void Reset(void) override
Reset the image back to the default defined in the theme.
This widget is used for grouping other widgets for display when a particular named state is called.
void Reset(void) override
Reset the widget to it's original state, should not reset changes made by the theme.
bool DisplayState(const QString &name)
All purpose text widget, displays a text string.
The base class on which all widgets and screens are based.
MythUIType * GetChild(const QString &name) const
Get a named child of this UIType.
static QStringList getGroupDirs(const QString &groupname, const QString &host)
const QString VIDEO_BANNER_DEFAULT
const QString VIDEO_SCREENSHOT_DEFAULT
const QString VIDEO_FANART_DEFAULT
const QString DEFAULT_VIDEOSTARTUP_DIR
const QString VIDEO_COVERFILE_DEFAULT
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
const QString VIDEO_COVERFILE_DEFAULT_OLD
const QString VIDEO_COVERFILE_DEFAULT_OLD2
void CopySecond(const T &src, QStringList &dest)
def rating(profile, smoonURL, gate)
bool IsDefaultScreenshot(const QString &screenshot)
QString ParentalLevelToState(const ParentalLevel &level)
bool IsDefaultFanart(const QString &fanart)
QString GetDisplayUserRating(float userrating)
QString WatchedToState(bool watched)
QStringList GetVideoDirsByHost(const QString &host)
QString GetDisplayProcessed(bool processed)
QString TrailerToState(const QString &trailerFile)
QString GetDisplayRating(const QString &rating)
QString GetDisplayWatched(bool watched)
VideoContentType ContentTypeFromString(const QString &type)
QString ContentTypeToString(VideoContentType type)
void CheckedSet(MythUIStateType *uiItem, const QString &value)
bool IsDefaultCoverFile(const QString &coverfile)
QString GetDisplayCountries(const VideoMetadata &item)
QStringList GetDisplayCast(const VideoMetadata &item)
QString GetDisplayLength(std::chrono::minutes length)
QString GetDisplayYear(int year)
QString GetDisplayGenres(const VideoMetadata &item)
bool IsDefaultBanner(const QString &banner)
QString GetDisplayBrowse(bool browse)
QStringList GetVideoDirs()