Skip to content
Browse files

Metadata Lookup: Initial commit of Schedule Editor UI.

This is the Inetref, Season and Episode portion of the Schedule editor UI.  This allows one to assign a inetref to a recording rule as I have documented here:

http://www.mythtv.org/wiki/Enhancing_Recordings_with_Metadata_Lookup

I have commented out the Artwork buttons for now-- until #9895 and #9896 are fixed it's unfinishable.

So, in short, one should now be able to go and perform automatic lookups on their recording rules, and the bits committed over the last few days should now automatically run on recording shortly after they begin and fill in season, episode, etc.

I have updated Terra, MythCenter, and MythCenter-wide for the basics, as well as default and default-wide.  There's a lot more that could be done in those themes.  Current Arclight isn't yet in the theme downloader, but you can get it here:

http://www.fecitfacta.com/Arclight.tar.gz

Arclight is also (currently) the only theme that actually displays the season and episode in the PBB (it's in the subtitle field on the left).  You can test that you have everything working by running "mythmetadatalookup" without arguments (which will fill in the data for all your recordings), then going to the PBB and looking at that field.  Once you've assigned inetrefs to all your recording rules, the accuracy should go way up (though it should work very well without doing so).
  • Loading branch information...
1 parent c33d81c commit 444cfe9c7912bd3b45850f0bd893f1315bccf1b8 Robert McNamara committed Jul 3, 2011
View
531 mythtv/programs/mythfrontend/scheduleeditor.cpp
@@ -26,6 +26,11 @@
#include "mythuispinbox.h"
#include "mythuicheckbox.h"
#include "mythdialogbox.h"
+#include "mythprogressdialog.h"
+#include "mythuifilebrowser.h"
+#include "mythuimetadataresults.h"
+#include "mythuiimageresults.h"
+#include "videoutils.h"
#include "mythuiutils.h"
// Mythfrontend
@@ -73,7 +78,8 @@ ScheduleEditor::ScheduleEditor(MythScreenStack *parent,
m_saveButton(NULL), m_cancelButton(NULL), m_rulesList(NULL),
m_schedOptButton(NULL), m_storeOptButton(NULL),
m_postProcButton(NULL), m_schedInfoButton(NULL),
- m_previewButton(NULL), m_player(player)
+ m_previewButton(NULL), m_metadataButton(NULL),
+ m_player(player)
{
m_recordingRule = new RecordingRule();
m_recordingRule->m_recordID = m_recInfo->GetRecordingRuleID();
@@ -87,7 +93,8 @@ ScheduleEditor::ScheduleEditor(MythScreenStack *parent,
m_saveButton(NULL), m_cancelButton(NULL), m_rulesList(NULL),
m_schedOptButton(NULL), m_storeOptButton(NULL),
m_postProcButton(NULL), m_schedInfoButton(NULL),
- m_previewButton(NULL), m_player(player)
+ m_previewButton(NULL), m_metadataButton(NULL),
+ m_player(player)
{
}
@@ -117,6 +124,7 @@ bool ScheduleEditor::Create()
UIUtilE::Assign(this, m_postProcButton, "postprocessing", &err);
UIUtilE::Assign(this, m_schedInfoButton, "schedinfo", &err);
UIUtilE::Assign(this, m_previewButton, "preview", &err);
+ UIUtilW::Assign(this, m_metadataButton, "metadata");
UIUtilE::Assign(this, m_cancelButton, "cancel", &err);
UIUtilE::Assign(this, m_saveButton, "save", &err);
@@ -136,6 +144,8 @@ bool ScheduleEditor::Create()
connect(m_postProcButton, SIGNAL(Clicked()), SLOT(ShowPostProc()));
connect(m_schedInfoButton, SIGNAL(Clicked()), SLOT(ShowSchedInfo()));
connect(m_previewButton, SIGNAL(Clicked()), SLOT(ShowPreview()));
+ if (m_metadataButton)
+ connect(m_metadataButton, SIGNAL(Clicked()), SLOT(ShowMetadataOptions()));
connect(m_cancelButton, SIGNAL(Clicked()), SLOT(Close()));
connect(m_saveButton, SIGNAL(Clicked()), SLOT(Save()));
@@ -451,6 +461,17 @@ void ScheduleEditor::ShowPreview(void)
m_recordingRule->UseTempTable(false);
}
+void ScheduleEditor::ShowMetadataOptions(void)
+{
+ MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
+ MetadataOptions *rad = new MetadataOptions(mainStack, m_recInfo,
+ m_recordingRule);
+ if (rad->Create())
+ mainStack->AddScreen(rad);
+ else
+ delete rad;
+}
+
////////////////////////////////////////////////////////
/** \class SchedOptEditor
@@ -1136,7 +1157,7 @@ PostProcEditor::PostProcEditor(MythScreenStack *parent,
m_commflagCheck(NULL), m_transcodeCheck(NULL),
m_transcodeprofileList(NULL), m_userjob1Check(NULL),
m_userjob2Check(NULL), m_userjob3Check(NULL),
- m_userjob4Check(NULL)
+ m_userjob4Check(NULL), m_metadataLookupCheck(NULL)
{
if (recInfo)
m_recInfo = new RecordingInfo(*recInfo);
@@ -1160,6 +1181,7 @@ bool PostProcEditor::Create()
UIUtilE::Assign(this, m_userjob2Check, "userjob2", &err);
UIUtilE::Assign(this, m_userjob3Check, "userjob3", &err);
UIUtilE::Assign(this, m_userjob4Check, "userjob4", &err);
+ UIUtilW::Assign(this, m_metadataLookupCheck, "metadatalookup");
if (err)
{
@@ -1230,6 +1252,10 @@ void PostProcEditor::Load()
userjob4Text->SetText(tr("Run '%1'")
.arg(gCoreContext->GetSetting("UserJobDesc4", "User Job 4")));
+ // Auto Metadata Lookup
+ if (m_metadataLookupCheck)
+ m_metadataLookupCheck->SetCheckState(m_recordingRule->m_autoMetadataLookup);
+
InfoMap progMap;
if (m_recInfo)
m_recInfo->ToMap(progMap);
@@ -1265,10 +1291,509 @@ void PostProcEditor::Save()
// User Job #4
m_recordingRule->m_autoUserJob4 = m_userjob4Check->GetBooleanCheckState();
+
+ // Auto Metadata Lookup
+ if (m_metadataLookupCheck)
+ m_recordingRule->m_autoMetadataLookup = m_metadataLookupCheck->GetBooleanCheckState();
}
void PostProcEditor::Close()
{
Save();
MythScreenType::Close();
}
+
+/////////////////////////////
+
+/** \class MetadataOptions
+ * \brief Select artwork and inetref for recordings
+ *
+ */
+
+MetadataOptions::MetadataOptions(MythScreenStack *parent,
+ RecordingInfo *recInfo,
+ RecordingRule *rule)
+ : MythScreenType(parent, "MetadataOptions"),
+ m_recInfo(NULL), m_recordingRule(rule), m_lookup(NULL),
+ m_busyPopup(NULL), m_fanart(NULL), m_coverart(NULL),
+ m_banner(NULL), m_inetrefEdit(NULL), m_seasonSpin(NULL),
+ m_episodeSpin(NULL), m_queryButton(NULL), m_localFanartButton(NULL),
+ m_localCoverartButton(NULL), m_localBannerButton(NULL),
+ m_onlineFanartButton(NULL), m_onlineCoverartButton(NULL),
+ m_onlineBannerButton(NULL), m_backButton(NULL)
+{
+ m_popupStack = GetMythMainWindow()->GetStack("popup stack");
+
+ m_metadataFactory = new MetadataFactory(this);
+ m_imageLookup = new MetadataDownload(this);
+ m_imageDownload = new MetadataImageDownload(this);
+
+ if (recInfo)
+ m_recInfo = new RecordingInfo(*recInfo);
+}
+
+MetadataOptions::~MetadataOptions(void)
+{
+ Save();
+
+ if (m_imageLookup)
+ {
+ m_imageLookup->cancel();
+ delete m_imageLookup;
+ m_imageLookup = NULL;
+ }
+
+ if (m_imageDownload)
+ {
+ m_imageDownload->cancel();
+ delete m_imageDownload;
+ m_imageDownload = NULL;
+ }
+}
+
+bool MetadataOptions::Create()
+{
+ if (!LoadWindowFromXML("schedule-ui.xml", "metadataoptions", this))
+ return false;
+
+ bool err = false;
+
+ UIUtilE::Assign(this, m_inetrefEdit, "inetref_edit", &err);
+ UIUtilE::Assign(this, m_seasonSpin, "season_spinbox", &err);
+ UIUtilE::Assign(this, m_episodeSpin, "episode_spinbox", &err);
+ UIUtilE::Assign(this, m_queryButton, "query_button", &err);
+/* UIUtilE::Assign(this, m_localFanartButton, "local_fanart_button", &err);
+ UIUtilE::Assign(this, m_localCoverartButton, "local_coverart_button", &err);
+ UIUtilE::Assign(this, m_localBannerButton, "local_banner_button", &err);
+ UIUtilE::Assign(this, m_onlineFanartButton, "online_fanart_button", &err);
+ UIUtilE::Assign(this, m_onlineCoverartButton, "online_coverart_button", &err);
+ UIUtilE::Assign(this, m_onlineBannerButton, "online_banner_button", &err);
+ UIUtilW::Assign(this, m_fanart, "fanart");
+ UIUtilW::Assign(this, m_coverart, "coverart");
+ UIUtilW::Assign(this, m_banner, "banner");*/
+ UIUtilW::Assign(this, m_backButton, "back");
+
+ if (err)
+ {
+ VERBOSE(VB_IMPORTANT, "MetadataOptions, theme is missing "
+ "required elements");
+ return false;
+ }
+
+ connect(m_backButton, SIGNAL(Clicked()),
+ SLOT(Close()));
+ connect(m_queryButton, SIGNAL(Clicked()),
+ SLOT(PerformQuery()));
+/* connect(m_localFanartButton, SIGNAL(Clicked()),
+ SLOT(SelectLocalFanart()));
+ connect(m_localCoverartButton, SIGNAL(Clicked()),
+ SLOT(SelectLocalCoverart()));
+ connect(m_localBannerButton, SIGNAL(Clicked()),
+ SLOT(SelectLocalBanner()));
+ connect(m_onlineFanartButton, SIGNAL(Clicked()),
+ SLOT(SelectOnlineFanart()));
+ connect(m_onlineCoverartButton, SIGNAL(Clicked()),
+ SLOT(SelectOnlineCoverart()));
+ connect(m_onlineBannerButton, SIGNAL(Clicked()),
+ SLOT(SelectOnlineBanner()));*/
+
+ // InetRef
+ m_inetrefEdit->SetText(m_recordingRule->m_inetref);
+
+ // Season
+ m_seasonSpin->SetRange(0,100,1,1);
+ m_seasonSpin->SetValue(m_recordingRule->m_season);
+
+ // Episode
+ m_episodeSpin->SetRange(0,100,1,1);
+ m_episodeSpin->SetValue(m_recordingRule->m_episode);
+
+ BuildFocusList();
+
+ return true;
+}
+
+void MetadataOptions::Load()
+{
+ if (m_recordingRule->m_inetref.isEmpty())
+ {
+ CreateBusyDialog("Trying to automatically find this "
+ "recording online...");
+
+ m_metadataFactory->Lookup(m_recordingRule, false, false);
+ }
+
+ InfoMap progMap;
+ if (m_recInfo)
+ m_recInfo->ToMap(progMap);
+ else
+ m_recordingRule->ToMap(progMap);
+ SetTextFromMap(progMap);
+}
+
+void MetadataOptions::CreateBusyDialog(QString title)
+{
+ if (m_busyPopup)
+ return;
+
+ QString message = title;
+
+ m_busyPopup = new MythUIBusyDialog(message, m_popupStack,
+ "metaoptsdialog");
+
+ if (m_busyPopup->Create())
+ m_popupStack->AddScreen(m_busyPopup);
+}
+
+void MetadataOptions::PerformQuery()
+{
+ if (!m_lookup)
+ m_lookup = new MetadataLookup();
+
+ CreateBusyDialog("Trying to manually find this "
+ "recording online...");
+
+ m_lookup->SetStep(SEARCH);
+ m_lookup->SetType(RECDNG);
+ m_lookup->SetAutomatic(false);
+ m_lookup->SetHandleImages(false);
+ m_lookup->SetHost(gCoreContext->GetMasterHostName());
+ m_lookup->SetTitle(m_recordingRule->m_title);
+ m_lookup->SetSubtitle(m_recordingRule->m_subtitle);
+ m_lookup->SetInetref(m_inetrefEdit->GetText());
+ m_lookup->SetSeason(m_seasonSpin->GetIntValue());
+ m_lookup->SetEpisode(m_episodeSpin->GetIntValue());
+
+ m_metadataFactory->Lookup(m_lookup);
+}
+
+void MetadataOptions::OnSearchListSelection(MetadataLookup *lookup)
+{
+ if (!lookup)
+ return;
+
+ m_lookup = lookup;
+
+ m_metadataFactory->Lookup(lookup);
+}
+
+void MetadataOptions::OnImageSearchListSelection(ArtworkInfo info,
+ VideoArtworkType type)
+{
+ QString msg = tr("Downloading selected artwork...");
+ CreateBusyDialog(msg);
+
+ m_lookup = new MetadataLookup();
+ m_lookup->SetType(VID);
+ m_lookup->SetHost(gCoreContext->GetMasterHostName());
+ m_lookup->SetAutomatic(true);
+ m_lookup->SetData(qVariantFromValue<VideoArtworkType>(type));
+
+ ArtworkMap downloads;
+ downloads.insert(type, info);
+ m_lookup->SetDownloads(downloads);
+ m_lookup->SetAllowOverwrites(true);
+ m_lookup->SetTitle(m_recordingRule->m_title);
+ m_lookup->SetSubtitle(m_recordingRule->m_subtitle);
+ m_lookup->SetInetref(m_inetrefEdit->GetText());
+ m_lookup->SetSeason(m_seasonSpin->GetIntValue());
+ m_lookup->SetEpisode(m_episodeSpin->GetIntValue());
+
+ m_imageDownload->addDownloads(m_lookup);
+}
+
+void MetadataOptions::SelectLocalFanart()
+{
+ QString url = generate_file_url("Fanart",
+ gCoreContext->GetMasterHostName(),
+ "");
+ FindImagePopup(url,"",*this, "fanart");
+}
+
+void MetadataOptions::SelectLocalCoverart()
+{
+ QString url = generate_file_url("Coverart",
+ gCoreContext->GetMasterHostName(),
+ "");
+ FindImagePopup(url,"",*this, "coverart");
+}
+
+void MetadataOptions::SelectLocalBanner()
+{
+ QString url = generate_file_url("Banners",
+ gCoreContext->GetMasterHostName(),
+ "");
+ FindImagePopup(url,"",*this, "banner");
+}
+
+void MetadataOptions::SelectOnlineFanart()
+{
+ FindNetArt(FANART);
+}
+
+void MetadataOptions::SelectOnlineCoverart()
+{
+ FindNetArt(COVERART);
+}
+
+void MetadataOptions::SelectOnlineBanner()
+{
+ FindNetArt(BANNER);
+}
+
+void MetadataOptions::Save()
+{
+ // Season
+ if (m_seasonSpin)
+ m_recordingRule->m_season = m_seasonSpin->GetIntValue();
+
+ // Episode
+ if (m_episodeSpin)
+ m_recordingRule->m_episode = m_episodeSpin->GetIntValue();
+
+ // InetRef
+ if (m_inetrefEdit)
+ m_recordingRule->m_inetref = m_inetrefEdit->GetText();
+}
+
+void MetadataOptions::QueryComplete(MetadataLookup *lookup)
+{
+ if (!lookup)
+ return;
+
+ m_lookup = lookup;
+
+ // InetRef
+ m_inetrefEdit->SetText(m_lookup->GetInetref());
+
+ // Season
+ m_seasonSpin->SetValue(m_lookup->GetSeason());
+
+ // Episode
+ m_episodeSpin->SetValue(m_lookup->GetEpisode());
+
+ MetadataMap metadataMap;
+ lookup->toMap(metadataMap);
+ SetTextFromMap(metadataMap);
+}
+
+void MetadataOptions::FindImagePopup(const QString &prefix,
+ const QString &prefixAlt,
+ QObject &inst,
+ const QString &returnEvent)
+{
+ QString fp;
+
+ if (prefix.startsWith("myth://"))
+ fp = prefix;
+ else
+ fp = prefix.isEmpty() ? prefixAlt : prefix;
+
+ MythScreenStack *popupStack =
+ GetMythMainWindow()->GetStack("popup stack");
+
+ MythUIFileBrowser *fb = new MythUIFileBrowser(popupStack, fp);
+ fb->SetNameFilter(GetSupportedImageExtensionFilter());
+ if (fb->Create())
+ {
+ fb->SetReturnEvent(&inst, returnEvent);
+ popupStack->AddScreen(fb);
+ }
+ else
+ delete fb;
+}
+
+QStringList MetadataOptions::GetSupportedImageExtensionFilter()
+{
+ QStringList ret;
+
+ QList<QByteArray> exts = QImageReader::supportedImageFormats();
+ for (QList<QByteArray>::iterator p = exts.begin(); p != exts.end(); ++p)
+ {
+ ret.append(QString("*.").append(*p));
+ }
+
+ return ret;
+}
+
+void MetadataOptions::FindNetArt(VideoArtworkType type)
+{
+ if (!m_lookup)
+ m_lookup = new MetadataLookup();
+
+ QString msg = tr("Searching for available artwork...");
+ CreateBusyDialog(msg);
+
+ m_lookup->SetStep(SEARCH);
+ m_lookup->SetType(RECDNG);
+ m_lookup->SetAutomatic(true);
+ m_lookup->SetHandleImages(false);
+ m_lookup->SetData(qVariantFromValue<VideoArtworkType>(type));
+ m_lookup->SetHost(gCoreContext->GetMasterHostName());
+ m_lookup->SetTitle(m_recordingRule->m_title);
+ m_lookup->SetSubtitle(m_recordingRule->m_subtitle);
+ m_lookup->SetInetref(m_inetrefEdit->GetText());
+ m_lookup->SetSeason(m_seasonSpin->GetIntValue());
+ m_lookup->SetEpisode(m_episodeSpin->GetIntValue());
+
+ m_imageLookup->addLookup(m_lookup);
+}
+
+void MetadataOptions::OnArtworkSearchDone(MetadataLookup *lookup)
+{
+ if (!lookup)
+ return;
+
+ if (m_busyPopup)
+ {
+ m_busyPopup->Close();
+ m_busyPopup = NULL;
+ }
+
+ VideoArtworkType type = qVariantValue<VideoArtworkType>(lookup->GetData());
+ ArtworkList list = lookup->GetArtwork(type);
+
+ if (list.count() == 0)
+ return;
+
+ ImageSearchResultsDialog *resultsdialog =
+ new ImageSearchResultsDialog(m_popupStack, list, type);
+
+ connect(resultsdialog, SIGNAL(haveResult(ArtworkInfo, VideoArtworkType)),
+ SLOT(OnImageSearchListSelection(ArtworkInfo, VideoArtworkType)));
+
+ if (resultsdialog->Create())
+ m_popupStack->AddScreen(resultsdialog);
+}
+
+void MetadataOptions::customEvent(QEvent *levent)
+{
+ if (levent->type() == MetadataFactoryMultiResult::kEventType)
+ {
+ if (m_busyPopup)
+ {
+ m_busyPopup->Close();
+ m_busyPopup = NULL;
+ }
+
+ MetadataFactoryMultiResult *mfmr = dynamic_cast<MetadataFactoryMultiResult*>(levent);
+
+ if (!mfmr)
+ return;
+
+ MetadataLookupList list = mfmr->results;
+
+ if (list.count() > 1)
+ {
+ MetadataResultsDialog *resultsdialog =
+ new MetadataResultsDialog(m_popupStack, list);
+
+ connect(resultsdialog, SIGNAL(haveResult(MetadataLookup*)),
+ SLOT(OnSearchListSelection(MetadataLookup*)),
+ Qt::QueuedConnection);
+
+ if (resultsdialog->Create())
+ m_popupStack->AddScreen(resultsdialog);
+ }
+ }
+ else if (levent->type() == MetadataFactorySingleResult::kEventType)
+ {
+ if (m_busyPopup)
+ {
+ m_busyPopup->Close();
+ m_busyPopup = NULL;
+ }
+
+ MetadataFactorySingleResult *mfsr = dynamic_cast<MetadataFactorySingleResult*>(levent);
+
+ if (!mfsr)
+ return;
+
+ MetadataLookup *lookup = mfsr->result;
+
+ if (!lookup)
+ return;
+
+ QueryComplete(lookup);
+ }
+ else if (levent->type() == MetadataFactoryNoResult::kEventType)
+ {
+ if (m_busyPopup)
+ {
+ m_busyPopup->Close();
+ m_busyPopup = NULL;
+ }
+
+ QString title = "No match found for this recording. You can "
+ "try entering a TVDB/TMDB number, season, and "
+ "episode manually.";
+
+ MythConfirmationDialog *okPopup =
+ new MythConfirmationDialog(m_popupStack, title, false);
+
+ if (okPopup->Create())
+ m_popupStack->AddScreen(okPopup);
+ }
+ else if (levent->type() == MetadataLookupEvent::kEventType)
+ {
+ if (m_busyPopup)
+ {
+ m_busyPopup->Close();
+ m_busyPopup = NULL;
+ }
+
+ MetadataLookupEvent *lue = (MetadataLookupEvent *)levent;
+
+ MetadataLookupList lul = lue->lookupList;
+
+ if (lul.isEmpty())
+ return;
+
+ if (lul.count() >= 1)
+ {
+ OnArtworkSearchDone(lul.takeFirst());
+ }
+ }
+ else if (levent->type() == MetadataLookupFailure::kEventType)
+ {
+ if (m_busyPopup)
+ {
+ m_busyPopup->Close();
+ m_busyPopup = NULL;
+ }
+
+ MetadataLookupFailure *luf = (MetadataLookupFailure *)levent;
+
+ MetadataLookupList lul = luf->lookupList;
+
+ if (lul.size())
+ {
+ MetadataLookup *lookup = lul.takeFirst();
+
+ QString title = "This number, season, and episode combination "
+ "does not appear to be valid (or the site may "
+ "be down). Check your information and try again.";
+
+ MythConfirmationDialog *okPopup =
+ new MythConfirmationDialog(m_popupStack, title, false);
+
+ if (okPopup->Create())
+ m_popupStack->AddScreen(okPopup);
+
+ delete lookup;
+ lookup = NULL;
+ }
+ }
+ else if (levent->type() == ImageDLEvent::kEventType)
+ {
+ ImageDLEvent *ide = (ImageDLEvent *)levent;
+
+ MetadataLookup *lookup = ide->item;
+
+ if (!lookup)
+ return;
+
+// handleDownloadedImages(lookup);
+ }
+}
+
View
79 mythtv/programs/mythfrontend/scheduleeditor.h
@@ -14,6 +14,9 @@
#include "recordingrule.h"
#include "recordinginfo.h"
+// libmythmetadata
+#include "metadatafactory.h"
+
#ifndef ALLOW_MISSING_FILTERS
#define ALLOW_MISSING_FILTERS 1
#endif
@@ -53,6 +56,7 @@ class ScheduleEditor : public ScheduleCommon
void ShowPostProc(void);
void ShowSchedInfo(void);
void ShowPreview(void);
+ void ShowMetadataOptions(void);
void Save(void);
void Close(void);
@@ -79,6 +83,7 @@ class ScheduleEditor : public ScheduleCommon
MythUIButton *m_postProcButton;
MythUIButton *m_schedInfoButton;
MythUIButton *m_previewButton;
+ MythUIButton *m_metadataButton;
TV *m_player;
};
@@ -211,6 +216,80 @@ class PostProcEditor : public MythScreenType
MythUICheckBox *m_userjob2Check;
MythUICheckBox *m_userjob3Check;
MythUICheckBox *m_userjob4Check;
+ MythUICheckBox *m_metadataLookupCheck;
+};
+
+class MetadataOptions : public MythScreenType
+{
+ Q_OBJECT
+ public:
+ MetadataOptions(MythScreenStack *parent, RecordingInfo *recinfo,
+ RecordingRule *rule);
+ ~MetadataOptions();
+
+ bool Create(void);
+
+ protected slots:
+ void PerformQuery();
+ void SelectLocalFanart();
+ void SelectLocalCoverart();
+ void SelectLocalBanner();
+ void SelectOnlineFanart();
+ void SelectOnlineCoverart();
+ void SelectOnlineBanner();
+ void QueryComplete(MetadataLookup *lookup);
+ void OnSearchListSelection(MetadataLookup *lookup);
+ void OnImageSearchListSelection(ArtworkInfo info,
+ VideoArtworkType type);
+ void OnArtworkSearchDone(MetadataLookup *lookup);
+ void FindNetArt(VideoArtworkType type);
+
+ private:
+ void Load(void);
+ void Save(void);
+
+ void CreateBusyDialog(QString title);
+ void FindImagePopup(const QString &prefix,
+ const QString &prefixAlt,
+ QObject &inst,
+ const QString &returnEvent);
+ QStringList GetSupportedImageExtensionFilter();
+
+ void customEvent(QEvent *event);
+
+ RecordingInfo *m_recInfo;
+ RecordingRule *m_recordingRule;
+
+ // For all metadata downloads
+ MetadataFactory *m_metadataFactory;
+
+ // For image picking
+ MetadataDownload *m_imageLookup;
+ MetadataImageDownload *m_imageDownload;
+
+ MetadataLookup *m_lookup;
+
+ MythScreenStack *m_popupStack;
+ MythUIBusyDialog *m_busyPopup;
+
+ MythUIImage *m_fanart;
+ MythUIImage *m_coverart;
+ MythUIImage *m_banner;
+
+ MythUITextEdit *m_inetrefEdit;
+
+ MythUISpinBox *m_seasonSpin;
+ MythUISpinBox *m_episodeSpin;
+
+ MythUIButton *m_queryButton;
+ MythUIButton *m_localFanartButton;
+ MythUIButton *m_localCoverartButton;
+ MythUIButton *m_localBannerButton;
+ MythUIButton *m_onlineFanartButton;
+ MythUIButton *m_onlineCoverartButton;
+ MythUIButton *m_onlineBannerButton;
+
+ MythUIButton *m_backButton;
};
#endif
View
41 mythtv/themes/MythCenter-wide/schedule-ui.xml
@@ -1804,6 +1804,12 @@
<helptext></helptext>
</button>
+ <button name="metadata" from="baseverywidebutton">
+ <position>250,578</position>
+ <value>Metadata Options</value>
+ <helptext></helptext>
+ </button>
+
<button name="cancel" from="basebutton">
<position>250,644</position>
<value>Cancel</value>
@@ -2079,62 +2085,71 @@
<template>%"|SUBTITLE|" %%LONGREPEAT%%(|STARS|) %%DESCRIPTION%</template>
</textarea>
+ <checkbox name="metadatalookup" from="basecheckbox">
+ <position>450,310</position>
+ </checkbox>
+
+ <textarea name="metadatalookuplabel" from="basetextarea">
+ <area>500,314,450,30</area>
+ <value>Automatically Look Up Metadata</value>
+ </textarea>
+
<checkbox name="autocommflag" from="basecheckbox">
- <position>250,310</position>
+ <position>450,354</position>
</checkbox>
<textarea name="autocommflaglabel" from="basetextarea">
- <area>500,312,450,30</area>
+ <area>500,358,450,30</area>
<value>Commercial Flag new recordings</value>
</textarea>
<checkbox name="autotranscode" from="basecheckbox">
- <position>250,354</position>
+ <position>450,398</position>
</checkbox>
<textarea name="autotranscodelabel" from="basetextarea">
- <area>500,358,300,30</area>
+ <area>500,402,300,30</area>
<value>Transcode new recordings</value>
</textarea>
<buttonlist name="transcodeprofile" from="basewideselector">
- <position>454,396</position>
+ <position>304,446</position>
<helptext></helptext>
</buttonlist>
<checkbox name="userjob1" from="basecheckbox">
- <position>250,444</position>
+ <position>400,534</position>
</checkbox>
<textarea name="userjob1label" from="basetextarea">
- <area>500,448,300,30</area>
+ <area>450,538,300,30</area>
<value>Run User Job #1</value>
</textarea>
<checkbox name="userjob2" from="basecheckbox">
- <position>250,490</position>
+ <position>400,580</position>
</checkbox>
<textarea name="userjob2label" from="basetextarea">
- <area>500,492,300,30</area>
+ <area>450,582,300,30</area>
<value>Run User Job #2</value>
</textarea>
<checkbox name="userjob3" from="basecheckbox">
- <position>250,534</position>
+ <position>700,534</position>
</checkbox>
<textarea name="userjob3label" from="basetextarea">
- <area>500,538,300,30</area>
+ <area>750,538,300,30</area>
<value>Run User Job #3</value>
</textarea>
<checkbox name="userjob4" from="basecheckbox">
- <position>250,580</position>
+ <position>700,580</position>
</checkbox>
<textarea name="userjob4label" from="basetextarea">
- <area>500,582,300,30</area>
+ <area>750,582,300,30</area>
<value>Run User Job #4</value>
</textarea>
View
10 mythtv/themes/MythCenter/schedule-ui.xml
@@ -1711,13 +1711,19 @@
<helptext></helptext>
</button>
+ <button name="metadata" from="baseverywidebutton">
+ <position>215,480</position>
+ <value>Metadata Options</value>
+ <helptext></helptext>
+ </button>
+
<button name="cancel" from="basebutton">
- <position>40,525</position>
+ <position>40,535</position>
<value>Cancel</value>
</button>
<button name="save" from="basebutton">
- <position>540,525</position>
+ <position>540,535</position>
<value>Save</value>
</button>
</window>
View
29 mythtv/themes/Terra/schedule-ui.xml
@@ -1445,42 +1445,48 @@
</buttonlist>
<button name="schedoptions" from="basewidebutton">
- <position>157,230</position>
+ <position>157,220</position>
<helptext></helptext>
<value>Schedule Options</value>
</button>
<button name="storeoptions" from="basewidebutton">
- <position>157,295</position>
+ <position>157,285</position>
<helptext></helptext>
<value>Storage Options</value>
</button>
<button name="postprocessing" from="basewidebutton">
- <position>157,360</position>
+ <position>157,350</position>
<helptext></helptext>
<value>Post Processing</value>
</button>
<button name="schedinfo" from="basewidebutton">
- <position>157,425</position>
+ <position>157,415</position>
<helptext></helptext>
<value>Schedule Info</value>
</button>
<button name="preview" from="basewidebutton">
- <position>157,490</position>
+ <position>157,480</position>
<helptext></helptext>
<value>Preview</value>
</button>
+ <button name="metadata" from="basewidebutton">
+ <position>157,545</position>
+ <helptext></helptext>
+ <value>Metadata Options</value>
+ </button>
+
<button name="cancel" from="basebutton">
- <position>60,595</position>
+ <position>60,620</position>
<value>Cancel</value>
</button>
<button name="save" from="basebutton">
- <position>397,595</position>
+ <position>397,620</position>
<value>Save</value>
</button>
</window>
@@ -1926,6 +1932,15 @@
<area>700,646,420,30</area>
</textarea>
+ <checkbox name="metadatalookup" from="basecheckbox">
+ <position>154,100</position>
+ </checkbox>
+
+ <textarea name="autometadatalabel" from="basetextarea">
+ <area>196,107,600,30</area>
+ <value>Automatically Look Up Metadata</value>
+ </textarea>
+
<checkbox name="autocommflag" from="basecheckbox">
<position>154,160</position>
</checkbox>
View
6 mythtv/themes/default-wide/schedule-ui.xml
@@ -1725,6 +1725,12 @@
<helptext></helptext>
</button>
+ <button name="metadata" from="baseverywidebutton">
+ <position>455,570</position>
+ <value>Metadata Options</value>
+ <helptext></helptext>
+ </button>
+
<button name="cancel" from="basebutton">
<position>330,645</position>
<value>Cancel</value>
View
49 mythtv/themes/default/schedule-ui.xml
@@ -1651,6 +1651,12 @@
<helptext></helptext>
</button>
+ <button name="metadata" from="baseverywidebutton">
+ <position>215,480</position>
+ <value>Metadata Options</value>
+ <helptext></helptext>
+ </button>
+
<button name="cancel" from="basebutton">
<position>40,525</position>
<value>Cancel</value>
@@ -2074,4 +2080,47 @@
</window>
+ <window name="metadataoptions">
+
+ <textarea name="inet" from="basetextarea">
+ <area>20,110,180,40</area>
+ <align>right,vcenter</align>
+ <value>TMDB/TVDB #:</value>
+ </textarea>
+
+ <textedit name="inetref_edit" from="basetextedit">
+ <position>215,110</position>
+ </textedit>
+
+ <textarea name="seas" from="basetextarea">
+ <area>20,165,180,40</area>
+ <align>right,vcenter</align>
+ <value>Season:</value>
+ </textarea>
+
+ <spinbox name="season_spinbox" from="basespinbox">
+ <position>215,165</position>
+ </spinbox>
+
+ <textarea name="ep" from="basetextarea">
+ <area>310,165,180,40</area>
+ <align>right,vcenter</align>
+ <value>Episode:</value>
+ </textarea>
+
+ <spinbox name="episode_spinbox" from="basespinbox">
+ <position>505,165</position>
+ </spinbox>
+
+ <button name="query_button" from="basewidebutton">
+ <position>215,220</position>
+ <value>Perform Query</value>
+ </button>
+
+ <button name="back" from="basebutton">
+ <position>40,525</position>
+ <value>Back</value>
+ </button>
+ </window>
+
</mythuitheme>

0 comments on commit 444cfe9

Please sign in to comment.
Something went wrong with that request. Please try again.