5 #include <QCoreApplication> 28 const QString VIDEO_COVERFILE_DEFAULT_OLD =
29 QCoreApplication::translate(
"(VideoUtils)",
"None",
"No cover");
30 const QString VIDEO_COVERFILE_DEFAULT_OLD2 =
31 QCoreApplication::translate(
"(VideoUtils)",
"No Cover");
34 void CopySecond(
const T &src, QStringList &
dest)
36 for (
typename T::const_iterator p = src.begin(); p != src.end(); ++p)
38 dest.push_back((*p).second);
59 MythUIText *tt = dynamic_cast<MythUIText *>(uit);
85 for (QStringList::iterator p = tmp2.begin(); p != tmp2.end(); ++p)
97 for (QStringList::iterator p = tmp3.begin(); p != tmp3.end(); ++p)
100 QString newpath = *p;
101 if (!newpath.endsWith(
"/"))
104 for (QStringList::iterator q = tmp2.begin(); q != tmp2.end(); ++q)
108 if (
comp.endsWith(newpath))
115 tmp.append(QDir::cleanPath(*p));
130 coverfile == VIDEO_COVERFILE_DEFAULT_OLD ||
131 coverfile == VIDEO_COVERFILE_DEFAULT_OLD2 ||
132 coverfile.endsWith(VIDEO_COVERFILE_DEFAULT_OLD) ||
133 coverfile.endsWith(VIDEO_COVERFILE_DEFAULT_OLD2);
153 return QString::number(userrating,
'f', 1);
160 return QCoreApplication::translate(
"(Common)",
"%n minute(s)",
"",
169 ret = QCoreApplication::translate(
"(Common)",
172 ret = QCoreApplication::translate(
"(Common)",
183 ret = QCoreApplication::translate(
"(Common)",
186 ret = QCoreApplication::translate(
"(Common)",
197 ret = QCoreApplication::translate(
"(VideoUtils)",
198 "Details Downloaded");
200 ret = QCoreApplication::translate(
"(VideoUtils)",
201 "Waiting for Detail Download");
214 return QCoreApplication::translate(
"(VideoUtils)",
"No rating available.");
222 return ret.join(
", ");
229 return ret.join(
", ");
235 CopySecond(item.
GetCast(), ret);
266 if (!trailerFile.isEmpty())
289 else if (
type ==
"TELEVISION")
291 else if (
type ==
"ADULT")
293 else if (
type ==
"MUSICVIDEO")
295 else if (
type ==
"HOMEVIDEO")
303 QString ret =
"UNKNOWN";
This widget is used for grouping other widgets for display when a particular named state is called.
QString GetDisplayRating(const QString &rating)
QString GetDisplayUserRating(float userrating)
QStringList GetVideoDirs()
bool IsDefaultScreenshot(const QString &screenshot)
const QString VIDEO_SCREENSHOT_DEFAULT
QString GetDisplayCountries(const VideoMetadata &item)
All purpose text widget, displays a text string.
bool IsDefaultFanart(const QString &fanart)
Image widget, displays a single image or multiple images in sequence.
QString GetDisplayGenres(const VideoMetadata &item)
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
bool IsDefaultCoverFile(const QString &coverfile)
QStringList GetDisplayCast(const VideoMetadata &item)
The base class on which all widgets and screens are based.
bool Load(bool allowLoadInBackground=true, bool forceStat=false)
Load the image(s), wraps ImageLoader::LoadImage()
void CheckedSet(MythUIStateType *uiItem, const QString &state)
static QStringList getGroupDirs(const QString &groupname, const QString &host)
QString TrailerToState(const QString &trailerFile)
def rating(profile, smoonURL, gate)
QString GetDisplayWatched(bool watched)
QString GetSetting(const QString &key, const QString &defaultval="")
void Reset(void) override
Reset the image back to the default defined in the theme.
QString GetDisplayYear(int year)
VideoContentType ContentTypeFromString(const QString &type)
QStringList GetVideoDirsByHost(QString host)
QString WatchedToState(bool watched)
QString GetDisplayLength(int length)
void SetFilename(const QString &filename)
Must be followed by a call to Load() to load the image.
QString ContentTypeToString(VideoContentType type)
const QString VIDEO_COVERFILE_DEFAULT
bool DisplayState(const QString &name)
void Reset(void) override
Reset the widget to it's original state, should not reset changes made by the theme.
QString GetDisplayProcessed(bool processed)
QString GetDisplayBrowse(bool browse)
const QString VIDEO_FANART_DEFAULT
static int comp(const void *va, const void *vb)
const QString DEFAULT_VIDEOSTARTUP_DIR
MythUIType * GetChild(const QString &name) const
Get a named child of this UIType.
const QString VIDEO_BANNER_DEFAULT
bool IsDefaultBanner(const QString &banner)
QString ParentalLevelToState(const ParentalLevel &level)