MythTV master
videofilter.cpp
Go to the documentation of this file.
1// C++
2#include <algorithm>
3#include <ranges>
4#include <set>
5
6// MythTV
19
20// MythFrontend
21#include "videofilter.h"
22#include "videolist.h"
23
24const QRegularExpression VideoFilterSettings::kReSeason {
25 "(\\d+)x(\\d*)", QRegularExpression::CaseInsensitiveOption };
26const QRegularExpression VideoFilterSettings::kReDate {
27 "-(\\d+)([dwmy])", QRegularExpression::CaseInsensitiveOption };
28
30 const QString& _prefix)
31{
32 if (_prefix.isEmpty())
33 m_prefix = "VideoDefault";
34 else
35 m_prefix = _prefix + "Default";
36
37 // do nothing yet
38 if (loaddefaultsettings)
39 {
40 m_category = gCoreContext->GetNumSetting(QString("%1Category").arg(m_prefix),
42 m_genre = gCoreContext->GetNumSetting(QString("%1Genre").arg(m_prefix),
44 m_country = gCoreContext->GetNumSetting(QString("%1Country").arg(m_prefix),
46 m_cast = gCoreContext->GetNumSetting(QString("%1Cast").arg(m_prefix),
48 m_year = gCoreContext->GetNumSetting(QString("%1Year").arg(m_prefix),
50 m_runtime = gCoreContext->GetNumSetting(QString("%1Runtime").arg(m_prefix),
53 gCoreContext->GetNumSetting(QString("%1Userrating").arg(m_prefix),
55 m_browse = gCoreContext->GetNumSetting(QString("%1Browse").arg(m_prefix),
57 m_watched = gCoreContext->GetNumSetting(QString("%1Watched").arg(m_prefix),
59 m_inetRef = gCoreContext->GetNumSetting(QString("%1InetRef").arg(m_prefix),
61 m_coverFile = gCoreContext->GetNumSetting(QString("%1CoverFile")
63 m_orderBy = (ordering)gCoreContext->GetNumSetting(QString("%1Orderby")
64 .arg(m_prefix),
66 }
67}
68
70{
71 *this = rhs;
72}
73
76{
77 if (this == &rhs)
78 return *this;
79
80 m_prefix = rhs.m_prefix;
81
82 if (m_category != rhs.m_category)
83 {
86 }
87
88 if (m_genre != rhs.m_genre)
89 {
91 m_genre = rhs.m_genre;
92 }
93
94 if (m_country != rhs.m_country)
95 {
97 m_country = rhs.m_country;
98 }
99
100 if (m_cast != rhs.m_cast)
101 {
103 m_cast = rhs.m_cast;
104 }
105
106 if (m_year != rhs.m_year)
107 {
109 m_year = rhs.m_year;
110 }
111
112 if (m_runtime != rhs.m_runtime)
113 {
115 m_runtime = rhs.m_runtime;
116 }
117
118 if (m_userRating != rhs.m_userRating)
119 {
122 }
123
124 if (m_browse != rhs.m_browse)
125 {
127 m_browse = rhs.m_browse;
128 }
129
130 if (m_watched != rhs.m_watched)
131 {
133 m_watched = rhs.m_watched;
134 }
135
136 if (m_inetRef != rhs.m_inetRef)
137 {
139 m_inetRef = rhs.m_inetRef;
140 }
141
142 if (m_coverFile != rhs.m_coverFile)
143 {
146 }
147
148 if (m_orderBy != rhs.m_orderBy)
149 {
151 m_orderBy = rhs.m_orderBy;
152 }
153
155 {
158 }
159
160 if (m_textFilter != rhs.m_textFilter)
161 {
164 }
165 if (m_season != rhs.m_season || m_episode != rhs.m_episode)
166 {
167 m_season = rhs.m_season;
168 m_episode = rhs.m_episode;
170 }
171 if (m_insertDate != rhs.m_insertDate)
172 {
175 }
176
177 return *this;
178}
179
181{
182 gCoreContext->SaveSetting(QString("%1Category").arg(m_prefix), m_category);
183 gCoreContext->SaveSetting(QString("%1Genre").arg(m_prefix), m_genre);
184 gCoreContext->SaveSetting(QString("%1Cast").arg(m_prefix), m_cast);
185 gCoreContext->SaveSetting(QString("%1Country").arg(m_prefix), m_country);
186 gCoreContext->SaveSetting(QString("%1Year").arg(m_prefix), m_year);
187 gCoreContext->SaveSetting(QString("%1Runtime").arg(m_prefix), m_runtime);
188 gCoreContext->SaveSetting(QString("%1Userrating").arg(m_prefix), m_userRating);
189 gCoreContext->SaveSetting(QString("%1Browse").arg(m_prefix), m_browse);
190 gCoreContext->SaveSetting(QString("%1Watched").arg(m_prefix), m_watched);
191 gCoreContext->SaveSetting(QString("%1InetRef").arg(m_prefix), m_inetRef);
192 gCoreContext->SaveSetting(QString("%1CoverFile").arg(m_prefix), m_coverFile);
193 gCoreContext->SaveSetting(QString("%1Orderby").arg(m_prefix), m_orderBy);
194 gCoreContext->SaveSetting(QString("%1Filter").arg(m_prefix), m_textFilter);
195}
196
198{
199 bool matches = true;
200
201 //textfilter
202 if (!m_textFilter.isEmpty())
203 {
204 matches = false;
205 matches = (matches ||
206 mdata.GetTitle().contains(m_textFilter, Qt::CaseInsensitive));
207 matches = (matches ||
208 mdata.GetSubtitle().contains(m_textFilter, Qt::CaseInsensitive));
209 matches = (matches ||
210 mdata.GetPlot().contains(m_textFilter, Qt::CaseInsensitive));
211 }
212 //search for season with optionally episode nr.
213 if (matches && (m_season != -1))
214 {
215 matches = (m_season == mdata.GetSeason());
216 matches = (matches && (m_episode == -1 || m_episode == mdata.GetEpisode()));
217 }
218 if (matches && m_insertDate.isValid())
219 {
220 matches = (mdata.GetInsertdate().isValid() &&
221 mdata.GetInsertdate() >= m_insertDate);
222 }
223 if (matches && (m_genre != kGenreFilterAll))
224 {
225 const VideoMetadata::genre_list &gl = mdata.GetGenres();
226 auto samegenre = [this](const auto & g) {return g.first == m_genre; };
227 matches = std::ranges::any_of(gl, samegenre);
228 }
229
230 if (matches && m_country != kCountryFilterAll)
231 {
232 const VideoMetadata::country_list &cl = mdata.GetCountries();
233 auto samecountry = [this](const auto & c) {return c.first == m_country; };
234 matches = std::ranges::any_of(cl, samecountry);
235 }
236
237 if (matches && m_cast != kCastFilterAll)
238 {
239 const VideoMetadata::cast_list &cl = mdata.GetCast();
240
241 if ((m_cast == kCastFilterUnknown) && (cl.empty()))
242 {
243 matches = true;
244 }
245 else
246 {
247 auto samecast = [this](const auto & c){return c.first == m_cast; };
248 matches = std::ranges::any_of(cl, samecast);
249 }
250 }
251
252 if (matches && m_category != kCategoryFilterAll)
253 {
254 matches = (m_category == mdata.GetCategoryID());
255 }
256
257 if (matches && m_year != kYearFilterAll)
258 {
260 {
261 matches = ((mdata.GetYear() == 0) ||
262 (mdata.GetYear() == VIDEO_YEAR_DEFAULT));
263 }
264 else
265 {
266 matches = (m_year == mdata.GetYear());
267 }
268 }
269
270 if (matches && m_runtime != kRuntimeFilterAll)
271 {
273 {
274 matches = (mdata.GetLength() == 0min);
275 }
276 else
277 {
278 matches = (m_runtime == (mdata.GetLength() / 30min));
279 }
280 }
281
282 if (matches && m_userRating != kUserRatingFilterAll)
283 {
284 matches = (mdata.GetUserRating() >= m_userRating);
285 }
286
287 if (matches && m_browse != kBrowseFilterAll)
288 {
289 matches = (static_cast<int>(mdata.GetBrowse()) == m_browse);
290 }
291
292 if (matches && m_watched != kWatchedFilterAll)
293 {
294 matches = (static_cast<int>(mdata.GetWatched()) == m_watched);
295 }
296
297 if (matches && m_inetRef != kInetRefFilterAll)
298 {
299 matches = (mdata.GetInetRef() == VIDEO_INETREF_DEFAULT);
300 }
301
302 if (matches && m_coverFile != kCoverFileFilterAll)
303 {
304 matches = (IsDefaultCoverFile(mdata.GetCoverFile()));
305 }
306
307 if (matches && m_parentalLevel)
308 {
309 matches = ((mdata.GetShowLevel() != ParentalLevel::plNone) &&
310 (mdata.GetShowLevel() <= m_parentalLevel));
311 }
312
313 return matches;
314}
315
318 const VideoMetadata &rhs) const
319{
320 switch (m_orderBy)
321 {
322 case kOrderByTitle: return lhs.sortBefore(rhs);
323 case kOrderByYearDescending: return lhs.GetYear() > rhs.GetYear();
326 case kOrderByLength: return lhs.GetLength() < rhs.GetLength();
327 case kOrderByID: return lhs.GetID() < rhs.GetID();
328 case kOrderByFilename:
330 case kOrderBySeasonEp:
331 {
332 if ((lhs.GetSeason() == rhs.GetSeason())
333 && (lhs.GetEpisode() == rhs.GetEpisode())
334 && (lhs.GetSeason() == 0)
335 && (rhs.GetSeason() == 0)
336 && (lhs.GetEpisode() == 0)
337 && (rhs.GetEpisode() == 0))
338 {
339 return lhs.sortBefore(rhs);
340 }
341 if ((lhs.GetSeason() == rhs.GetSeason())
342 && (lhs.GetTitle() == rhs.GetTitle()))
343 {
344 return (lhs.GetEpisode() < rhs.GetEpisode());
345 }
346 return (lhs.GetSeason() < rhs.GetSeason());
347 }
348 default:
349 {
350 LOG(VB_GENERAL, LOG_ERR, QString("Error: unknown sort type %1")
351 .arg(m_orderBy));
352 return false;
353 }
354 }
355}
356
358{
360 auto match = kReSeason.match(val);
361 if (match.hasMatch())
362 {
363 m_season = match.capturedView(1).isEmpty()
364 ? -1 : match.capturedView(1).toInt();
365 m_episode = match.capturedView(2).isEmpty()
366 ? -1 : match.capturedView(2).toInt();
367 //clear \dX\d from string for string-search in plot/title/subtitle
368 m_textFilter = val;
369 m_textFilter.remove(match.capturedStart(), match.capturedLength());
370 m_textFilter = m_textFilter.simplified ();
371 }
372 else
373 {
374 m_textFilter = val;
375 m_season = -1;
376 m_episode = -1;
377 }
378 match = kReDate.match(m_textFilter);
379 if (match.hasMatch())
380 {
381 int64_t modnr = match.capturedView(1).toInt();
382 QDate testdate = MythDate::current().date();
383 switch(match.capturedView(2).at(0).toLatin1())
384 {
385 case 'd': testdate = testdate.addDays(-modnr);break;
386 case 'w': testdate = testdate.addDays(-modnr * 7);break;
387 case 'm': testdate = testdate.addMonths(-modnr);break;
388 case 'y': testdate = testdate.addYears(-modnr);break;
389 }
390 m_insertDate = testdate;
391 m_textFilter.remove(match.capturedStart(), match.capturedLength());
392 m_textFilter = m_textFilter.simplified ();
393 }
394 else
395 {
396 //reset testdate
397 m_insertDate = QDate();
398 }
399}
400
402// VideoFilterDialog
405 VideoList *video_list) : MythScreenType(lparent, lname),
406 m_videoList(*video_list),
407 m_fsp(new BasicFilterSettingsProxy<VideoList>(*video_list))
408{
410}
411
413{
414 delete m_fsp;
415}
416
418{
419 if (!LoadWindowFromXML("video-ui.xml", "filter", this))
420 return false;
421
422 bool err = false;
423 UIUtilE::Assign(this, m_textFilter, "textfilter_input", &err);
424 UIUtilE::Assign(this, m_yearList, "year_select", &err);
425 UIUtilE::Assign(this, m_userRatingList, "userrating_select", &err);
426 UIUtilE::Assign(this, m_categoryList, "category_select", &err);
427 UIUtilE::Assign(this, m_countryList, "country_select", &err);
428 UIUtilE::Assign(this, m_genreList, "genre_select", &err);
429 UIUtilE::Assign(this, m_castList, "cast_select", &err);
430 UIUtilE::Assign(this, m_runtimeList, "runtime_select", &err);
431 UIUtilE::Assign(this, m_browseList, "browse_select", &err);
432 UIUtilE::Assign(this, m_watchedList, "watched_select", &err);
433 UIUtilE::Assign(this, m_inetRefList, "inetref_select", &err);
434 UIUtilE::Assign(this, m_coverFileList, "coverfile_select", &err);
435 UIUtilE::Assign(this, m_orderByList, "orderby_select", &err);
436
437 UIUtilE::Assign(this, m_doneButton, "done_button", &err);
438 UIUtilE::Assign(this, m_saveButton, "save_button", &err);
439
440 UIUtilE::Assign(this, m_numVideosText, "numvideos_text", &err);
441
442 if (err)
443 {
444 LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'filter'");
445 return false;
446 }
447
449
450 fillWidgets();
452
479
482
483 return true;
484}
485
487{
488 int video_count = m_videoList.TryFilter(m_settings);
489
490 if (video_count > 0)
491 {
492 m_numVideosText->SetText(tr("Result of this filter : %n video(s)", "",
493 video_count));
494 }
495 else
496 {
497 m_numVideosText->SetText(tr("Result of this filter : No Videos"));
498 }
499}
500
502{
503 bool have_unknown_year = false;
504 bool have_unknown_runtime = false;
505
506 using int_list = std::set<int>;
507 int_list years;
508 int_list runtimes;
509 int_list user_ratings;
510
513 for (const auto & md : mdl)
514 {
515 int year = md->GetYear();
516 if ((year == 0) || (year == VIDEO_YEAR_DEFAULT))
517 have_unknown_year = true;
518 else
519 years.insert(year);
520
521 std::chrono::minutes runtime = md->GetLength();
522 if (runtime == 0min)
523 have_unknown_runtime = true;
524 else
525 runtimes.insert(runtime.count() / 30);
526
527 user_ratings.insert(static_cast<int>(md->GetUserRating()));
528 }
529
530 // Category
531 new MythUIButtonListItem(m_categoryList, tr("All", "Category"),
533
534 const VideoCategory::entry_list &vcl =
536 for (const auto & vc : vcl)
537 new MythUIButtonListItem(m_categoryList, vc.second, vc.first);
538
542
543 // Genre
544 new MythUIButtonListItem(m_genreList, tr("All", "Genre"), kGenreFilterAll);
545
547 for (const auto & g : gl)
548 new MythUIButtonListItem(m_genreList, g.second, g.first);
549
552
553 // Cast
554 new MythUIButtonListItem(m_castList, tr("All", "Cast"), kCastFilterAll);
555
557 for (const auto & c : cl)
558 new MythUIButtonListItem(m_castList, c.second, c.first);
559
562
563 // Country
564 new MythUIButtonListItem(m_countryList, tr("All", "Country"), kCountryFilterAll);
565
567 for (const auto & cn : cnl)
568 new MythUIButtonListItem(m_countryList, cn.second, cn.first);
569
573
574 // Year
575 new MythUIButtonListItem(m_yearList, tr("All", "Year"), kYearFilterAll);
576
577 for (int year : std::ranges::reverse_view(years))
578 {
579 new MythUIButtonListItem(m_yearList, QString::number(year), year);
580 }
581
582 if (have_unknown_year)
585
587
588 // Runtime
589 new MythUIButtonListItem(m_runtimeList, tr("All", "Runtime"), kRuntimeFilterAll);
590
591 if (have_unknown_runtime)
594
595 for (int runtime : runtimes)
596 {
597 QString s = QString("%1 %2 ~ %3 %4").arg(runtime * 30).arg(tr("minutes"))
598 .arg((runtime + 1) * 30).arg(tr("minutes"));
599 new MythUIButtonListItem(m_runtimeList, s, runtime);
600 }
601
603
604 // User Rating
605 new MythUIButtonListItem(m_userRatingList, tr("All", "User rating"),
607
608 for (int rating : std::ranges::reverse_view(user_ratings))
609 {
611 QString(">= %1").arg(QString::number(rating)),
612 rating);
613 }
614
616
617 // Browsable
618 new MythUIButtonListItem(m_browseList, tr("All", "Browsable"),
621 QCoreApplication::translate("(Common)", "Yes"), QVariant::fromValue(1));
623 QCoreApplication::translate("(Common)", "No"), QVariant::fromValue(0));
625
626 // Watched
627 new MythUIButtonListItem(m_watchedList, tr("All", "Watched"),
630 QCoreApplication::translate("(Common)", "Yes"), QVariant::fromValue(1));
632 QCoreApplication::translate("(Common)", "No"), QVariant::fromValue(0));
634
635 // Inet Reference
636 new MythUIButtonListItem(m_inetRefList, tr("All", "Inet reference"),
638 new MythUIButtonListItem(m_inetRefList, tr("Unknown", "Inet reference"),
641
642 // Coverfile
643 new MythUIButtonListItem(m_coverFileList, tr("All", "Cover file"),
645 new MythUIButtonListItem(m_coverFileList, tr("None", "Cover file"),
648
649 // Order by
651 QCoreApplication::translate("(Common)", "Title"),
654 QCoreApplication::translate("(Common)", "Season/Episode"),
657 QCoreApplication::translate("(Common)", "Year"),
660 QCoreApplication::translate("(Common)", "User Rating"),
663 QCoreApplication::translate("(Common)", "Runtime"),
666 QCoreApplication::translate("(Common)", "Filename"),
668 new MythUIButtonListItem(m_orderByList, tr("Video ID"),
670 new MythUIButtonListItem(m_orderByList, tr("Date Added"),
673
674 // Text Filter
676}
677
679{
681 saveAndExit();
682}
683
685{
687
688 if (m_settings.getChangedState() > 0)
689 emit filterChanged();
690 Close();
691}
692
694{
695 int new_year = item->GetData().toInt();
696 m_settings.SetYear(new_year);
698}
699
701{
702 m_settings.SetUserRating(item->GetData().toInt());
704}
705
707{
708 m_settings.SetCategory(item->GetData().toInt());
710}
711
713{
714 m_settings.setCountry(item->GetData().toInt());
716}
717
719{
720 m_settings.setGenre(item->GetData().toInt());
722}
723
725{
726 m_settings.SetCast(item->GetData().toInt());
728}
729
731{
732 m_settings.setRuntime(item->GetData().toInt());
734}
735
737{
738 m_settings.SetBrowse(item->GetData().toInt());
740}
741
743{
744 m_settings.SetWatched(item->GetData().toInt());
746}
747
749{
750 m_settings.SetInetRef(item->GetData().toInt());
752}
753
755{
756 m_settings.SetCoverFile(item->GetData().toInt());
758}
759
761{
765}
766
768{
771}
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:535
static VideoCategory & GetCategory()
Definition: dbaccess.cpp:493
static VideoCountry & getCountry()
Definition: dbaccess.cpp:507
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:75
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:29
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:521
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:61
def rating(profile, smoonURL, gate)
Definition: scan.py:36
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:125