Go to the documentation of this file.
5 #include <QCoreApplication>
24 const QString VIDEO_COVERFILE_DEFAULT_OLD =
25 QCoreApplication::translate(
"(VideoUtils)",
"None",
"No cover");
26 const QString VIDEO_COVERFILE_DEFAULT_OLD2 =
27 QCoreApplication::translate(
"(VideoUtils)",
"No Cover");
30 void CopySecond(
const T &src, QStringList &
dest)
32 for (
auto p = src.cbegin();
p != src.cend(); ++
p)
34 dest.push_back((*p).second);
81 for (
const auto& dir : qAsConst(tmp2))
87 QString seperator =
";";
89 QString seperator =
":";
91 #if QT_VERSION < QT_VERSION_CHECK(5,14,0)
98 for (
const auto& dir : qAsConst(tmp3))
100 bool matches =
false;
101 QString newpath = dir;
102 if (!newpath.endsWith(
"/"))
105 for (
const auto& comp : qAsConst(tmp2))
107 if (comp.endsWith(newpath))
114 tmp.append(QDir::cleanPath(dir));
129 coverfile == VIDEO_COVERFILE_DEFAULT_OLD ||
130 coverfile == VIDEO_COVERFILE_DEFAULT_OLD2 ||
131 coverfile.endsWith(VIDEO_COVERFILE_DEFAULT_OLD) ||
132 coverfile.endsWith(VIDEO_COVERFILE_DEFAULT_OLD2);
152 return QString::number(userrating,
'f', 1);
159 return QCoreApplication::translate(
"(Common)",
"%n minute(s)",
"",
168 ret = QCoreApplication::translate(
"(Common)",
"Yes");
170 ret = QCoreApplication::translate(
"(Common)",
"No");
180 ret = QCoreApplication::translate(
"(Common)",
"Yes");
182 ret = QCoreApplication::translate(
"(Common)",
"No");
193 ret = QCoreApplication::translate(
"(VideoUtils)",
194 "Details Downloaded");
198 ret = QCoreApplication::translate(
"(VideoUtils)",
199 "Waiting for Detail Download");
213 return QCoreApplication::translate(
"(VideoUtils)",
"No rating available.");
221 return ret.join(
", ");
228 return ret.join(
", ");
234 CopySecond(item.
GetCast(), ret);
265 if (!trailerFile.isEmpty())
288 else if (
type ==
"TELEVISION")
290 else if (
type ==
"ADULT")
292 else if (
type ==
"MUSICVIDEO")
294 else if (
type ==
"HOMEVIDEO")
302 QString ret =
"UNKNOWN";
QString WatchedToState(bool watched)
Image widget, displays a single image or multiple images in sequence.
MythUIType * GetChild(const QString &name) const
Get a named child of this UIType.
bool Load(bool allowLoadInBackground=true, bool forceStat=false)
Load the image(s), wraps ImageLoader::LoadImage()
QString GetDisplayLength(std::chrono::minutes length)
QString GetDisplayProcessed(bool processed)
VideoContentType ContentTypeFromString(const QString &type)
QString ContentTypeToString(VideoContentType type)
void CheckedSet(MythUIStateType *uiItem, const QString &value)
void Reset(void) override
Reset the widget to it's original state, should not reset changes made by the theme.
void Reset(void) override
Reset the image back to the default defined in the theme.
QString GetDisplayRating(const QString &rating)
QString GetDisplayUserRating(float userrating)
QStringList GetVideoDirs()
QString GetDisplayCountries(const VideoMetadata &item)
def rating(profile, smoonURL, gate)
const QString VIDEO_COVERFILE_DEFAULT
static QStringList getGroupDirs(const QString &groupname, const QString &host)
QString GetDisplayBrowse(bool browse)
bool IsDefaultBanner(const QString &banner)
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
bool IsDefaultFanart(const QString &fanart)
const QString DEFAULT_VIDEOSTARTUP_DIR
const QString VIDEO_FANART_DEFAULT
QString ParentalLevelToState(const ParentalLevel &level)
bool IsDefaultCoverFile(const QString &coverfile)
The base class on which all widgets and screens are based.
bool IsDefaultScreenshot(const QString &screenshot)
All purpose text widget, displays a text string.
QStringList GetVideoDirsByHost(const QString &host)
QString GetDisplayGenres(const VideoMetadata &item)
QString TrailerToState(const QString &trailerFile)
const QString VIDEO_BANNER_DEFAULT
void SetFilename(const QString &filename)
Must be followed by a call to Load() to load the image.
QString GetDisplayWatched(bool watched)
QStringList GetDisplayCast(const VideoMetadata &item)
This widget is used for grouping other widgets for display when a particular named state is called....
bool DisplayState(const QString &name)
const QString VIDEO_SCREENSHOT_DEFAULT
QString GetDisplayYear(int year)
QString GetSetting(const QString &key, const QString &defaultval="")