MythTV master
videofilter.cpp
Go to the documentation of this file.
1// C++
2#include <set>
3
4// MythTV
17
18// MythFrontend
19#include "videofilter.h"
20#include "videolist.h"
21
22const QRegularExpression VideoFilterSettings::kReSeason {
23 "(\\d+)x(\\d*)", QRegularExpression::CaseInsensitiveOption };
24const QRegularExpression VideoFilterSettings::kReDate {
25 "-(\\d+)([dwmy])", QRegularExpression::CaseInsensitiveOption };
26
28 const QString& _prefix)
29{
30 if (_prefix.isEmpty())
31 m_prefix = "VideoDefault";
32 else
33 m_prefix = _prefix + "Default";
34
35 // do nothing yet
36 if (loaddefaultsettings)
37 {
38 m_category = gCoreContext->GetNumSetting(QString("%1Category").arg(m_prefix),
40 m_genre = gCoreContext->GetNumSetting(QString("%1Genre").arg(m_prefix),
42 m_country = gCoreContext->GetNumSetting(QString("%1Country").arg(m_prefix),
44 m_cast = gCoreContext->GetNumSetting(QString("%1Cast").arg(m_prefix),
46 m_year = gCoreContext->GetNumSetting(QString("%1Year").arg(m_prefix),
48 m_runtime = gCoreContext->GetNumSetting(QString("%1Runtime").arg(m_prefix),
51 gCoreContext->GetNumSetting(QString("%1Userrating").arg(m_prefix),
53 m_browse = gCoreContext->GetNumSetting(QString("%1Browse").arg(m_prefix),
55 m_watched = gCoreContext->GetNumSetting(QString("%1Watched").arg(m_prefix),
57 m_inetRef = gCoreContext->GetNumSetting(QString("%1InetRef").arg(m_prefix),
59 m_coverFile = gCoreContext->GetNumSetting(QString("%1CoverFile")
61 m_orderBy = (ordering)gCoreContext->GetNumSetting(QString("%1Orderby")
62 .arg(m_prefix),
64 }
65}
66
68{
69 *this = rhs;
70}
71
74{
75 if (this == &rhs)
76 return *this;
77
78 m_prefix = rhs.m_prefix;
79
80 if (m_category != rhs.m_category)
81 {
84 }
85
86 if (m_genre != rhs.m_genre)
87 {
89 m_genre = rhs.m_genre;
90 }
91
92 if (m_country != rhs.m_country)
93 {
95 m_country = rhs.m_country;
96 }
97
98 if (m_cast != rhs.m_cast)
99 {
101 m_cast = rhs.m_cast;
102 }
103
104 if (m_year != rhs.m_year)
105 {
107 m_year = rhs.m_year;
108 }
109
110 if (m_runtime != rhs.m_runtime)
111 {
113 m_runtime = rhs.m_runtime;
114 }
115
116 if (m_userRating != rhs.m_userRating)
117 {
120 }
121
122 if (m_browse != rhs.m_browse)
123 {
125 m_browse = rhs.m_browse;
126 }
127
128 if (m_watched != rhs.m_watched)
129 {
131 m_watched = rhs.m_watched;
132 }
133
134 if (m_inetRef != rhs.m_inetRef)
135 {
137 m_inetRef = rhs.m_inetRef;
138 }
139
140 if (m_coverFile != rhs.m_coverFile)
141 {
144 }
145
146 if (m_orderBy != rhs.m_orderBy)
147 {
149 m_orderBy = rhs.m_orderBy;
150 }
151
153 {
156 }
157
158 if (m_textFilter != rhs.m_textFilter)
159 {
162 }
163 if (m_season != rhs.m_season || m_episode != rhs.m_episode)
164 {
165 m_season = rhs.m_season;
166 m_episode = rhs.m_episode;
168 }
169 if (m_insertDate != rhs.m_insertDate)
170 {
173 }
174
175 return *this;
176}
177
179{
180 gCoreContext->SaveSetting(QString("%1Category").arg(m_prefix), m_category);
181 gCoreContext->SaveSetting(QString("%1Genre").arg(m_prefix), m_genre);
182 gCoreContext->SaveSetting(QString("%1Cast").arg(m_prefix), m_cast);
183 gCoreContext->SaveSetting(QString("%1Country").arg(m_prefix), m_country);
184 gCoreContext->SaveSetting(QString("%1Year").arg(m_prefix), m_year);
185 gCoreContext->SaveSetting(QString("%1Runtime").arg(m_prefix), m_runtime);
186 gCoreContext->SaveSetting(QString("%1Userrating").arg(m_prefix), m_userRating);
187 gCoreContext->SaveSetting(QString("%1Browse").arg(m_prefix), m_browse);
188 gCoreContext->SaveSetting(QString("%1Watched").arg(m_prefix), m_watched);
189 gCoreContext->SaveSetting(QString("%1InetRef").arg(m_prefix), m_inetRef);
190 gCoreContext->SaveSetting(QString("%1CoverFile").arg(m_prefix), m_coverFile);
191 gCoreContext->SaveSetting(QString("%1Orderby").arg(m_prefix), m_orderBy);
192 gCoreContext->SaveSetting(QString("%1Filter").arg(m_prefix), m_textFilter);
193}
194
196{
197 bool matches = true;
198
199 //textfilter
200 if (!m_textFilter.isEmpty())
201 {
202 matches = false;
203 matches = (matches ||
204 mdata.GetTitle().contains(m_textFilter, Qt::CaseInsensitive));
205 matches = (matches ||
206 mdata.GetSubtitle().contains(m_textFilter, Qt::CaseInsensitive));
207 matches = (matches ||
208 mdata.GetPlot().contains(m_textFilter, Qt::CaseInsensitive));
209 }
210 //search for season with optionally episode nr.
211 if (matches && (m_season != -1))
212 {
213 matches = (m_season == mdata.GetSeason());
214 matches = (matches && (m_episode == -1 || m_episode == mdata.GetEpisode()));
215 }
216 if (matches && m_insertDate.isValid())
217 {
218 matches = (mdata.GetInsertdate().isValid() &&
219 mdata.GetInsertdate() >= m_insertDate);
220 }
221 if (matches && (m_genre != kGenreFilterAll))
222 {
223 const VideoMetadata::genre_list &gl = mdata.GetGenres();
224 auto samegenre = [this](const auto & g) {return g.first == m_genre; };
225 matches = std::any_of(gl.cbegin(), gl.cend(), samegenre);
226 }
227
228 if (matches && m_country != kCountryFilterAll)
229 {
230 const VideoMetadata::country_list &cl = mdata.GetCountries();
231 auto samecountry = [this](const auto & c) {return c.first == m_country; };
232 matches = std::any_of(cl.cbegin(), cl.cend(), samecountry);
233 }
234
235 if (matches && m_cast != kCastFilterAll)
236 {
237 const VideoMetadata::cast_list &cl = mdata.GetCast();
238
239 if ((m_cast == kCastFilterUnknown) && (cl.empty()))
240 {
241 matches = true;
242 }
243 else
244 {
245 auto samecast = [this](const auto & c){return c.first == m_cast; };
246 matches = std::any_of(cl.cbegin(), cl.cend(), samecast);
247 }
248 }
249
250 if (matches && m_category != kCategoryFilterAll)
251 {
252 matches = (m_category == mdata.GetCategoryID());
253 }
254
255 if (matches && m_year != kYearFilterAll)
256 {
258 {
259 matches = ((mdata.GetYear() == 0) ||
260 (mdata.GetYear() == VIDEO_YEAR_DEFAULT));
261 }
262 else
263 {
264 matches = (m_year == mdata.GetYear());
265 }
266 }
267
268 if (matches && m_runtime != kRuntimeFilterAll)
269 {
271 {
272 matches = (mdata.GetLength() == 0min);
273 }
274 else
275 {
276 matches = (m_runtime == (mdata.GetLength() / 30min));
277 }
278 }
279
280 if (matches && m_userRating != kUserRatingFilterAll)
281 {
282 matches = (mdata.GetUserRating() >= m_userRating);
283 }
284
285 if (matches && m_browse != kBrowseFilterAll)
286 {
287 matches = (static_cast<int>(mdata.GetBrowse()) == m_browse);
288 }
289
290 if (matches && m_watched != kWatchedFilterAll)
291 {
292 matches = (static_cast<int>(mdata.GetWatched()) == m_watched);
293 }
294
295 if (matches && m_inetRef != kInetRefFilterAll)
296 {
297 matches = (mdata.GetInetRef() == VIDEO_INETREF_DEFAULT);
298 }
299
300 if (matches && m_coverFile != kCoverFileFilterAll)
301 {
302 matches = (IsDefaultCoverFile(mdata.GetCoverFile()));
303 }
304
305 if (matches && m_parentalLevel)
306 {
307 matches = ((mdata.GetShowLevel() != ParentalLevel::plNone) &&
308 (mdata.GetShowLevel() <= m_parentalLevel));
309 }
310
311 return matches;
312}
313
316 const VideoMetadata &rhs) const
317{
318 switch (m_orderBy)
319 {
320 case kOrderByTitle: return lhs.sortBefore(rhs);
321 case kOrderByYearDescending: return lhs.GetYear() > rhs.GetYear();
324 case kOrderByLength: return lhs.GetLength() < rhs.GetLength();
325 case kOrderByID: return lhs.GetID() < rhs.GetID();
326 case kOrderByFilename:
328 case kOrderBySeasonEp:
329 {
330 if ((lhs.GetSeason() == rhs.GetSeason())
331 && (lhs.GetEpisode() == rhs.GetEpisode())
332 && (lhs.GetSeason() == 0)
333 && (rhs.GetSeason() == 0)
334 && (lhs.GetEpisode() == 0)
335 && (rhs.GetEpisode() == 0))
336 {
337 return lhs.sortBefore(rhs);
338 }
339 if ((lhs.GetSeason() == rhs.GetSeason())
340 && (lhs.GetTitle() == rhs.GetTitle()))
341 {
342 return (lhs.GetEpisode() < rhs.GetEpisode());
343 }
344 return (lhs.GetSeason() < rhs.GetSeason());
345 }
346 default:
347 {
348 LOG(VB_GENERAL, LOG_ERR, QString("Error: unknown sort type %1")
349 .arg(m_orderBy));
350 return false;
351 }
352 }
353}
354
356{
358 auto match = kReSeason.match(val);
359 if (match.hasMatch())
360 {
361 m_season = match.capturedView(1).isEmpty()
362 ? -1 : match.capturedView(1).toInt();
363 m_episode = match.capturedView(2).isEmpty()
364 ? -1 : match.capturedView(2).toInt();
365 //clear \dX\d from string for string-search in plot/title/subtitle
366 m_textFilter = val;
367 m_textFilter.remove(match.capturedStart(), match.capturedLength());
368 m_textFilter = m_textFilter.simplified ();
369 }
370 else
371 {
372 m_textFilter = val;
373 m_season = -1;
374 m_episode = -1;
375 }
376 match = kReDate.match(m_textFilter);
377 if (match.hasMatch())
378 {
379 int64_t modnr = match.capturedView(1).toInt();
380 QDate testdate = MythDate::current().date();
381 switch(match.capturedView(2).at(0).toLatin1())
382 {
383 case 'd': testdate = testdate.addDays(-modnr);break;
384 case 'w': testdate = testdate.addDays(-modnr * 7);break;
385 case 'm': testdate = testdate.addMonths(-modnr);break;
386 case 'y': testdate = testdate.addYears(-modnr);break;
387 }
388 m_insertDate = testdate;
389 m_textFilter.remove(match.capturedStart(), match.capturedLength());
390 m_textFilter = m_textFilter.simplified ();
391 }
392 else
393 {
394 //reset testdate
395 m_insertDate = QDate();
396 }
397}
398
400// VideoFilterDialog
403 VideoList *video_list) : MythScreenType(lparent, lname),
404 m_videoList(*video_list),
405 m_fsp(new BasicFilterSettingsProxy<VideoList>(*video_list))
406{
408}
409
411{
412 delete m_fsp;
413}
414
416{
417 if (!LoadWindowFromXML("video-ui.xml", "filter", this))
418 return false;
419
420 bool err = false;
421 UIUtilE::Assign(this, m_textFilter, "textfilter_input", &err);
422 UIUtilE::Assign(this, m_yearList, "year_select", &err);
423 UIUtilE::Assign(this, m_userRatingList, "userrating_select", &err);
424 UIUtilE::Assign(this, m_categoryList, "category_select", &err);
425 UIUtilE::Assign(this, m_countryList, "country_select", &err);
426 UIUtilE::Assign(this, m_genreList, "genre_select", &err);
427 UIUtilE::Assign(this, m_castList, "cast_select", &err);
428 UIUtilE::Assign(this, m_runtimeList, "runtime_select", &err);
429 UIUtilE::Assign(this, m_browseList, "browse_select", &err);
430 UIUtilE::Assign(this, m_watchedList, "watched_select", &err);
431 UIUtilE::Assign(this, m_inetRefList, "inetref_select", &err);
432 UIUtilE::Assign(this, m_coverFileList, "coverfile_select", &err);
433 UIUtilE::Assign(this, m_orderByList, "orderby_select", &err);
434
435 UIUtilE::Assign(this, m_doneButton, "done_button", &err);
436 UIUtilE::Assign(this, m_saveButton, "save_button", &err);
437
438 UIUtilE::Assign(this, m_numVideosText, "numvideos_text", &err);
439
440 if (err)
441 {
442 LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'filter'");
443 return false;
444 }
445
447
448 fillWidgets();
450
477
480
481 return true;
482}
483
485{
486 int video_count = m_videoList.TryFilter(m_settings);
487
488 if (video_count > 0)
489 {
490 m_numVideosText->SetText(tr("Result of this filter : %n video(s)", "",
491 video_count));
492 }
493 else
494 {
495 m_numVideosText->SetText(tr("Result of this filter : No Videos"));
496 }
497}
498
500{
501 bool have_unknown_year = false;
502 bool have_unknown_runtime = false;
503
504 using int_list = std::set<int>;
505 int_list years;
506 int_list runtimes;
507 int_list user_ratings;
508
511 for (const auto & md : mdl)
512 {
513 int year = md->GetYear();
514 if ((year == 0) || (year == VIDEO_YEAR_DEFAULT))
515 have_unknown_year = true;
516 else
517 years.insert(year);
518
519 std::chrono::minutes runtime = md->GetLength();
520 if (runtime == 0min)
521 have_unknown_runtime = true;
522 else
523 runtimes.insert(runtime.count() / 30);
524
525 user_ratings.insert(static_cast<int>(md->GetUserRating()));
526 }
527
528 // Category
529 new MythUIButtonListItem(m_categoryList, tr("All", "Category"),
531
532 const VideoCategory::entry_list &vcl =
534 for (const auto & vc : vcl)
535 new MythUIButtonListItem(m_categoryList, vc.second, vc.first);
536
540
541 // Genre
542 new MythUIButtonListItem(m_genreList, tr("All", "Genre"), kGenreFilterAll);
543
545 for (const auto & g : gl)
546 new MythUIButtonListItem(m_genreList, g.second, g.first);
547
550
551 // Cast
552 new MythUIButtonListItem(m_castList, tr("All", "Cast"), kCastFilterAll);
553
555 for (const auto & c : cl)
556 new MythUIButtonListItem(m_castList, c.second, c.first);
557
560
561 // Country
562 new MythUIButtonListItem(m_countryList, tr("All", "Country"), kCountryFilterAll);
563
565 for (const auto & cn : cnl)
566 new MythUIButtonListItem(m_countryList, cn.second, cn.first);
567
571
572 // Year
573 new MythUIButtonListItem(m_yearList, tr("All", "Year"), kYearFilterAll);
574
575 for (auto p = years.crbegin(); p != years.crend(); ++p)
576 {
577 new MythUIButtonListItem(m_yearList, QString::number(*p), *p);
578 }
579
580 if (have_unknown_year)
583
585
586 // Runtime
587 new MythUIButtonListItem(m_runtimeList, tr("All", "Runtime"), kRuntimeFilterAll);
588
589 if (have_unknown_runtime)
592
593 for (int runtime : runtimes)
594 {
595 QString s = QString("%1 %2 ~ %3 %4").arg(runtime * 30).arg(tr("minutes"))
596 .arg((runtime + 1) * 30).arg(tr("minutes"));
597 new MythUIButtonListItem(m_runtimeList, s, runtime);
598 }
599
601
602 // User Rating
603 new MythUIButtonListItem(m_userRatingList, tr("All", "User rating"),
605
606 for (auto p = user_ratings.crbegin(); p != user_ratings.crend(); ++p)
607 {
609 QString(">= %1").arg(QString::number(*p)),
610 *p);
611 }
612
614
615 // Browsable
616 new MythUIButtonListItem(m_browseList, tr("All", "Browsable"),
619 QCoreApplication::translate("(Common)", "Yes"), QVariant::fromValue(1));
621 QCoreApplication::translate("(Common)", "No"), QVariant::fromValue(0));
623
624 // Watched
625 new MythUIButtonListItem(m_watchedList, tr("All", "Watched"),
628 QCoreApplication::translate("(Common)", "Yes"), QVariant::fromValue(1));
630 QCoreApplication::translate("(Common)", "No"), QVariant::fromValue(0));
632
633 // Inet Reference
634 new MythUIButtonListItem(m_inetRefList, tr("All", "Inet reference"),
636 new MythUIButtonListItem(m_inetRefList, tr("Unknown", "Inet reference"),
639
640 // Coverfile
641 new MythUIButtonListItem(m_coverFileList, tr("All", "Cover file"),
643 new MythUIButtonListItem(m_coverFileList, tr("None", "Cover file"),
646
647 // Order by
649 QCoreApplication::translate("(Common)", "Title"),
652 QCoreApplication::translate("(Common)", "Season/Episode"),
655 QCoreApplication::translate("(Common)", "Year"),
658 QCoreApplication::translate("(Common)", "User Rating"),
661 QCoreApplication::translate("(Common)", "Runtime"),
664 QCoreApplication::translate("(Common)", "Filename"),
666 new MythUIButtonListItem(m_orderByList, tr("Video ID"),
668 new MythUIButtonListItem(m_orderByList, tr("Date Added"),
671
672 // Text Filter
674}
675
677{
679 saveAndExit();
680}
681
683{
685
686 if (m_settings.getChangedState() > 0)
687 emit filterChanged();
688 Close();
689}
690
692{
693 int new_year = item->GetData().toInt();
694 m_settings.SetYear(new_year);
696}
697
699{
700 m_settings.SetUserRating(item->GetData().toInt());
702}
703
705{
706 m_settings.SetCategory(item->GetData().toInt());
708}
709
711{
712 m_settings.setCountry(item->GetData().toInt());
714}
715
717{
718 m_settings.setGenre(item->GetData().toInt());
720}
721
723{
724 m_settings.SetCast(item->GetData().toInt());
726}
727
729{
730 m_settings.setRuntime(item->GetData().toInt());
732}
733
735{
736 m_settings.SetBrowse(item->GetData().toInt());
738}
739
741{
742 m_settings.SetWatched(item->GetData().toInt());
744}
745
747{
748 m_settings.SetInetRef(item->GetData().toInt());
750}
751
753{
754 m_settings.SetCoverFile(item->GetData().toInt());
756}
757
759{
763}
764
766{
769}
void SaveSetting(const QString &key, int newValue)
int GetNumSetting(const QString &key, int defaultval=0)
Screen in which all other widgets are contained and rendered.
void BuildFocusList(void)
virtual void Close()
void SetValueByData(const QVariant &data)
void itemSelected(MythUIButtonListItem *item)
void Clicked()
QString GetText(void) const
void SetText(const QString &text, bool moveCursor=true)
void valueChanged()
virtual void SetText(const QString &text)
Definition: mythuitext.cpp:115
const entry_list & getList()
Definition: dbaccess.cpp:241
std::vector< entry > entry_list
Definition: dbaccess.h:16
static VideoCast & GetCast()
Definition: dbaccess.cpp:531
static VideoCategory & GetCategory()
Definition: dbaccess.cpp:489
static VideoCountry & getCountry()
Definition: dbaccess.cpp:503
MythUIButton * m_doneButton
Definition: videofilter.h:323
void SetUserRating(MythUIButtonListItem *item)
void setRunTime(MythUIButtonListItem *item)
void SetCoverFile(MythUIButtonListItem *item)
VideoFilterDialog(MythScreenStack *lparent, const QString &lname, VideoList *video_list)
void SetYear(MythUIButtonListItem *item)
MythUIButtonList * m_castList
Definition: videofilter.h:318
void setCountry(MythUIButtonListItem *item)
MythUIButtonList * m_userRatingList
Definition: videofilter.h:314
FilterSettingsProxy * m_fsp
Definition: videofilter.h:328
void SetCategory(MythUIButtonListItem *item)
~VideoFilterDialog() override
MythUIText * m_numVideosText
Definition: videofilter.h:324
MythUIButton * m_saveButton
Definition: videofilter.h:322
MythUIButtonList * m_watchedList
Definition: videofilter.h:311
void SetBrowse(MythUIButtonListItem *item)
MythUIButtonList * m_orderByList
Definition: videofilter.h:312
void SetInetRef(MythUIButtonListItem *item)
MythUIButtonList * m_coverFileList
Definition: videofilter.h:321
MythUIButtonList * m_genreList
Definition: videofilter.h:317
void SetWatched(MythUIButtonListItem *item)
MythUIButtonList * m_yearList
Definition: videofilter.h:313
bool Create() override
void setOrderby(MythUIButtonListItem *item)
MythUIButtonList * m_categoryList
Definition: videofilter.h:315
MythUIButtonList * m_inetRefList
Definition: videofilter.h:320
MythUIButtonList * m_countryList
Definition: videofilter.h:316
MythUIButtonList * m_runtimeList
Definition: videofilter.h:319
MythUITextEdit * m_textFilter
Definition: videofilter.h:325
const VideoList & m_videoList
Definition: videofilter.h:327
void SetCast(MythUIButtonListItem *item)
MythUIButtonList * m_browseList
Definition: videofilter.h:310
void setGenre(MythUIButtonListItem *item)
VideoFilterSettings m_settings
Definition: videofilter.h:308
void SetYear(int lyear)
Definition: videofilter.h:149
int getInteRef() const
Definition: videofilter.h:200
void setRuntime(int lruntime)
Definition: videofilter.h:156
int GetBrowse() const
Definition: videofilter.h:169
int getRuntime() const
Definition: videofilter.h:155
void SetInetRef(int inetref)
Definition: videofilter.h:201
void SetUserRating(int luserrating)
Definition: videofilter.h:163
void setGenre(int lgenre)
Definition: videofilter.h:128
static const QRegularExpression kReSeason
Definition: videofilter.h:240
VideoFilterSettings & operator=(const VideoFilterSettings &rhs)
Definition: videofilter.cpp:73
static const QRegularExpression kReDate
Definition: videofilter.h:241
void SetCategory(int lcategory)
Definition: videofilter.h:121
int GetWatched() const
Definition: videofilter.h:176
void setCountry(int lcountry)
Definition: videofilter.h:142
void SetCast(int lcast)
Definition: videofilter.h:135
bool matches_filter(const VideoMetadata &mdata) const
unsigned int getChangedState()
Definition: videofilter.h:214
unsigned int m_changedState
Definition: videofilter.h:243
ParentalLevel::Level m_parentalLevel
Definition: videofilter.h:234
int GetCategory() const
Definition: videofilter.h:120
bool meta_less_than(const VideoMetadata &lhs, const VideoMetadata &rhs) const
Compares two VideoMetadata instances.
int getYear() const
Definition: videofilter.h:148
VideoFilterSettings(bool loaddefaultsettings=true, const QString &_prefix="")
Definition: videofilter.cpp:27
void SetCoverFile(int coverfile)
Definition: videofilter.h:208
int getGenre() const
Definition: videofilter.h:127
int GetCast() const
Definition: videofilter.h:134
QString getTextFilter() const
Definition: videofilter.h:190
int GetCoverFile() const
Definition: videofilter.h:207
void SetBrowse(int lbrowse)
Definition: videofilter.h:170
int GetUserRating() const
Definition: videofilter.h:162
ordering getOrderby() const
Definition: videofilter.h:183
void SetWatched(int lwatched)
Definition: videofilter.h:177
void setOrderby(ordering lorderby)
Definition: videofilter.h:184
void setTextFilter(const QString &val)
int getCountry() const
Definition: videofilter.h:141
static VideoGenre & getGenre()
Definition: dbaccess.cpp:517
const VideoMetadataListManager & getListCache() const
Definition: videolist.cpp:503
int TryFilter(const VideoFilterSettings &filter) const
Definition: videolist.cpp:498
std::list< VideoMetadataPtr > metadata_list
const metadata_list & getList() const
const QString & GetCoverFile() const
int GetYear() const
bool GetWatched() const
const QString & GetTitle() const
int GetCategoryID() const
const country_list & GetCountries() const
const QString & GetSortFilename() const
unsigned int GetID() const
std::vector< cast_entry > cast_list
Definition: videometadata.h:34
ParentalLevel::Level GetShowLevel() const
std::chrono::minutes GetLength() const
const cast_list & GetCast() const
const QString & GetInetRef() const
bool sortBefore(const VideoMetadata &rhs) const
const genre_list & GetGenres() const
bool GetBrowse() const
QDate GetInsertdate() const
const QString & GetSubtitle() const
int GetSeason() const
std::vector< genre_entry > genre_list
Definition: videometadata.h:32
std::vector< country_entry > country_list
Definition: videometadata.h:33
const QString & GetPlot() const
int GetEpisode() const
float GetUserRating() const
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
const QString VIDEO_INETREF_DEFAULT
Definition: globals.cpp:24
const QString VIDEO_YEAR_UNKNOWN
Definition: globals.cpp:15
const QString VIDEO_COUNTRY_UNKNOWN
Definition: globals.cpp:13
const QString VIDEO_CATEGORY_UNKNOWN
Definition: globals.cpp:7
const QString VIDEO_GENRE_UNKNOWN
Definition: globals.cpp:11
const QString VIDEO_CAST_UNKNOWN
Definition: globals.cpp:19
const QString VIDEO_RUNTIME_UNKNOWN
Definition: globals.cpp:17
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
Definition: mythdate.cpp:15
bool naturalSortCompare(const QString &a, const QString &b, Qt::CaseSensitivity caseSensitivity=Qt::CaseSensitive)
naturalCompare as a std::sort compatible function (ignoring the third parameter, which is never used)...
Definition: stringutil.h:57
duration< CHRONO_TYPE, ratio< 31556952 > > years
Definition: mythchrono.h:28
virtual const VideoFilterSettings & getSettings()=0
virtual void setSettings(const VideoFilterSettings &settings)=0
static bool Assign(ContainerType *container, UIType *&item, const QString &name, bool *err=nullptr)
Definition: mythuiutils.h:27
@ kWatchedFilterAll
Definition: videofilter.h:60
@ kCoverFileFilterAll
Definition: videofilter.h:69
@ kCoverFileFilterNone
Definition: videofilter.h:70
@ kCategoryFilterAll
Definition: videofilter.h:37
@ kCategoryFilterUnknown
Definition: videofilter.h:38
@ kRuntimeFilterAll
Definition: videofilter.h:47
@ kRuntimeFilterUnknown
Definition: videofilter.h:48
@ kCastFilterUnknown
Definition: videofilter.h:33
@ kCastFilterAll
Definition: videofilter.h:32
@ kGenreFilterUnknown
Definition: videofilter.h:23
@ kGenreFilterAll
Definition: videofilter.h:22
@ kBrowseFilterAll
Definition: videofilter.h:56
@ kInetRefFilterAll
Definition: videofilter.h:64
@ kInetRefFilterUnknown
Definition: videofilter.h:65
@ kUserRatingFilterAll
Definition: videofilter.h:52
@ kCountryFilterUnknown
Definition: videofilter.h:28
@ kCountryFilterAll
Definition: videofilter.h:27
@ kYearFilterAll
Definition: videofilter.h:42
@ kYearFilterUnknown
Definition: videofilter.h:43
static constexpr uint16_t VIDEO_YEAR_DEFAULT
Definition: videometadata.h:18
bool IsDefaultCoverFile(const QString &coverfile)
Definition: videoutils.cpp:121