MythTV  master
netsearch.cpp
Go to the documentation of this file.
1 // qt
2 #include <QString>
3 #include <QMetaType>
4 #include <QDateTime>
5 #include <QFileInfo>
6 #include <QImageReader>
7 
8 // myth
9 #include <mythdb.h>
10 #include <mythcontext.h>
11 #include <mythdbcon.h>
12 #include <mythdirs.h>
13 #include <mythsystemlegacy.h>
14 #include <mythprogressdialog.h>
15 #include <storagegroup.h>
16 #include <remotefile.h>
17 #include <netgrabbermanager.h>
18 #include <netutils.h>
20 #include <metadata/videoutils.h>
21 #include <rssparse.h>
22 #include <mythcoreutil.h>
23 #include <mythuitext.h>
24 #include <mythuiimage.h>
25 #include <mythsorthelper.h>
26 
27 #include "netsearch.h"
28 #include "netcommon.h"
29 #include "rsseditor.h"
30 #include "searcheditor.h"
31 
32 using namespace std;
33 
34 // ---------------------------------------------------
35 
36 NetSearch::NetSearch(MythScreenStack *parent, const char *name)
37  : NetBase(parent, name),
38  m_mythXML(GetMythXMLURL())
39 {
40 }
41 
43 {
44  // Load the theme for this screen
45  bool foundtheme = LoadWindowFromXML("netvision-ui.xml", "netsearch", this);
46 
47  if (!foundtheme)
48  return false;
49 
50  m_siteList = dynamic_cast<MythUIButtonList *> (GetChild("sites"));
51  m_searchResultList = dynamic_cast<MythUIButtonList *> (GetChild("results"));
52 
53  m_pageText = dynamic_cast<MythUIText *> (GetChild("page"));
54  m_noSites = dynamic_cast<MythUIText *> (GetChild("nosites"));
55 
56  m_thumbImage = dynamic_cast<MythUIImage *> (GetChild("preview"));
57 
58  m_downloadable = dynamic_cast<MythUIStateType *> (GetChild("downloadable"));
59 
60  m_progress = dynamic_cast<MythUIProgressBar *> (GetChild("progress"));
61 
62  if (m_progress)
63  m_progress->SetVisible(false);
64 
65  if (m_noSites)
66  m_noSites->SetVisible(false);
67 
68  m_search = dynamic_cast<MythUITextEdit *> (GetChild("search"));
69 
71  {
72  LOG(VB_GENERAL, LOG_ERR, "Theme is missing critical theme elements.");
73  return false;
74  }
75 
76  m_search->SetMaxLength(255);
77 
78  // UI Hookups
79  connect(m_siteList, SIGNAL(itemSelected(MythUIButtonListItem *)),
80  SLOT(SlotItemChanged()));
81  connect(m_siteList, SIGNAL(itemClicked(MythUIButtonListItem *)),
82  SLOT(DoSearch(void)));
83  connect(m_searchResultList, SIGNAL(itemClicked(MythUIButtonListItem *)),
84  SLOT(StreamWebVideo(void)));
85  connect(m_searchResultList, SIGNAL(itemSelected(MythUIButtonListItem *)),
86  SLOT(SlotItemChanged()));
87 
89 
91 
92  return true;
93 }
94 
96 {
98 }
99 
101 {
102  if (m_netSearch)
103  {
104  m_netSearch->disconnect();
105  m_netSearch->deleteLater();
106  m_netSearch = nullptr;
107  }
108 }
109 
111 {
113 
114  if (m_grabberList.count() == 0 && m_noSites)
115  m_noSites->SetVisible(true);
116  else if (m_noSites)
117  m_noSites->SetVisible(false);
118 
119  if (m_grabberList.isEmpty())
120  RunSearchEditor();
121 }
122 
123 bool NetSearch::keyPressEvent(QKeyEvent *event)
124 {
125  if (GetFocusWidget()->keyPressEvent(event))
126  return true;
127 
128  QStringList actions;
129  bool handled = GetMythMainWindow()->TranslateKeyPress("Internet Video",
130  event, actions);
131 
132  for (int i = 0; i < actions.size() && !handled; i++)
133  {
134  QString action = actions[i];
135  handled = true;
136 
137  if (action == "MENU")
138  ShowMenu();
139  else if (action == "PAGELEFT" && m_pagenum > 1)
140  {
141  if (m_prevPageToken.isEmpty())
142  SkipPagesBack();
143  else
144  GetLastResults();
145  }
146  else if (action == "PAGERIGHT" && m_searchResultList->GetCount() > 0 &&
147  m_pagenum + 10 < m_maxpage)
148  {
149  if (m_nextPageToken.isEmpty())
151  else
152  GetMoreResults();
153  }
154  else if (action == "PREVVIEW" && m_pagenum > 1)
155  GetLastResults();
156  else if (action == "NEXTVIEW" && m_searchResultList->GetCount() > 0 &&
158  GetMoreResults();
159  else
160  handled = false;
161  }
162 
163  if (!handled && MythScreenType::keyPressEvent(event))
164  handled = true;
165 
166  return handled;
167 }
168 
170 {
171  QString label = tr("Search Options");
172 
173  auto *menuPopup = new MythDialogBox(label, m_popupStack,
174  "mythnetvisionmenupopup");
175 
176  if (menuPopup->Create())
177  {
178  m_popupStack->AddScreen(menuPopup);
179 
180  menuPopup->SetReturnEvent(this, "options");
181 
182  if (m_searchResultList->GetCount() > 0)
183  {
184  ResultItem *item = GetStreamItem();
185  if (item)
186  {
187  if (item->GetDownloadable())
188  menuPopup->AddButton(tr("Stream Video"),
189  SLOT(StreamWebVideo()));
190  menuPopup->AddButton(tr("Open Web Link"), SLOT(ShowWebVideo()));
191 
192  QString filename = GetDownloadFilename(item->GetTitle(),
193  item->GetMediaURL());
194  bool exists = false;
195 
196  if (filename.startsWith("myth://"))
197  exists = RemoteFile::Exists(filename);
198  else
199  exists = QFile::exists(filename);
200 
201  if (item->GetDownloadable() &&
203  {
204  if (exists)
205  {
206  menuPopup->AddButton(tr("Play"),
207  SLOT(DoPlayVideo(filename)));
208  }
209  else
210  {
211  menuPopup->AddButton(tr("Save This Video"),
212  SLOT(DoDownloadAndPlay()));
213  }
214  }
215 
216  if (item->GetDownloadable() &&
218  exists)
219  {
220  menuPopup->AddButton(tr("Delete"), SLOT(SlotDeleteVideo()));
221  }
222  }
223  }
224 
225  if (m_pagenum > 1)
226  menuPopup->AddButton(tr("Previous Page"), SLOT(GetLastResults()));
228  menuPopup->AddButton(tr("Next Page"), SLOT(GetMoreResults()));
229  if (m_pagenum > 1 && m_prevPageToken.isEmpty())
230  menuPopup->AddButton(tr("Skip 10 Pages Back"),
231  SLOT(SkipPagesBack()));
233  m_nextPageToken.isEmpty())
234  menuPopup->AddButton(tr("Skip 10 Pages Forward"),
235  SLOT(SkipPagesForward()));
236 
237  menuPopup->AddButton(tr("Manage Search Scripts"),
238  SLOT(RunSearchEditor()));
239  }
240  else
241  delete menuPopup;
242 }
243 
245 {
246  m_siteList->Reset();
247 
248  for (const auto & g : qAsConst(m_grabberList))
249  {
250  auto *item = new MythUIButtonListItem(m_siteList, g->GetTitle());
251  item->SetText(g->GetTitle(), "title");
252  item->SetData(g->GetCommandline());
253  QString thumb = QString("%1mythnetvision/icons/%2").arg(GetShareDir())
254  .arg(g->GetImage());
255  item->SetImage(thumb);
256  }
257 }
258 
260 {
262 
263  int numScripts = m_siteList->GetCount();
264  for (int i = 0; i < numScripts; i++)
265  m_siteList->GetItemAt(i)->SetText("", "count");
266 
267  if (m_pageText)
268  m_pageText->Reset();
269 
270  m_pagenum = 1;
271  m_maxpage = 1;
272 
273  QString cmd = m_siteList->GetDataValue().toString();
274  QString grabber = m_siteList->GetItemCurrent()->GetText();
275  QString query = m_search->GetText();
276 
277  if (query.isEmpty())
278  return;
279 
280  QFileInfo fi(cmd);
281  m_currentCmd = fi.fileName();
284 
285  QString title = tr("Searching %1 for \"%2\"...")
286  .arg(grabber).arg(query);
288 
289  if (!m_netSearch)
290  {
291  m_netSearch = new QNetworkAccessManager(this);
292  connect(m_netSearch, SIGNAL(finished(QNetworkReply*)),
293  SLOT(SearchFinished(void)));
294  }
295 
297  QUrl req(init.toEncoded(), QUrl::TolerantMode);
298  LOG(VB_GENERAL, LOG_INFO,
299  QString("Using Search URL %1").arg(req.toString()));
300  m_reply = m_netSearch->get(QNetworkRequest(req));
301 }
302 
304 {
306 
307  m_pagenum--;
308 
309  QString title = tr("Changing to page %1 of search \"%2\"...")
310  .arg(QString::number(m_pagenum))
311  .arg(m_currentSearch);
313 
314  QString page = m_prevPageToken.isEmpty() ? QString::number(m_pagenum) :
316 
317  QUrl req =
319  m_reply = m_netSearch->get(QNetworkRequest(req));
320 }
321 
323 {
325 
326  m_pagenum++;
327 
328  QString title = tr("Changing to page %1 of search \"%2\"...")
329  .arg(QString::number(m_pagenum))
330  .arg(m_currentSearch);
332 
333  QString page = m_nextPageToken.isEmpty() ? QString::number(m_pagenum) :
335 
336  QUrl req =
338  m_reply = m_netSearch->get(QNetworkRequest(req));
339 }
340 
342 {
343  if (m_pagenum < 11)
344  m_pagenum = 2;
345  else
346  m_pagenum = m_pagenum - 10 + 1;
347 
348  GetLastResults();
349 }
350 
352 {
353  m_pagenum = m_pagenum + 10 - 1;
354 
355  GetMoreResults();
356 }
357 
359 {
360  CloseBusyPopup();
361 
362  auto *item = new Search();
363  QByteArray data = m_reply->readAll();
364  item->SetData(data);
365 
366  item->process();
367 
368  uint searchresults = item->numResults();
369  uint returned = item->numReturned();
370  uint firstitem = item->numIndex();
371 
372  m_nextPageToken = item->nextPageToken();
373  m_prevPageToken = item->prevPageToken();
374 
375  if (returned <= 0)
376  return;
377 
379  SetText(QString::number(searchresults), "count");
380 
381  if (firstitem + returned == searchresults)
383  else
384  {
385  m_maxpage = searchresults / returned; // Whole pages
386  if (searchresults % returned != 0) // Partial page?
387  m_maxpage++;
388  }
389  if (m_pageText && m_maxpage > 0 && m_pagenum > 0 && returned > 0)
390  {
391  m_pageText->SetText(QString("%1 / %2")
392  .arg(QString::number(m_pagenum))
393  .arg(QString::number(m_maxpage)));
394  }
395 
396  ResultItem::resultList list = item->GetVideoList();
397  PopulateResultList(list);
399 }
400 
402 {
403  CloseBusyPopup();
404 
405  QString message = tr("Timed out waiting for query to "
406  "finish. API might be down.");
407 
408  if (!m_okPopup)
409  {
410  m_okPopup = new MythConfirmationDialog(m_popupStack, message, false);
411 
412  if (m_okPopup->Create())
414  else
415  {
416  delete m_okPopup;
417  m_okPopup = nullptr;
418  }
419  }
420 }
421 
423 {
424  for (const auto & result : qAsConst(list))
425  {
426  QString title = result->GetTitle();
428  QVariant::fromValue(result));
429  InfoMap metadataMap;
430  result->toMap(metadataMap);
431  item->SetTextFromMap(metadataMap);
432 
433  if (!result->GetThumbnail().isEmpty())
434  {
435  QString dlfile = result->GetThumbnail();
436 
437  if (dlfile.contains("%SHAREDIR%"))
438  {
439  dlfile.replace("%SHAREDIR%", GetShareDir());
440  item->SetImage(dlfile);
441  }
442  else
443  {
444  uint pos = m_searchResultList->GetItemPos(item);
445 
446  m_imageDownload->addThumb(result->GetTitle(),
447  result->GetThumbnail(),
448  QVariant::fromValue<uint>(pos));
449  }
450  }
451  }
452 }
453 
455 {
456  return m_searchResultList->GetDataValue().value<ResultItem*>();
457 }
458 
460 {
462 
463  auto *searchedit = new SearchEditor(mainStack, "mythnetsearchedit");
464 
465  if (searchedit->Create())
466  {
467  connect(searchedit, SIGNAL(ItemsChanged()),
468  this, SLOT(DoListRefresh()));
469 
470  mainStack->AddScreen(searchedit);
471  }
472  else
473  delete searchedit;
474 }
475 
477 {
479  if (m_grabberList.isEmpty())
480  RunSearchEditor();
481 
482  LoadData();
483 }
484 
486 {
487  auto *item = m_searchResultList->GetDataValue().value<ResultItem*>();
488 
489  if (item && GetFocusWidget() == m_searchResultList)
490  {
492 
493  if (m_downloadable)
494  {
495  if (item->GetDownloadable())
497  else
499  }
500  }
501  else if (GetFocusWidget() == m_siteList)
502  {
504  std::shared_ptr<MythSortHelper>sh = getMythSortHelper();
505  QString title = btn->GetText();
506 
507  ResultItem res(title, sh->doTitle(title), // title, sortTitle
508  QString(), QString(), // subtitle, sortSubtitle
509  QString(), // description
510  QString(), QString(), QString(), QString(),
511  QDateTime(), nullptr, nullptr, -1, QString(), QStringList(),
512  QString(), QStringList(), 0, 0, QString(),
513  false, QStringList(), 0, 0, false);
514 
515  SetTextAndThumbnail(btn, &res);
516  }
517 }
518 
520 {
521  InfoMap metadataMap;
522  item->toMap(metadataMap);
523  SetTextFromMap(metadataMap);
524 
525  SetThumbnail(btn);
526 }
527 
529 {
530  if (m_thumbImage)
531  {
532  QString filename = btn->GetImageFilename();
533  if (filename.contains("%SHAREDIR%"))
534  filename.replace("%SHAREDIR%", GetShareDir());
535 
536  if (!filename.isEmpty())
537  {
539  m_thumbImage->Load();
540  }
541  else
542  m_thumbImage->Reset();
543  }
544 }
545 
546 void NetSearch::customEvent(QEvent *event)
547 {
548  if (event->type() == ThumbnailDLEvent::kEventType)
549  {
550  auto *tde = dynamic_cast<ThumbnailDLEvent *>(event);
551  if (tde == nullptr)
552  return;
553 
554  ThumbnailData *data = tde->m_thumb;
555  if (!data)
556  return;
557 
558  QString title = data->title;
559  QString file = data->url;
560  uint pos = data->data.value<uint>();
561 
562  if (file.isEmpty() || !((uint)m_searchResultList->GetCount() >= pos))
563  return;
564 
566 
567  if (!item)
568  return;
569 
570  if (item->GetText() == title)
571  item->SetImage(file);
572 
573  if (m_searchResultList->GetItemCurrent() == item)
574  SetThumbnail(item);
575  }
576  else
577  NetBase::customEvent(event);
578 }
MythUIButtonList::GetItemAt
MythUIButtonListItem * GetItemAt(int pos) const
Definition: mythuibuttonlist.cpp:1676
MythScreenType::LoadInBackground
void LoadInBackground(const QString &message="")
Definition: mythscreentype.cpp:302
MythMainWindow::GetMainStack
MythScreenStack * GetMainStack()
Definition: mythmainwindow.cpp:304
MythUITextEdit::SetMaxLength
void SetMaxLength(int length)
Definition: mythuitextedit.cpp:211
netsearch.h
MythUIButtonList::GetItemCurrent
MythUIButtonListItem * GetItemCurrent() const
Definition: mythuibuttonlist.cpp:1590
mythuitext.h
MythUIImage
Image widget, displays a single image or multiple images in sequence.
Definition: mythuiimage.h:98
GetDownloadFilename
QString GetDownloadFilename(const QString &title, const QString &url)
Definition: netutils.cpp:855
MythConfirmationDialog::Create
bool Create(void) override
Definition: mythdialogbox.cpp:439
MythUIText::Reset
void Reset(void) override
Reset the widget to it's original state, should not reset changes made by the theme.
Definition: mythuitext.cpp:84
getMythSortHelper
std::shared_ptr< MythSortHelper > getMythSortHelper(void)
Get a pointer to the MythSortHelper singleton.
Definition: mythsorthelper.cpp:126
mythdb.h
NetSearch::FillGrabberButtonList
void FillGrabberButtonList(void)
Definition: netsearch.cpp:244
NetSearch::SlotItemChanged
void SlotItemChanged(void)
Definition: netsearch.cpp:485
findAllDBSearchGrabbers
GrabberScript::scriptList findAllDBSearchGrabbers(ArticleType type)
Definition: netutils.cpp:184
NetSearch::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: netsearch.cpp:123
RemoteFile::Exists
static bool Exists(const QString &url, struct stat *fileinfo)
Definition: remotefile.cpp:462
title
QString title
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:633
MythMainWindow::TranslateKeyPress
bool TranslateKeyPress(const QString &context, QKeyEvent *e, QStringList &actions, bool allowJumps=true)
Get a list of actions for a keypress in the given context.
Definition: mythmainwindow.cpp:1106
MythUIType::GetChild
MythUIType * GetChild(const QString &name) const
Get a named child of this UIType.
Definition: mythuitype.cpp:130
MythUIImage::Load
bool Load(bool allowLoadInBackground=true, bool forceStat=false)
Load the image(s), wraps ImageLoader::LoadImage()
Definition: mythuiimage.cpp:967
NetSearch::SearchTimeout
void SearchTimeout(Search *item)
Definition: netsearch.cpp:401
NetBase::SlotDeleteVideo
void SlotDeleteVideo(void)
Definition: netbase.cpp:183
NetSearch::m_okPopup
MythConfirmationDialog * m_okPopup
Definition: netsearch.h:47
rssparse.h
NetSearch::m_pagenum
uint m_pagenum
Definition: netsearch.h:55
mythcoreutil.h
ResultItem::GetTitle
const QString & GetTitle() const
Definition: rssparse.h:134
NetBase::DoPlayVideo
void DoPlayVideo(const QString &filename)
Definition: netbase.cpp:311
GetMythXMLSearch
QUrl GetMythXMLSearch(const QString &url, const QString &query, const QString &grabber, const QString &pagenum)
Definition: netcommon.cpp:41
NetSearch::m_noSites
MythUIText * m_noSites
Definition: netsearch.h:44
MythScreenStack
Definition: mythscreenstack.h:16
arg
arg(title).arg(filename).arg(doDelete))
mythdbcon.h
NetSearch::SetTextAndThumbnail
void SetTextAndThumbnail(MythUIButtonListItem *btn, ResultItem *item)
Definition: netsearch.cpp:519
MythUITextEdit
A text entry and edit widget.
Definition: mythuitextedit.h:33
MythScreenType::OpenBusyPopup
void OpenBusyPopup(const QString &message="")
Definition: mythscreentype.cpp:336
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:23
MetadataImageDownload::addThumb
void addThumb(QString title, QString url, QVariant data)
Definition: metadataimagedownload.cpp:35
NetBase::customEvent
void customEvent(QEvent *event) override
Definition: netbase.cpp:221
MythUITextEdit::GetText
QString GetText(void) const
Definition: mythuitextedit.h:47
build_compdb.file
file
Definition: build_compdb.py:55
searcheditor.h
mythdirs.h
mythsorthelper.h
NetSearch::ShowMenu
void ShowMenu(void) override
Definition: netsearch.cpp:169
netcommon.h
MythUIImage::Reset
void Reset(void) override
Reset the image back to the default defined in the theme.
Definition: mythuiimage.cpp:644
NetSearch::m_prevPageToken
QString m_prevPageToken
Definition: netsearch.h:62
NetSearch::Load
void Load() override
Load data which will ultimately be displayed on-screen or used to determine what appears on-screen (S...
Definition: netsearch.cpp:95
NetSearch::m_currentGrabber
int m_currentGrabber
Definition: netsearch.h:53
rsseditor.h
NetBase::m_thumbImage
MythUIImage * m_thumbImage
Definition: netbase.h:45
mythuiimage.h
MythUIButtonList::GetCount
int GetCount() const
Definition: mythuibuttonlist.cpp:1655
mythprogressdialog.h
NetSearch::m_siteList
MythUIButtonList * m_siteList
Definition: netsearch.h:40
ThumbnailData::title
QString title
Definition: metadataimagedownload.h:13
MythScreenType::GetFocusWidget
MythUIType * GetFocusWidget(void) const
Definition: mythscreentype.cpp:112
mythsystemlegacy.h
NetSearch::LoadData
void LoadData(void) override
Definition: netsearch.cpp:110
InfoMap
QHash< QString, QString > InfoMap
Definition: mythtypes.h:15
MythUIButtonListItem::SetText
void SetText(const QString &text, const QString &name="", const QString &state="")
Definition: mythuibuttonlist.cpp:3272
NetSearch::Create
bool Create(void) override
Definition: netsearch.cpp:42
MythUIButtonList::GetItemPos
int GetItemPos(MythUIButtonListItem *item) const
Definition: mythuibuttonlist.cpp:1698
NetBase::m_popupStack
MythScreenStack * m_popupStack
Definition: netbase.h:47
MythUIButtonListItem
Definition: mythuibuttonlist.h:28
NetSearch::m_mythXML
QString m_mythXML
Definition: netsearch.h:57
NetSearch::SearchFinished
void SearchFinished(void)
Definition: netsearch.cpp:358
ThumbnailDLEvent::kEventType
static Type kEventType
Definition: metadataimagedownload.h:84
NetSearch::SkipPagesForward
void SkipPagesForward()
Definition: netsearch.cpp:351
NetSearch::m_progress
MythUIProgressBar * m_progress
Definition: netsearch.h:46
NetSearch::m_pageText
MythUIText * m_pageText
Definition: netsearch.h:43
NetSearch::~NetSearch
~NetSearch() override
Definition: netsearch.cpp:100
ThumbnailData::url
QString url
Definition: metadataimagedownload.h:15
remotefile.h
NetSearch::customEvent
void customEvent(QEvent *levent) override
Definition: netsearch.cpp:546
MythUIButtonList::GetCurrentPos
int GetCurrentPos() const
Definition: mythuibuttonlist.h:190
metadataimagedownload.h
MythUIProgressBar
Progress bar widget.
Definition: mythuiprogressbar.h:13
NetBase::m_grabberList
GrabberScript::scriptList m_grabberList
Definition: netbase.h:52
netgrabbermanager.h
MythScreenType::SetFocusWidget
bool SetFocusWidget(MythUIType *widget=nullptr)
Definition: mythscreentype.cpp:117
MythDialogBox
Basic menu dialog, message and a list of options.
Definition: mythdialogbox.h:138
GetMythXMLURL
QString GetMythXMLURL(void)
Definition: netcommon.cpp:32
GetShareDir
QString GetShareDir(void)
Definition: mythdirs.cpp:222
NetBase::m_imageDownload
MetadataImageDownload * m_imageDownload
Definition: netbase.h:49
NetSearch::GetMoreResults
void GetMoreResults()
Definition: netsearch.cpp:322
MythScreenType::BuildFocusList
void BuildFocusList(void)
Definition: mythscreentype.cpp:222
NetSearch::GetStreamItem
ResultItem * GetStreamItem() override
Definition: netsearch.cpp:454
NetSearch::m_searchResultList
MythUIButtonList * m_searchResultList
Definition: netsearch.h:39
NetSearch::m_nextPageToken
QString m_nextPageToken
Definition: netsearch.h:61
netutils.h
MythUIComposite::SetTextFromMap
virtual void SetTextFromMap(const InfoMap &infoMap)
Definition: mythuicomposite.cpp:9
ThumbnailDLEvent
Definition: metadataimagedownload.h:71
filename
QString filename
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:634
MythUIButtonList::GetDataValue
QVariant GetDataValue() const
Definition: mythuibuttonlist.cpp:1619
NetSearch::m_netSearch
QNetworkAccessManager * m_netSearch
Definition: netsearch.h:49
storagegroup.h
ResultItem::toMap
void toMap(InfoMap &metadataMap)
Definition: rssparse.cpp:76
NetSearch::m_maxpage
uint m_maxpage
Definition: netsearch.h:56
NetBase::StreamWebVideo
void StreamWebVideo(void)
Definition: netbase.cpp:87
init
static void init(VideoFrame *vf, VideoFrameType _codec, unsigned char *_buf, int _width, int _height, int _size, const int *p=nullptr, const int *o=nullptr, float _aspect=-1.0F, double _rate=-1.0F, int _aligned=MYTH_WIDTH_ALIGNMENT)
Definition: mythframe.h:232
uint
unsigned int uint
Definition: compat.h:140
Search
Definition: netgrabbermanager.h:138
NetSearch::DoListRefresh
void DoListRefresh()
Definition: netsearch.cpp:476
ThumbnailData::data
QVariant data
Definition: metadataimagedownload.h:14
NetSearch::NetSearch
NetSearch(MythScreenStack *parent, const char *name=nullptr)
Definition: netsearch.cpp:36
MythUIButtonListItem::GetText
QString GetText(const QString &name="") const
Definition: mythuibuttonlist.cpp:3313
MythUIText
All purpose text widget, displays a text string.
Definition: mythuitext.h:29
MythScreenType::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: mythscreentype.cpp:414
NetSearch::PopulateResultList
void PopulateResultList(const ResultItem::resultList &list)
Definition: netsearch.cpp:422
MythConfirmationDialog
Dialog asking for user confirmation. Ok and optional Cancel button.
Definition: mythdialogbox.h:222
SearchEditor
Definition: searcheditor.h:10
VIDEO_FILE
@ VIDEO_FILE
Definition: rssparse.h:21
XMLParseBase::LoadWindowFromXML
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
Definition: xmlparsebase.cpp:692
MythUIButtonListItem::SetImage
void SetImage(MythImage *image, const QString &name="")
Sets an image directly, should only be used in special circumstances since it bypasses the cache.
Definition: mythuibuttonlist.cpp:3406
ResultItem
Definition: rssparse.h:110
NetSearch::SkipPagesBack
void SkipPagesBack()
Definition: netsearch.cpp:341
NetSearch::SetThumbnail
void SetThumbnail(MythUIButtonListItem *btn)
Definition: netsearch.cpp:528
NetSearch::m_currentSearch
QString m_currentSearch
Definition: netsearch.h:52
MythUIText::SetText
virtual void SetText(const QString &text)
Definition: mythuitext.cpp:134
MythUIType::SetVisible
virtual void SetVisible(bool visible)
Definition: mythuitype.cpp:1085
mythcontext.h
NetSearch::m_search
MythUITextEdit * m_search
Definition: netsearch.h:41
MythUIButtonList::Reset
void Reset() override
Reset the widget to it's original state, should not reset changes made by the theme.
Definition: mythuibuttonlist.cpp:114
NetSearch::RunSearchEditor
void RunSearchEditor()
Definition: netsearch.cpp:459
GetMythMainWindow
MythMainWindow * GetMythMainWindow(void)
Definition: mythmainwindow.cpp:107
build_compdb.action
action
Definition: build_compdb.py:9
NetBase::ShowWebVideo
void ShowWebVideo(void)
Definition: netbase.cpp:106
ResultItem::resultList
QList< ResultItem * > resultList
Definition: rssparse.h:114
NetBase::m_downloadable
MythUIStateType * m_downloadable
Definition: netbase.h:46
NetBase
Definition: netbase.h:19
NetSearch::m_currentCmd
QString m_currentCmd
Definition: netsearch.h:54
MythUIButtonListItem::GetImageFilename
QString GetImageFilename(const QString &name="") const
Definition: mythuibuttonlist.cpp:3494
MythUIImage::SetFilename
void SetFilename(const QString &filename)
Must be followed by a call to Load() to load the image.
Definition: mythuiimage.cpp:675
ThumbnailData
Definition: metadataimagedownload.h:12
MythUIButtonList
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
Definition: mythuibuttonlist.h:144
MythUIProgressBar::SetVisible
void SetVisible(bool visible) override
Definition: mythuiprogressbar.cpp:186
MythScreenStack::AddScreen
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
Definition: mythscreenstack.cpp:49
query
MSqlQuery query(MSqlQuery::InitCon())
ResultItem::GetDownloadable
const bool & GetDownloadable() const
Definition: rssparse.h:154
NetSearch::m_reply
QNetworkReply * m_reply
Definition: netsearch.h:50
NetSearch::DoSearch
void DoSearch(void)
Definition: netsearch.cpp:259
videoutils.h
MythScreenType::CloseBusyPopup
void CloseBusyPopup(void)
Definition: mythscreentype.cpp:354
MythUIStateType
This widget is used for grouping other widgets for display when a particular named state is called....
Definition: mythuistatetype.h:23
NetBase::DoDownloadAndPlay
void DoDownloadAndPlay(void)
Definition: netbase.cpp:284
NetSearch::GetLastResults
void GetLastResults()
Definition: netsearch.cpp:303
MythUIStateType::DisplayState
bool DisplayState(const QString &name)
Definition: mythuistatetype.cpp:84
ResultItem::GetMediaURL
const QString & GetMediaURL() const
Definition: rssparse.h:141