MythTV  master
editvideometadata.cpp
Go to the documentation of this file.
1 #include <algorithm>
2 
3 #include <QImageReader>
4 #include <QUrl>
5 
6 #include <mythcontext.h>
7 #include <mythdirs.h>
8 
9 #include "mythmainwindow.h"
10 #include "mythdialogbox.h"
11 #include "mythuibuttonlist.h"
12 #include "mythuitext.h"
13 #include "mythuitextedit.h"
14 #include "mythuibutton.h"
15 #include "mythuicheckbox.h"
16 #include "mythuispinbox.h"
17 #include "mythuiimage.h"
18 #include "mythuifilebrowser.h"
19 #include "mythuiimageresults.h"
20 #include "mythuihelper.h"
21 #include "mythprogressdialog.h"
22 #include "mythmiscutil.h"
23 #include "remoteutil.h"
24 #include "globals.h"
25 #include "dbaccess.h"
27 #include "videoutils.h"
28 
29 #include "editvideometadata.h"
30 #include "metadatafactory.h"
31 
32 //static const QString _Location = QObject::tr("Metadata Editor");
33 
35  const QString& lname, VideoMetadata *source_metadata,
36  const VideoMetadataListManager &cache) : MythScreenType(lparent, lname),
37  m_origMetadata(source_metadata),
38  m_metaCache(cache)
39 {
40  m_query = new MetadataDownload(this);
43 
44  m_popupStack = GetMythMainWindow()->GetStack("popup stack");
45 }
46 
48 {
49  delete m_workingMetadata;
50 }
51 
53 {
54  if (!LoadWindowFromXML("video-ui.xml", "edit_metadata", this))
55  return false;
56 
57  bool err = false;
58  UIUtilE::Assign(this, m_titleEdit, "title_edit", &err);
59  UIUtilE::Assign(this, m_subtitleEdit, "subtitle_edit", &err);
60  UIUtilE::Assign(this, m_playerEdit, "player_edit", &err);
61 
62  UIUtilE::Assign(this, m_seasonSpin, "season", &err);
63  UIUtilE::Assign(this, m_episodeSpin, "episode", &err);
64 
65 
66  UIUtilE::Assign(this, m_categoryList, "category_select", &err);
67  UIUtilE::Assign(this, m_levelList, "level_select", &err);
68  UIUtilE::Assign(this, m_childList, "child_select", &err);
69 
70  UIUtilE::Assign(this, m_browseCheck, "browse_check", &err);
71  UIUtilE::Assign(this, m_watchedCheck, "watched_check", &err);
72 
73  UIUtilE::Assign(this, m_doneButton, "done_button", &err);
74 
75  if (err)
76  {
77  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'edit_metadata'");
78  return false;
79  }
80 
81  UIUtilW::Assign(this, m_coverartText, "coverart_text");
82  UIUtilW::Assign(this, m_screenshotText, "screenshot_text");
83  UIUtilW::Assign(this, m_bannerText, "banner_text");
84  UIUtilW::Assign(this, m_fanartText, "fanart_text");
85  UIUtilW::Assign(this, m_trailerText, "trailer_text");
86 
87  UIUtilW::Assign(this, m_coverartButton, "coverart_button");
88  UIUtilW::Assign(this, m_bannerButton, "banner_button");
89  UIUtilW::Assign(this, m_fanartButton, "fanart_button");
90  UIUtilW::Assign(this, m_screenshotButton, "screenshot_button");
91  UIUtilW::Assign(this, m_trailerButton, "trailer_button");
92 
93  UIUtilW::Assign(this, m_netBannerButton, "net_banner_button");
94  UIUtilW::Assign(this, m_netFanartButton, "net_fanart_button");
95  UIUtilW::Assign(this, m_netScreenshotButton, "net_screenshot_button");
96  UIUtilW::Assign(this, m_netCoverartButton, "net_coverart_button");
97 
98  UIUtilW::Assign(this, m_taglineEdit, "tagline_edit");
99  UIUtilW::Assign(this, m_ratingEdit, "rating_edit");
100  UIUtilW::Assign(this, m_directorEdit, "director_edit");
101  UIUtilW::Assign(this, m_inetrefEdit, "inetref_edit");
102  UIUtilW::Assign(this, m_homepageEdit, "homepage_edit");
103  UIUtilW::Assign(this, m_plotEdit, "description_edit");
104  UIUtilW::Assign(this, m_yearSpin, "year_spin");
105  UIUtilW::Assign(this, m_userRatingSpin, "userrating_spin");
106  UIUtilW::Assign(this, m_lengthSpin, "length_spin");
107 
108  UIUtilW::Assign(this, m_coverart, "coverart");
109  UIUtilW::Assign(this, m_screenshot, "screenshot");
110  UIUtilW::Assign(this, m_banner, "banner");
111  UIUtilW::Assign(this, m_fanart, "fanart");
112 
113  fillWidgets();
114 
115  BuildFocusList();
116 
117  connect(m_titleEdit, SIGNAL(valueChanged()), SLOT(SetTitle()));
119  connect(m_subtitleEdit, SIGNAL(valueChanged()), SLOT(SetSubtitle()));
121  connect(m_playerEdit, SIGNAL(valueChanged()), SLOT(SetPlayer()));
122  if (m_taglineEdit)
123  {
124  connect(m_taglineEdit, SIGNAL(valueChanged()), SLOT(SetTagline()));
126  }
127  if (m_ratingEdit)
128  {
129  connect(m_ratingEdit, SIGNAL(valueChanged()), SLOT(SetRating()));
131  }
132  if (m_directorEdit)
133  {
134  connect(m_directorEdit, SIGNAL(valueChanged()), SLOT(SetDirector()));
136  }
137  if (m_inetrefEdit)
138  connect(m_inetrefEdit, SIGNAL(valueChanged()), SLOT(SetInetRef()));
139  if (m_homepageEdit)
140  {
141  connect(m_homepageEdit, SIGNAL(valueChanged()), SLOT(SetHomepage()));
143  }
144  if (m_plotEdit)
145  {
146  connect(m_plotEdit, SIGNAL(valueChanged()), SLOT(SetPlot()));
148  }
149 
150  connect(m_seasonSpin, SIGNAL(LosingFocus()), SLOT(SetSeason()));
151  connect(m_episodeSpin, SIGNAL(LosingFocus()), SLOT(SetEpisode()));
152  if (m_yearSpin)
153  connect(m_yearSpin, SIGNAL(LosingFocus()), SLOT(SetYear()));
154  if (m_userRatingSpin)
155  connect(m_userRatingSpin, SIGNAL(LosingFocus()), SLOT(SetUserRating()));
156  if (m_lengthSpin)
157  connect(m_lengthSpin, SIGNAL(LosingFocus()), SLOT(SetLength()));
158 
159  connect(m_doneButton, SIGNAL(Clicked()), SLOT(SaveAndExit()));
160 
161  // Find Artwork locally
162  if (m_coverartButton)
163  connect(m_coverartButton, SIGNAL(Clicked()), SLOT(FindCoverArt()));
164  if (m_bannerButton)
165  connect(m_bannerButton, SIGNAL(Clicked()), SLOT(FindBanner()));
166  if (m_fanartButton)
167  connect(m_fanartButton, SIGNAL(Clicked()), SLOT(FindFanart()));
168  if (m_screenshotButton)
169  connect(m_screenshotButton, SIGNAL(Clicked()), SLOT(FindScreenshot()));
170 
171  // Find Artwork on the Internet
173  connect(m_netCoverartButton, SIGNAL(Clicked()), SLOT(FindNetCoverArt()));
174  if (m_netBannerButton)
175  connect(m_netBannerButton, SIGNAL(Clicked()), SLOT(FindNetBanner()));
176  if (m_netFanartButton)
177  connect(m_netFanartButton, SIGNAL(Clicked()), SLOT(FindNetFanart()));
179  connect(m_netScreenshotButton, SIGNAL(Clicked()), SLOT(FindNetScreenshot()));
180 
181  if (m_trailerButton)
182  connect(m_trailerButton, SIGNAL(Clicked()), SLOT(FindTrailer()));
183 
184  connect(m_browseCheck, SIGNAL(valueChanged()), SLOT(ToggleBrowse()));
185  connect(m_watchedCheck, SIGNAL(valueChanged()), SLOT(ToggleWatched()));
186 
187  connect(m_childList, SIGNAL(itemSelected(MythUIButtonListItem*)),
189  connect(m_levelList, SIGNAL(itemSelected(MythUIButtonListItem*)),
191  connect(m_categoryList, SIGNAL(itemSelected(MythUIButtonListItem*)),
193  connect(m_categoryList, SIGNAL(itemClicked(MythUIButtonListItem*)),
194  SLOT(NewCategoryPopup()));
195 
196  return true;
197 }
198 
199 namespace
200 {
201  template <typename T>
202  struct title_sort
203  {
204  bool operator()(const T &lhs, const T &rhs)
205  {
206  return naturalCompare(lhs.second, rhs.second) < 0;
207  }
208  };
209 
210  QStringList GetSupportedImageExtensionFilter()
211  {
212  QStringList ret;
213 
214  QList<QByteArray> exts = QImageReader::supportedImageFormats();
215  for (const auto & ext : qAsConst(exts))
216  ret.append(QString("*.").append(ext));
217  return ret;
218  }
219 
220  void FindImagePopup(const QString &prefix, const QString &prefixAlt,
221  QObject &inst, const QString &returnEvent)
222  {
223  QString fp;
224 
225  if (prefix.startsWith("myth://"))
226  fp = prefix;
227  else
228  fp = prefix.isEmpty() ? prefixAlt : prefix;
229 
230  MythScreenStack *popupStack =
231  GetMythMainWindow()->GetStack("popup stack");
232 
233  auto *fb = new MythUIFileBrowser(popupStack, fp);
234  fb->SetNameFilter(GetSupportedImageExtensionFilter());
235  if (fb->Create())
236  {
237  fb->SetReturnEvent(&inst, returnEvent);
238  popupStack->AddScreen(fb);
239  }
240  else
241  delete fb;
242  }
243 
244  void FindVideoFilePopup(const QString &prefix, const QString &prefixAlt,
245  QObject &inst, const QString &returnEvent)
246  {
247  QString fp;
248 
249  if (prefix.startsWith("myth://"))
250  fp = prefix;
251  else
252  fp = prefix.isEmpty() ? prefixAlt : prefix;
253 
254  MythScreenStack *popupStack =
255  GetMythMainWindow()->GetStack("popup stack");
256  QStringList exts;
257 
258  const FileAssociations::association_list fa_list =
260  for (const auto & fa : fa_list)
261  exts << QString("*.%1").arg(fa.extension.toUpper());
262 
263  auto *fb = new MythUIFileBrowser(popupStack, fp);
264  fb->SetNameFilter(exts);
265  if (fb->Create())
266  {
267  fb->SetReturnEvent(&inst, returnEvent);
268  popupStack->AddScreen(fb);
269  }
270  else
271  delete fb;
272  }
273 
274  const QString CEID_COVERARTFILE = "coverartfile";
275  const QString CEID_BANNERFILE = "bannerfile";
276  const QString CEID_FANARTFILE = "fanartfile";
277  const QString CEID_SCREENSHOTFILE = "screenshotfile";
278  const QString CEID_TRAILERFILE = "trailerfile";
279  const QString CEID_NEWCATEGORY = "newcategory";
280 }
281 
283 {
284  if (m_busyPopup)
285  return;
286 
287  const QString& message = title;
288 
290  "mythvideobusydialog");
291 
292  if (m_busyPopup->Create())
294 }
295 
297 {
300 
301  m_seasonSpin->SetRange(0,9999,1,5);
303  m_episodeSpin->SetRange(0,999,1,10);
305  if (m_yearSpin)
306  {
307  m_yearSpin->SetRange(0,9999,1,100);
309  }
310  if (m_userRatingSpin)
311  {
312  m_userRatingSpin->SetRange(0,10,1,2);
314  }
315  if (m_lengthSpin)
316  {
317  m_lengthSpin->SetRange(0,999,1,15);
319  }
320 
321  // No memory leak. MythUIButtonListItem adds the new item into
322  // m_categoryList.
324  const VideoCategory::entry_list &vcl =
326  for (const auto & vc : vcl)
327  {
328  // No memory leak. MythUIButtonListItem adds the new item into
329  // m_categoryList.
330  auto *button = new MythUIButtonListItem(m_categoryList, vc.second);
331  button->SetData(vc.first);
332  }
334 
336  i <= ParentalLevel::plHigh && i.good(); ++i)
337  {
338  // No memory leak. MythUIButtonListItem adds the new item into
339  // m_levelList.
340  auto *button = new MythUIButtonListItem(m_levelList,
341  tr("Level %1").arg(i.GetLevel()));
342  button->SetData(i.GetLevel());
343  }
345 
346  //
347  // Fill the "always play this video next" option
348  // with all available videos.
349  //
350 
351  // No memory leak. MythUIButtonListItem adds the new item into
352  // m_childList.
353  new MythUIButtonListItem(m_childList,tr("None"));
354 
355  // TODO: maybe make the title list have the same sort order
356  // as elsewhere.
357  using title_list = std::vector<std::pair<unsigned int, QString> >;
359  title_list tc;
360  tc.reserve(mdl.size());
361  for (const auto & md : mdl)
362  {
363  QString title;
364  if (md->GetSeason() > 0 || md->GetEpisode() > 0)
365  {
366  title = QString("%1 %2x%3").arg(md->GetTitle())
367  .arg(QString::number(md->GetSeason()))
368  .arg(QString::number(md->GetEpisode()));
369  }
370  else
371  {
372  title = md->GetTitle();
373  }
374  tc.push_back(std::make_pair(md->GetID(), title));
375  }
376  std::sort(tc.begin(), tc.end(), title_sort<title_list::value_type>());
377 
378  for (const auto & t : tc)
379  {
380  if (t.first != m_workingMetadata->GetID())
381  {
382  auto *button = new MythUIButtonListItem(m_childList,t.second);
383  button->SetData(t.first);
384  }
385  }
386 
387  if (m_workingMetadata->GetChildID() > 0)
388  {
391  }
392 
397  if (m_coverartText)
399  if (m_screenshotText)
401  if (m_bannerText)
403  if (m_fanartText)
405  if (m_trailerText)
407 
409  if (m_taglineEdit)
411  if (m_ratingEdit)
413  if (m_directorEdit)
415  if (m_inetrefEdit)
417  if (m_homepageEdit)
419  if (m_plotEdit)
421 
422  if (m_coverart)
423  {
424  if (!m_workingMetadata->GetHost().isEmpty() &&
425  !m_workingMetadata->GetCoverFile().isEmpty() &&
426  !m_workingMetadata->GetCoverFile().startsWith("/"))
427  {
431  }
432  else
434 
435  if (!m_workingMetadata->GetCoverFile().isEmpty())
436  m_coverart->Load();
437  }
438  if (m_screenshot)
439  {
440  if (!m_workingMetadata->GetHost().isEmpty() &&
441  !m_workingMetadata->GetScreenshot().isEmpty() &&
442  !m_workingMetadata->GetScreenshot().startsWith("/"))
443  {
447  }
448  else
450 
451  if (!m_workingMetadata->GetScreenshot().isEmpty())
452  m_screenshot->Load();
453  }
454  if (m_banner)
455  {
456  if (!m_workingMetadata->GetHost().isEmpty() &&
457  !m_workingMetadata->GetBanner().isEmpty() &&
458  !m_workingMetadata->GetBanner().startsWith("/"))
459  {
463  }
464  else
466 
467  if (!m_workingMetadata->GetBanner().isEmpty())
468  m_banner->Load();
469  }
470  if (m_fanart)
471  {
472  if (!m_workingMetadata->GetHost().isEmpty() &&
473  !m_workingMetadata->GetFanart().isEmpty() &&
474  !m_workingMetadata->GetFanart().startsWith("/"))
475  {
479  }
480  else
482 
483  if (!m_workingMetadata->GetFanart().isEmpty())
484  m_fanart->Load();
485  }
486 }
487 
489 {
490  QString message = tr("Enter new category");
491 
492  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
493 
494  auto *categorydialog = new MythTextInputDialog(popupStack,message);
495 
496  if (categorydialog->Create())
497  {
498  categorydialog->SetReturnEvent(this, CEID_NEWCATEGORY);
499  popupStack->AddScreen(categorydialog);
500  }
501 
502 }
503 
505 {
510 }
511 
513 {
516 
517  emit Finished();
518  Close();
519 }
520 
522 {
524 }
525 
527 {
529 }
530 
532 {
533  m_workingMetadata->SetCategoryID(item->GetData().toInt());
534 }
535 
537 {
539 }
540 
542 {
544 }
545 
547 {
549 }
550 
552 {
554 }
555 
557 {
559 }
560 
562 {
564 }
565 
567 {
569 }
570 
572 {
574 }
575 
577 {
579 }
580 
582 {
584 }
585 
587 {
589 }
590 
592 {
594 }
595 
597 {
599  SetShowLevel(ParentalLevel(item->GetData().toInt()).GetLevel());
600 }
601 
603 {
604  m_cachedChildSelection = item->GetData().toInt();
606 }
607 
609 {
611  SetBrowse(m_browseCheck->GetBooleanCheckState());
612 }
613 
615 {
617  SetWatched(m_watchedCheck->GetBooleanCheckState());
618 }
619 
621 {
622  if (!m_workingMetadata->GetHost().isEmpty())
623  {
624  QString url = generate_file_url("Coverart",
626  "");
627  FindImagePopup(url, "", *this, CEID_COVERARTFILE);
628  }
629  else
630  {
631  FindImagePopup(gCoreContext->GetSetting("VideoArtworkDir"),
632  GetConfDir() + "/MythVideo", *this, CEID_COVERARTFILE);
633  }
634 }
635 
637 {
638  if (!lookup)
639  return;
640 
641  if (m_busyPopup)
642  {
643  m_busyPopup->Close();
644  m_busyPopup = nullptr;
645  }
646 
647  auto type = lookup->GetData().value<VideoArtworkType>();
648  ArtworkList list = lookup->GetArtwork(type);
649 
650  if (list.isEmpty())
651  {
652  MythWarningNotification n(tr("No image found"), tr("Metadata Editor"));
654  return;
655  }
656  auto *resultsdialog = new ImageSearchResultsDialog(m_popupStack, list, type);
657 
658  connect(resultsdialog, SIGNAL(haveResult(ArtworkInfo, VideoArtworkType)),
660 
661  if (resultsdialog->Create())
662  m_popupStack->AddScreen(resultsdialog);
663 }
664 
666 {
667  QString msg = tr("Downloading selected artwork...");
668  createBusyDialog(msg);
669 
670  auto *lookup = new MetadataLookup();
671  lookup->SetType(kMetadataVideo);
672 
673  lookup->SetSubtype(GuessLookupType(m_workingMetadata));
674  lookup->SetHost(m_workingMetadata->GetHost());
675  lookup->SetAutomatic(true);
676  lookup->SetData(QVariant::fromValue<VideoArtworkType>(type));
677 
678  ArtworkMap downloads;
679  downloads.insert(type, info);
680  lookup->SetDownloads(downloads);
681  lookup->SetAllowOverwrites(true);
682  lookup->SetTitle(m_workingMetadata->GetTitle());
683  lookup->SetSubtitle(m_workingMetadata->GetSubtitle());
684  lookup->SetSeason(m_workingMetadata->GetSeason());
685  lookup->SetEpisode(m_workingMetadata->GetEpisode());
686  lookup->SetInetref(m_workingMetadata->GetInetRef());
687 
688  m_imageDownload->addDownloads(lookup);
689 }
690 
692 {
693  if (!lookup)
694  return;
695 
696  if (m_busyPopup)
697  {
698  m_busyPopup->Close();
699  m_busyPopup = nullptr;
700  }
701 
702  auto type = lookup->GetData().value<VideoArtworkType>();
703  ArtworkMap map = lookup->GetDownloads();
704 
705  if (map.count() >= 1)
706  {
707  ArtworkInfo info = map.value(type);
708  QString filename = info.url;
709 
710  if (type == kArtworkCoverart)
712  else if (type == kArtworkFanart)
714  else if (type == kArtworkBanner)
716  else if (type == kArtworkScreenshot)
718  }
719 }
720 
722 {
723  QString msg = tr("Searching for available artwork...");
724  createBusyDialog(msg);
725 
726  auto *lookup = new MetadataLookup();
727  lookup->SetStep(kLookupSearch);
728  lookup->SetType(kMetadataVideo);
729  lookup->SetAutomatic(true);
730  if (m_workingMetadata->GetSeason() > 0 ||
732  lookup->SetSubtype(kProbableTelevision);
733  else if (m_workingMetadata->GetSubtitle().isEmpty())
734  lookup->SetSubtype(kProbableMovie);
735  else
736  lookup->SetSubtype(kUnknownVideo);
737  lookup->SetData(QVariant::fromValue<VideoArtworkType>(type));
738 
739  lookup->SetTitle(m_workingMetadata->GetTitle());
740  lookup->SetSubtitle(m_workingMetadata->GetSubtitle());
741  lookup->SetSeason(m_workingMetadata->GetSeason());
742  lookup->SetEpisode(m_workingMetadata->GetEpisode());
743  lookup->SetInetref(m_workingMetadata->GetInetRef());
744 
745  m_query->addLookup(lookup);
746 }
747 
749 {
751 }
752 
754 {
756 }
757 
759 {
761 }
762 
764 {
766 }
767 
769 {
770  if (file.isEmpty())
771  return;
772 
773  QString origfile = file;
774 
775  if (file.startsWith("myth://"))
776  {
777  QUrl url(file);
778  file = url.path();
779  file = file.right(file.length() - 1);
780  if (!file.endsWith("/"))
782  else
783  m_workingMetadata->SetCoverFile(QString());
784  }
785  else
787 
789 
790  if (m_coverart)
791  {
792  m_coverart->SetFilename(origfile);
793  m_coverart->Load();
794  }
795 }
796 
798 {
799  if (!m_workingMetadata->GetHost().isEmpty())
800  {
801  QString url = generate_file_url("Banners",
803  "");
804  FindImagePopup(url, "", *this, CEID_BANNERFILE);
805  }
806  else
807  {
808  FindImagePopup(gCoreContext->GetSetting("mythvideo.bannerDir"),
809  GetConfDir() + "/MythVideo/Banners", *this, CEID_BANNERFILE);
810  }
811 }
812 
814 {
815  if (file.isEmpty())
816  return;
817 
818  QString origfile = file;
819 
820  if (file.startsWith("myth://"))
821  {
822  QUrl url(file);
823  file = url.path();
824  file = file.right(file.length() - 1);
825  if (!file.endsWith("/"))
827  else
828  m_workingMetadata->SetBanner(QString());
829  }
830  else
832 
834 
835  if (m_banner)
836  {
837  m_banner->SetFilename(origfile);
838  m_banner->Load();
839  }
840 }
841 
843 {
844  if (!m_workingMetadata->GetHost().isEmpty())
845  {
846  QString url = generate_file_url("Fanart",
848  "");
849  FindImagePopup(url, "", *this, CEID_FANARTFILE);
850  }
851  else
852  {
853  FindImagePopup(gCoreContext->GetSetting("mythvideo.fanartDir"),
854  GetConfDir() + "/MythVideo/Fanart", *this, CEID_FANARTFILE);
855  }
856 }
857 
859 {
860  if (file.isEmpty())
861  return;
862 
863  QString origfile = file;
864 
865  if (file.startsWith("myth://"))
866  {
867  QUrl url(file);
868  file = url.path();
869  file = file.right(file.length() - 1);
870  if (!file.endsWith("/"))
872  else
873  m_workingMetadata->SetFanart(QString());
874  }
875  else
877 
879 
880  if (m_fanart)
881  {
882  m_fanart->SetFilename(origfile);
883  m_fanart->Load();
884  }
885 }
886 
888 {
889  if (!m_workingMetadata->GetHost().isEmpty())
890  {
891  QString url = generate_file_url("Screenshots",
893  "");
894  FindImagePopup(url, "", *this, CEID_SCREENSHOTFILE);
895  }
896  else
897  {
898  FindImagePopup(gCoreContext->GetSetting("mythvideo.screenshotDir"),
899  GetConfDir() + "/MythVideo/Screenshots",
900  *this, CEID_SCREENSHOTFILE);
901  }
902 }
903 
905 {
906  if (file.isEmpty())
907  return;
908 
909  QString origfile = file;
910 
911  if (file.startsWith("myth://"))
912  {
913  QUrl url(file);
914  file = url.path();
915  file = file.right(file.length() - 1);
916  if (!file.endsWith("/"))
918  else
919  m_workingMetadata->SetScreenshot(QString());
920  }
921  else
923 
925 
926  if (m_screenshot)
927  {
928  m_screenshot->SetFilename(origfile);
929  m_screenshot->Load();
930  }
931 }
932 
934 {
935  if (!m_workingMetadata->GetHost().isEmpty())
936  {
937  QString url = generate_file_url("Trailers",
939  "");
940  FindVideoFilePopup(url, "", *this, CEID_TRAILERFILE);
941  }
942  else
943  {
944  FindVideoFilePopup(gCoreContext->GetSetting("mythvideo.TrailersDir"),
945  GetConfDir() + "/MythVideo/Trailers", *this, CEID_TRAILERFILE);
946  }
947 }
948 
950 {
951  if (file.isEmpty())
952  return;
953 
954  if (file.startsWith("myth://"))
955  {
956  QUrl url(file);
957  file = url.path();
958  file = file.right(file.length() - 1);
959  if (!file.endsWith("/"))
961  else
962  m_workingMetadata->SetTrailer(QString());
963  }
964  else
967 }
968 
970 {
971  if (levent->type() == DialogCompletionEvent::kEventType)
972  {
973  auto *dce = (DialogCompletionEvent*)(levent);
974 
975  const QString resultid = dce->GetId();
976 
977  if (resultid == CEID_COVERARTFILE)
978  SetCoverArt(dce->GetResultText());
979  else if (resultid == CEID_BANNERFILE)
980  SetBanner(dce->GetResultText());
981  else if (resultid == CEID_FANARTFILE)
982  SetFanart(dce->GetResultText());
983  else if (resultid == CEID_SCREENSHOTFILE)
984  SetScreenshot(dce->GetResultText());
985  else if (resultid == CEID_TRAILERFILE)
986  SetTrailer(dce->GetResultText());
987  else if (resultid == CEID_NEWCATEGORY)
988  AddCategory(dce->GetResultText());
989  }
990  else if (levent->type() == MetadataLookupEvent::kEventType)
991  {
992  auto *lue = (MetadataLookupEvent *)levent;
993 
994  MetadataLookupList lul = lue->m_lookupList;
995 
996  if (lul.isEmpty())
997  return;
998 
999  // There should really only be one result here.
1000  // If not, USER ERROR!
1001  if (lul.count() == 1)
1002  {
1003  OnArtworkSearchDone(lul[0]);
1004  }
1005  else
1006  {
1007  if (m_busyPopup)
1008  {
1009  m_busyPopup->Close();
1010  m_busyPopup = nullptr;
1011  }
1012  }
1013  }
1014  else if (levent->type() == MetadataLookupFailure::kEventType)
1015  {
1016  auto *luf = (MetadataLookupFailure *)levent;
1017 
1018  MetadataLookupList lul = luf->m_lookupList;
1019 
1020  if (m_busyPopup)
1021  {
1022  m_busyPopup->Close();
1023  m_busyPopup = nullptr;
1024  }
1025 
1026  if (!lul.empty())
1027  {
1028  MetadataLookup *lookup = lul[0];
1029  LOG(VB_GENERAL, LOG_INFO,
1030  QString("No results found for %1 %2 %3").arg(lookup->GetTitle())
1031  .arg(lookup->GetSeason()).arg(lookup->GetEpisode()));
1032  }
1033  }
1034  else if (levent->type() == ImageDLEvent::kEventType)
1035  {
1036  auto *ide = (ImageDLEvent *)levent;
1037 
1038  MetadataLookup *lookup = ide->m_item;
1039 
1040  if (!lookup)
1041  return;
1042 
1043  handleDownloadedImages(lookup);
1044  }
1045  else if (levent->type() == ImageDLFailureEvent::kEventType)
1046  {
1047  MythErrorNotification n(tr("Failed to retrieve image"),
1048  tr("Metadata Editor"),
1049  tr("Check logs"));
1051  }
1052 }
EditMetadataDialog::FindFanart
void FindFanart()
Definition: editvideometadata.cpp:842
EditMetadataDialog::SetRating
void SetRating()
Definition: editvideometadata.cpp:536
generate_file_url
QString generate_file_url(const QString &storage_group, const QString &host, const QString &path)
Definition: videoutils.h:65
VideoMetadata
Definition: videometadata.h:25
MythUITextEdit::SetMaxLength
void SetMaxLength(int length)
Definition: mythuitextedit.cpp:211
VideoArtworkType
VideoArtworkType
Definition: metadataimagehelper.h:10
EditMetadataDialog::m_bannerText
MythUIText * m_bannerText
Definition: editvideometadata.h:118
EditMetadataDialog::m_busyPopup
MythUIBusyDialog * m_busyPopup
Definition: editvideometadata.h:144
VideoMetadata::SetTrailer
void SetTrailer(const QString &trailer)
Definition: videometadata.cpp:1649
EditMetadataDialog::m_imageDownload
MetadataImageDownload * m_imageDownload
Definition: editvideometadata.h:142
VideoMetadata::SetPlot
void SetPlot(const QString &plot)
Definition: videometadata.cpp:1454
EditMetadataDialog::SetCoverArt
void SetCoverArt(QString file)
Definition: editvideometadata.cpp:768
MythUIButtonList::SetValueByData
void SetValueByData(const QVariant &data)
Definition: mythuibuttonlist.cpp:1542
EditMetadataDialog::SetChild
void SetChild(MythUIButtonListItem *item)
Definition: editvideometadata.cpp:602
mythuitext.h
EditMetadataDialog::createBusyDialog
void createBusyDialog(const QString &title)
Definition: editvideometadata.cpp:282
VideoMetadata::GetShowLevel
ParentalLevel::Level GetShowLevel() const
Definition: videometadata.cpp:1599
VideoMetadata::SetHomepage
void SetHomepage(const QString &homepage)
Definition: videometadata.cpp:1424
MetadataImageDownload
Definition: metadataimagedownload.h:88
SingleValue::add
int add(const QString &name)
Definition: dbaccess.cpp:214
VideoMetadata::SetFanart
void SetFanart(const QString &fanart)
Definition: videometadata.cpp:1689
ParentalLevel::plLowest
@ plLowest
Definition: parentalcontrols.h:12
EditMetadataDialog::m_categoryList
MythUIButtonList * m_categoryList
Definition: editvideometadata.h:108
VideoMetadata::GetHost
const QString & GetHost() const
Definition: videometadata.cpp:1629
EditMetadataDialog::Create
bool Create() override
Definition: editvideometadata.cpp:52
MetadataLookup::GetTitle
QString GetTitle() const
Definition: metadatacommon.h:298
VideoMetadataListManager
Definition: videometadatalistmanager.h:11
MythScreenType::Close
virtual void Close()
Definition: mythscreentype.cpp:402
EditMetadataDialog::m_trailerText
MythUIText * m_trailerText
Definition: editvideometadata.h:122
kMetadataVideo
@ kMetadataVideo
Definition: metadatacommon.h:42
title
QString title
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:639
ArtworkList
QList< ArtworkInfo > ArtworkList
Definition: metadataimagehelper.h:30
EditMetadataDialog::m_screenshot
MythUIImage * m_screenshot
Definition: editvideometadata.h:128
EditMetadataDialog::OnSearchListSelection
void OnSearchListSelection(const ArtworkInfo &info, VideoArtworkType type)
Definition: editvideometadata.cpp:665
MythUIImage::Load
bool Load(bool allowLoadInBackground=true, bool forceStat=false)
Load the image(s), wraps ImageLoader::LoadImage()
Definition: mythuiimage.cpp:968
VideoMetadata::GetChildID
int GetChildID() const
Definition: videometadata.cpp:1539
MythUIBusyDialog::Create
bool Create(void) override
Definition: mythprogressdialog.cpp:32
DialogCompletionEvent::kEventType
static Type kEventType
Definition: mythdialogbox.h:57
ImageDLFailureEvent::kEventType
static Type kEventType
Definition: metadataimagedownload.h:67
EditMetadataDialog::haveResult
void haveResult(bool ok, ArchiveItem *item)
ParentalLevel::plHigh
@ plHigh
Definition: parentalcontrols.h:13
kProbableTelevision
@ kProbableTelevision
Definition: metadatacommon.h:50
VideoMetadata::GetFanart
const QString & GetFanart() const
Definition: videometadata.cpp:1684
EditMetadataDialog::ToggleWatched
void ToggleWatched()
Definition: editvideometadata.cpp:614
MythUICheckBox::GetBooleanCheckState
bool GetBooleanCheckState(void) const
Definition: mythuicheckbox.cpp:103
VideoMetadata::SetEpisode
void SetEpisode(int episode)
Definition: videometadata.cpp:1514
EditMetadataDialog::SaveAndExit
void SaveAndExit()
Definition: editvideometadata.cpp:512
VideoMetadata::SetBanner
void SetBanner(const QString &banner)
Definition: videometadata.cpp:1679
VideoMetadata::SetUserRating
void SetUserRating(float userRating)
Definition: videometadata.cpp:1464
mythdialogbox.h
MythScreenStack
Definition: mythscreenstack.h:16
arg
arg(title).arg(filename).arg(doDelete))
MythWarningNotification
Definition: mythnotification.h:373
GuessLookupType
LookupType GuessLookupType(ProgramInfo *pginfo)
Definition: metadatafactory.cpp:653
ImageDLEvent
Definition: metadataimagedownload.h:19
MetadataDownload
Definition: metadatadownload.h:36
category
QString category
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:1425
VideoMetadata::GetPlayCommand
const QString & GetPlayCommand() const
Definition: videometadata.cpp:1589
MetadataLookup::GetArtwork
ArtworkList GetArtwork(VideoArtworkType type) const
Definition: metadatacommon.cpp:327
EditMetadataDialog::m_bannerButton
MythUIButton * m_bannerButton
Definition: editvideometadata.h:117
VideoMetadata::GetHomepage
const QString & GetHomepage() const
Definition: videometadata.cpp:1419
VideoMetadata::GetSeason
int GetSeason() const
Definition: videometadata.cpp:1499
CheckedSet
void CheckedSet(MythUIStateType *uiItem, const QString &value)
Definition: videoutils.cpp:44
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:23
FileAssociations::getList
const association_list & getList() const
Definition: dbaccess.cpp:805
EditMetadataDialog::SetScreenshot
void SetScreenshot(QString file)
Definition: editvideometadata.cpp:904
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition: mythscreentype.h:45
EditMetadataDialog::m_homepageEdit
MythUITextEdit * m_homepageEdit
Definition: editvideometadata.h:100
EditMetadataDialog::NewCategoryPopup
void NewCategoryPopup()
Definition: editvideometadata.cpp:488
EditMetadataDialog::m_lengthSpin
MythUISpinBox * m_lengthSpin
Definition: editvideometadata.h:107
VideoMetadataListManager::getList
const metadata_list & getList() const
Definition: videometadatalistmanager.cpp:165
EditMetadataDialog::SetLength
void SetLength()
Definition: editvideometadata.cpp:586
MythUITextEdit::GetText
QString GetText(void) const
Definition: mythuitextedit.h:47
build_compdb.file
file
Definition: build_compdb.py:55
mythdirs.h
EditMetadataDialog::SetSubtitle
void SetSubtitle()
Definition: editvideometadata.cpp:526
EditMetadataDialog::m_directorEdit
MythUITextEdit * m_directorEdit
Definition: editvideometadata.h:98
EditMetadataDialog::m_subtitleEdit
MythUITextEdit * m_subtitleEdit
Definition: editvideometadata.h:94
VideoMetadata::SetInetRef
void SetInetRef(const QString &inetRef)
Definition: videometadata.cpp:1404
VideoMetadata::GetCategoryID
int GetCategoryID() const
Definition: videometadata.cpp:1734
VideoMetadata::GetScreenshot
const QString & GetScreenshot() const
Definition: videometadata.cpp:1664
MythUISpinBox::SetRange
void SetRange(int low, int high, int step, uint pageMultiple=5)
Set the lower and upper bounds of the spinbox, the interval and page amount.
Definition: mythuispinbox.cpp:25
remoteutil.h
MythMainWindow::GetStack
MythScreenStack * GetStack(const QString &stackname)
Definition: mythmainwindow.cpp:309
mythuibuttonlist.h
VideoMetadata::GetDirector
const QString & GetDirector() const
Definition: videometadata.cpp:1429
EditMetadataDialog::SetHomepage
void SetHomepage()
Definition: editvideometadata.cpp:556
hardwareprofile.distros.mythtv_data.data_mythtv.prefix
string prefix
Definition: data_mythtv.py:40
mythuiimage.h
VIDEO_CATEGORY_UNKNOWN
const QString VIDEO_CATEGORY_UNKNOWN
Definition: globals.cpp:7
mythprogressdialog.h
VideoMetadata::GetPlot
const QString & GetPlot() const
Definition: videometadata.cpp:1449
VideoMetadata::GetSubtitle
const QString & GetSubtitle() const
Definition: videometadata.cpp:1354
kLookupSearch
@ kLookupSearch
Definition: metadatacommon.h:27
dbaccess.h
MetadataLookup
Definition: metadatacommon.h:87
EditMetadataDialog::m_origMetadata
VideoMetadata * m_origMetadata
Definition: editvideometadata.h:87
EditMetadataDialog::m_coverartText
MythUIText * m_coverartText
Definition: editvideometadata.h:114
EditMetadataDialog::m_levelList
MythUIButtonList * m_levelList
Definition: editvideometadata.h:109
MetadataLookupFailure::kEventType
static Type kEventType
Definition: metadatadownload.h:32
MythUIButtonListItem
Definition: mythuibuttonlist.h:28
EditMetadataDialog::SetPlot
void SetPlot()
Definition: editvideometadata.cpp:561
MythUISpinBox::SetValue
void SetValue(int val) override
Definition: mythuispinbox.h:26
MythUITextEdit::SetText
void SetText(const QString &text, bool moveCursor=true)
Definition: mythuitextedit.cpp:216
EditMetadataDialog::SetSeason
void SetSeason()
Definition: editvideometadata.cpp:566
MetadataLookup::GetDownloads
DownloadMap GetDownloads() const
Definition: metadatacommon.h:371
VideoMetadata::GetInetRef
const QString & GetInetRef() const
Definition: videometadata.cpp:1399
EditMetadataDialog::m_browseCheck
MythUICheckBox * m_browseCheck
Definition: editvideometadata.h:111
EditMetadataDialog::m_metaCache
const VideoMetadataListManager & m_metaCache
Definition: editvideometadata.h:140
MetadataLookup::GetEpisode
uint GetEpisode() const
Definition: metadatacommon.h:314
GetConfDir
QString GetConfDir(void)
Definition: mythdirs.cpp:224
EditMetadataDialog::SetTagline
void SetTagline()
Definition: editvideometadata.cpp:541
EditMetadataDialog::SetInetRef
void SetInetRef()
Definition: editvideometadata.cpp:551
MetadataLookupFailure
Definition: metadatadownload.h:24
ArtworkInfo
Definition: metadataimagehelper.h:22
ImageSearchResultsDialog
Definition: mythuiimageresults.h:11
globals.h
hardwareprofile.i18n.t
t
Definition: i18n.py:36
EditMetadataDialog::m_screenshotButton
MythUIButton * m_screenshotButton
Definition: editvideometadata.h:115
RefCountedList< MetadataLookup >
EditMetadataDialog::m_coverartButton
MythUIButton * m_coverartButton
Definition: editvideometadata.h:113
EditMetadataDialog::FindNetScreenshot
void FindNetScreenshot()
Definition: editvideometadata.cpp:763
MetadataLookup::GetData
QVariant GetData() const
Definition: metadatacommon.h:287
EditMetadataDialog::m_coverart
MythUIImage * m_coverart
Definition: editvideometadata.h:127
FileAssociations::association_list
std::vector< file_association > association_list
Definition: dbaccess.h:154
MythUISpinBox::GetIntValue
int GetIntValue(void) const override
Definition: mythuispinbox.h:33
EditMetadataDialog::m_watchedCheck
MythUICheckBox * m_watchedCheck
Definition: editvideometadata.h:112
VideoMetadata::SetLength
void SetLength(int length)
Definition: videometadata.cpp:1484
EditMetadataDialog::m_userRatingSpin
MythUISpinBox * m_userRatingSpin
Definition: editvideometadata.h:106
EditMetadataDialog::m_doneButton
MythUIButton * m_doneButton
Definition: editvideometadata.h:131
MythScreenType::BuildFocusList
void BuildFocusList(void)
Definition: mythscreentype.cpp:222
EditMetadataDialog::FindScreenshot
void FindScreenshot()
Definition: editvideometadata.cpp:887
EditMetadataDialog::m_netScreenshotButton
MythUIButton * m_netScreenshotButton
Definition: editvideometadata.h:126
MythErrorNotification
Definition: mythnotification.h:362
kArtworkFanart
@ kArtworkFanart
Definition: metadataimagehelper.h:12
VideoMetadata::GetYear
int GetYear() const
Definition: videometadata.cpp:1379
EditMetadataDialog::m_cachedChildSelection
int m_cachedChildSelection
Definition: editvideometadata.h:138
filename
QString filename
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:640
EditMetadataDialog::FindNetArt
void FindNetArt(VideoArtworkType type)
Definition: editvideometadata.cpp:721
editvideometadata.h
MythUIBusyDialog
Definition: mythprogressdialog.h:37
MetadataDownload::addLookup
void addLookup(MetadataLookup *lookup)
addLookup: Add lookup to bottom of the queue MetadataDownload::m_lookupList takes ownership of the gi...
Definition: metadatadownload.cpp:35
mythuifilebrowser.h
EditMetadataDialog::SetDirector
void SetDirector()
Definition: editvideometadata.cpp:546
EditMetadataDialog::m_inetrefEdit
MythUITextEdit * m_inetrefEdit
Definition: editvideometadata.h:99
EditMetadataDialog::SetFanart
void SetFanart(QString file)
Definition: editvideometadata.cpp:858
MythUIStateType::Full
@ Full
Definition: mythuistatetype.h:25
EditMetadataDialog::SetPlayer
void SetPlayer()
Definition: editvideometadata.cpp:591
EditMetadataDialog::m_screenshotText
MythUIText * m_screenshotText
Definition: editvideometadata.h:116
VideoCategory::GetCategory
static VideoCategory & GetCategory()
Definition: dbaccess.cpp:487
VideoMetadata::SetSubtitle
void SetSubtitle(const QString &subtitle, const QString &sortSubtitle="")
Definition: videometadata.cpp:1364
naturalCompare
int naturalCompare(const QString &_a, const QString &_b, Qt::CaseSensitivity caseSensitivity)
Definition: mythmiscutil.cpp:1031
MythUIButtonListItem::GetData
QVariant GetData()
Definition: mythuibuttonlist.cpp:3580
EditMetadataDialog::SetTitle
void SetTitle()
Definition: editvideometadata.cpp:521
EditMetadataDialog::FindCoverArt
void FindCoverArt()
Definition: editvideometadata.cpp:620
EditMetadataDialog::SetUserRating
void SetUserRating()
Definition: editvideometadata.cpp:581
EditMetadataDialog::m_ratingEdit
MythUITextEdit * m_ratingEdit
Definition: editvideometadata.h:97
VideoMetadata::GetEpisode
int GetEpisode() const
Definition: videometadata.cpp:1509
gCoreContext
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
Definition: mythcorecontext.cpp:57
MythUIFileBrowser
Definition: mythuifilebrowser.h:81
EditMetadataDialog::Finished
void Finished()
videometadatalistmanager.h
EditMetadataDialog::SetTrailer
void SetTrailer(QString file)
Definition: editvideometadata.cpp:949
UIUtilDisp::Assign
static bool Assign(ContainerType *container, UIType *&item, const QString &name, bool *err=nullptr)
Definition: mythuiutils.h:27
MetadataLookup::GetSeason
uint GetSeason() const
Definition: metadatacommon.h:313
VideoMetadata::SetPlayCommand
void SetPlayCommand(const QString &playCommand)
Definition: videometadata.cpp:1594
VideoMetadata::SetTagline
void SetTagline(const QString &tagline)
Definition: videometadata.cpp:1374
EditMetadataDialog::SetEpisode
void SetEpisode()
Definition: editvideometadata.cpp:571
EditMetadataDialog::m_popupStack
MythScreenStack * m_popupStack
Definition: editvideometadata.h:145
kUnknownVideo
@ kUnknownVideo
Definition: metadatacommon.h:53
VideoMetadata::SetCategoryID
void SetCategoryID(int id)
Definition: videometadata.cpp:1739
mythuispinbox.h
FileAssociations::getFileAssociation
static FileAssociations & getFileAssociation()
Definition: dbaccess.cpp:830
mythuihelper.h
VideoMetadata::SetSeason
void SetSeason(int season)
Definition: videometadata.cpp:1504
VideoMetadata::SetRating
void SetRating(const QString &rating)
Definition: videometadata.cpp:1474
EditMetadataDialog::~EditMetadataDialog
~EditMetadataDialog() override
Definition: editvideometadata.cpp:47
EditMetadataDialog::m_taglineEdit
MythUITextEdit * m_taglineEdit
Definition: editvideometadata.h:95
SingleValue::getList
const entry_list & getList()
Definition: dbaccess.cpp:239
MetadataLookupEvent::kEventType
static Type kEventType
Definition: metadatadownload.h:20
mythmiscutil.h
EditMetadataDialog::handleDownloadedImages
void handleDownloadedImages(MetadataLookup *lookup)
Definition: editvideometadata.cpp:691
VideoMetadata::SetCoverFile
void SetCoverFile(const QString &coverFile)
Definition: videometadata.cpp:1659
EditMetadataDialog::customEvent
void customEvent(QEvent *levent) override
Definition: editvideometadata.cpp:969
EditMetadataDialog::m_netBannerButton
MythUIButton * m_netBannerButton
Definition: editvideometadata.h:125
EditMetadataDialog::m_seasonSpin
MythUISpinBox * m_seasonSpin
Definition: editvideometadata.h:103
mythuitextedit.h
MythUICheckBox::SetCheckState
void SetCheckState(MythUIStateType::StateType state)
Definition: mythuicheckbox.cpp:66
XMLParseBase::LoadWindowFromXML
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
Definition: xmlparsebase.cpp:692
EditMetadataDialog::ToggleBrowse
void ToggleBrowse()
Definition: editvideometadata.cpp:608
VideoMetadata::SetDirector
void SetDirector(const QString &director)
Definition: videometadata.cpp:1434
EditMetadataDialog::m_netFanartButton
MythUIButton * m_netFanartButton
Definition: editvideometadata.h:124
VideoMetadata::GetUserRating
float GetUserRating() const
Definition: videometadata.cpp:1459
EditMetadataDialog::SetCategory
void SetCategory(MythUIButtonListItem *item)
Definition: editvideometadata.cpp:531
ParentalLevel
Definition: parentalcontrols.h:10
VideoMetadata::UpdateDatabase
void UpdateDatabase()
Definition: videometadata.cpp:1749
EditMetadataDialog::AddCategory
void AddCategory(const QString &category)
Definition: editvideometadata.cpp:504
EditMetadataDialog::FindNetBanner
void FindNetBanner()
Definition: editvideometadata.cpp:758
VideoMetadata::GetWatched
bool GetWatched() const
Definition: videometadata.cpp:1559
DialogCompletionEvent
Event dispatched from MythUI modal dialogs to a listening class containing a result of some form.
Definition: mythdialogbox.h:42
EditMetadataDialog::m_banner
MythUIImage * m_banner
Definition: editvideometadata.h:129
VideoMetadata::GetCoverFile
const QString & GetCoverFile() const
Definition: videometadata.cpp:1654
VideoMetadata::SetTitle
void SetTitle(const QString &title, const QString &sortTitle="")
Definition: videometadata.cpp:1349
MythUIText::SetText
virtual void SetText(const QString &text)
Definition: mythuitext.cpp:134
GetNotificationCenter
MythNotificationCenter * GetNotificationCenter(void)
Definition: mythmainwindow.cpp:127
mythcontext.h
metadatafactory.h
EditMetadataDialog::m_episodeSpin
MythUISpinBox * m_episodeSpin
Definition: editvideometadata.h:104
mythuiimageresults.h
GetMythMainWindow
MythMainWindow * GetMythMainWindow(void)
Definition: mythmainwindow.cpp:107
kArtworkBanner
@ kArtworkBanner
Definition: metadataimagehelper.h:13
VideoMetadata::GetID
unsigned int GetID() const
Definition: videometadata.cpp:1529
VideoMetadata::SetYear
void SetYear(int year)
Definition: videometadata.cpp:1384
EditMetadataDialog::m_workingMetadata
VideoMetadata * m_workingMetadata
Definition: editvideometadata.h:86
EditMetadataDialog::m_fanart
MythUIImage * m_fanart
Definition: editvideometadata.h:130
VideoMetadata::GetTitle
const QString & GetTitle() const
Definition: videometadata.cpp:1339
mythuibutton.h
EditMetadataDialog::m_childList
MythUIButtonList * m_childList
Definition: editvideometadata.h:110
VideoMetadata::SetScreenshot
void SetScreenshot(const QString &screenshot)
Definition: videometadata.cpp:1669
VideoMetadataListManager::metadata_list
std::list< VideoMetadataPtr > metadata_list
Definition: videometadatalistmanager.h:14
ArtworkMap
QMultiMap< VideoArtworkType, ArtworkInfo > ArtworkMap
Definition: metadataimagehelper.h:31
EditMetadataDialog::m_trailerButton
MythUIButton * m_trailerButton
Definition: editvideometadata.h:121
VideoMetadata::GetTrailer
const QString & GetTrailer() const
Definition: videometadata.cpp:1644
EditMetadataDialog::FindNetFanart
void FindNetFanart()
Definition: editvideometadata.cpp:753
EditMetadataDialog::m_fanartText
MythUIText * m_fanartText
Definition: editvideometadata.h:120
SingleValue::entry_list
std::vector< entry > entry_list
Definition: dbaccess.h:16
EditMetadataDialog::FindBanner
void FindBanner()
Definition: editvideometadata.cpp:797
EditMetadataDialog::m_query
MetadataDownload * m_query
Definition: editvideometadata.h:141
VideoMetadata::GetRating
const QString & GetRating() const
Definition: videometadata.cpp:1469
EditMetadataDialog::FindNetCoverArt
void FindNetCoverArt()
Definition: editvideometadata.cpp:748
MythTextInputDialog
Dialog prompting the user to enter a text string.
Definition: mythdialogbox.h:264
kArtworkScreenshot
@ kArtworkScreenshot
Definition: metadataimagehelper.h:14
mythuicheckbox.h
MythUIImage::SetFilename
void SetFilename(const QString &filename)
Must be followed by a call to Load() to load the image.
Definition: mythuiimage.cpp:676
MythUIType::LosingFocus
void LosingFocus()
VideoMetadata::GetTagline
const QString & GetTagline() const
Definition: videometadata.cpp:1369
VideoMetadata::GetBrowse
bool GetBrowse() const
Definition: videometadata.cpp:1549
VideoMetadata::GetBanner
const QString & GetBanner() const
Definition: videometadata.cpp:1674
kProbableMovie
@ kProbableMovie
Definition: metadatacommon.h:52
mythmainwindow.h
EditMetadataDialog::m_yearSpin
MythUISpinBox * m_yearSpin
Definition: editvideometadata.h:105
MythScreenStack::AddScreen
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
Definition: mythscreenstack.cpp:49
ParentalLevel::GetLevel
Level GetLevel() const
Definition: parentalcontrols.cpp:128
EditMetadataDialog::m_titleEdit
MythUITextEdit * m_titleEdit
Definition: editvideometadata.h:93
MetadataLookupEvent
Definition: metadatadownload.h:12
kArtworkCoverart
@ kArtworkCoverart
Definition: metadataimagehelper.h:11
EditMetadataDialog::SetYear
void SetYear()
Definition: editvideometadata.cpp:576
VideoMetadata::SetChildID
void SetChildID(int childID)
Definition: videometadata.cpp:1544
EditMetadataDialog::m_playerEdit
MythUITextEdit * m_playerEdit
Definition: editvideometadata.h:96
EditMetadataDialog::m_fanartButton
MythUIButton * m_fanartButton
Definition: editvideometadata.h:119
videoutils.h
EditMetadataDialog::m_netCoverartButton
MythUIButton * m_netCoverartButton
Definition: editvideometadata.h:123
EditMetadataDialog::OnArtworkSearchDone
void OnArtworkSearchDone(MetadataLookup *lookup)
Definition: editvideometadata.cpp:636
EditMetadataDialog::FindTrailer
void FindTrailer()
Definition: editvideometadata.cpp:933
EditMetadataDialog::EditMetadataDialog
EditMetadataDialog(MythScreenStack *lparent, const QString &lname, VideoMetadata *source_metadata, const VideoMetadataListManager &cache)
Definition: editvideometadata.cpp:34
EditMetadataDialog::SetBanner
void SetBanner(QString file)
Definition: editvideometadata.cpp:813
EditMetadataDialog::SetLevel
void SetLevel(MythUIButtonListItem *item)
Definition: editvideometadata.cpp:596
EditMetadataDialog::m_plotEdit
MythUITextEdit * m_plotEdit
Definition: editvideometadata.h:101
ImageDLEvent::kEventType
static Type kEventType
Definition: metadataimagedownload.h:41
MythCoreContext::GetSetting
QString GetSetting(const QString &key, const QString &defaultval="")
Definition: mythcorecontext.cpp:916
ArtworkInfo::url
QString url
Definition: metadataimagehelper.h:25
VideoMetadata::GetLength
int GetLength() const
Definition: videometadata.cpp:1479
MetadataImageDownload::addDownloads
void addDownloads(MetadataLookup *lookup)
addLookup: Add lookup to bottom of the queue MetadataDownload::m_downloadList takes ownership of the ...
Definition: metadataimagedownload.cpp:53
MythNotificationCenter::Queue
bool Queue(const MythNotification &notification)
Queue a notification Queue() is thread-safe and can be called from anywhere.
Definition: mythnotificationcenter.cpp:1351
EditMetadataDialog::fillWidgets
void fillWidgets()
Definition: editvideometadata.cpp:296