MythTV  master
streamview.cpp
Go to the documentation of this file.
1 // C++ headers
2 #include <chrono>
3 #include <cstdlib>
4 #include <iostream>
5 
6 // qt
7 #include <QDomDocument>
8 #include <QKeyEvent>
9 #include <QThread>
10 
11 // MythTV
12 #include <libmyth/mythcontext.h>
14 #include <libmythbase/mythdbcon.h>
15 #include <libmythbase/mythdirs.h>
20 #include <libmythui/mythuibutton.h>
22 #include <libmythui/mythuihelper.h>
24 #include <libmythui/mythuitext.h>
25 #include <libmythui/mythuiutils.h>
26 
27 // mythmusic
28 #include "musiccommon.h"
29 #include "musicdata.h"
30 #include "musicplayer.h"
31 #include "streamview.h"
32 
34  : MusicCommon(parent, parentScreen, "streamview")
35 {
37 }
38 
40 {
41  // Load the theme for this screen
42  bool err = LoadWindowFromXML("stream-ui.xml", "streamview", this);
43 
44  if (!err)
45  return false;
46 
47  // find common widgets available on any view
48  err = CreateCommon();
49 
50  // find widgets specific to this view
51  UIUtilE::Assign(this, m_streamList, "streamlist", &err);
52  UIUtilW::Assign(this, m_bufferStatus, "bufferstatus", &err);
53  UIUtilW::Assign(this, m_bufferProgress, "bufferprogress", &err);
54  UIUtilW::Assign(this, m_noStreams, "nostreams", &err);
55 
56  if (err)
57  {
58  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'streamview'");
59  return false;
60  }
61 
66 
68 
71 
73 
74  return true;
75 }
76 
78 {
79  auto *menu = new MythMenu(tr("Stream Actions"), this, "mainmenu");
80  menu->AddItemV(MusicCommon::tr("Fullscreen Visualizer"), QVariant::fromValue((int)MV_VISUALIZER));
81  menu->AddItem(tr("Add Stream"));
82 
84  {
85  menu->AddItem(tr("Edit Stream"));
86  menu->AddItem(tr("Remove Stream"));
87  }
88 
89  menu->AddItemV(MusicCommon::tr("Lyrics"), QVariant::fromValue((int)MV_LYRICS));
90 
91  menu->AddItem(tr("More Options"), nullptr, createSubMenu());
92 
93  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
94 
95  auto *menuPopup = new MythDialogBox(menu, popupStack, "actionmenu");
96 
97  if (menuPopup->Create())
98  popupStack->AddScreen(menuPopup);
99  else
100  delete menu;
101 }
102 
103 void StreamView::customEvent(QEvent *event)
104 {
105  bool handled = true;
106 
107  if (event->type() == MusicPlayerEvent::kPlayedTracksChangedEvent)
108  {
109  if (!gPlayer->getPlayedTracksList().isEmpty())
111 
112  // add the new track to the list
113  if (m_playedTracksList && !gPlayer->getPlayedTracksList().isEmpty())
114  {
115  MusicMetadata *mdata = gPlayer->getPlayedTracksList().last();
116 
117  auto *item = new MythUIButtonListItem(m_playedTracksList, "",
118  QVariant::fromValue(mdata), 0);
119 
120  InfoMap metadataMap;
121  mdata->toMap(metadataMap);
122  item->SetTextFromMap(metadataMap);
123  item->SetFontState("normal");
124  item->DisplayState("default", "playstate");
125  item->SetImage(mdata->getAlbumArtFile());
126 
128  }
129  }
130  else if (event->type() == MusicPlayerEvent::kTrackChangeEvent)
131  {
132  auto *mpe = dynamic_cast<MusicPlayerEvent *>(event);
133 
134  if (!mpe)
135  return;
136 
137  if (m_streamList)
138  {
139  MythUIButtonListItem *item = m_streamList->GetItemByData(QVariant::fromValue(m_currStream));
140  if (item)
141  {
142  item->SetFontState("normal");
143  item->DisplayState("default", "playstate");
144  }
145 
147  {
150  }
151 
152  item = m_streamList->GetItemByData(QVariant::fromValue(m_currStream));
153  if (item)
154  {
155  if (gPlayer->isPlaying())
156  {
157  item->SetFontState("running");
158  item->DisplayState("playing", "playstate");
159  }
160  else if (gPlayer->isPaused())
161  {
162  item->SetFontState("idle");
163  item->DisplayState("paused", "playstate");
164  }
165  else
166  {
167  item->SetFontState("normal");
168  item->DisplayState("stopped", "playstate");
169  }
170  }
171  }
172 
174  }
175  else if (event->type() == OutputEvent::kPlaying)
176  {
177  if (gPlayer->isPlaying())
178  {
179  if (m_streamList)
180  {
181  MythUIButtonListItem *item = m_streamList->GetItemByData(QVariant::fromValue(m_currStream));
182  if (item)
183  {
184  item->SetFontState("running");
185  item->DisplayState("playing", "playstate");
186  }
187  }
188  }
189 
190  // pass it on to the default handler in MusicCommon
191  handled = false;
192  }
193  else if (event->type() == OutputEvent::kStopped)
194  {
195  if (m_streamList)
196  {
197  MythUIButtonListItem *item = m_streamList->GetItemByData(QVariant::fromValue(m_currStream));
198  if (item)
199  {
200  item->SetFontState("normal");
201  item->DisplayState("stopped", "playstate");
202  }
203  }
204 
205  // pass it on to the default handler in MusicCommon
206  handled = false;
207  }
208  else if (event->type() == OutputEvent::kBuffering)
209  {
210  }
211  else if (event->type() == MythEvent::kMythEventMessage)
212  {
213  auto *me = dynamic_cast<MythEvent *>(event);
214  if (me == nullptr)
215  return;
216  QStringList tokens = me->Message().split(" ", Qt::SkipEmptyParts);
217 
218  if (tokens.isEmpty())
219  return;
220 
221  if (tokens[0] == "DOWNLOAD_FILE")
222  {
223  QStringList args = me->ExtraDataList();
224 
225  if (tokens[1] == "UPDATE")
226  {
227  }
228  else if (tokens[1] == "FINISHED")
229  {
230  QString url = args[0];
231  int fileSize = args[2].toInt();
232  int errorCode = args[4].toInt();
233  QString filename = args[1];
234 
235  if ((errorCode != 0) || (fileSize == 0))
236  LOG(VB_GENERAL, LOG_ERR, QString("StreamView: failed to download radio icon from '%1'").arg(url));
237  else
238  {
239  for (int x = 0; x < m_streamList->GetCount(); x++)
240  {
242  auto *mdata = item->GetData().value<MusicMetadata *>();
243  if (mdata && mdata->LogoUrl() == url)
244  item->SetImage(filename);
245  }
246  }
247  }
248  }
249  }
250  else if (event->type() == DecoderHandlerEvent::kOperationStart)
251  {
252  auto *dhe = dynamic_cast<DecoderHandlerEvent*>(event);
253  if (!dhe)
254  return;
255  if (dhe->getMessage() && m_bufferStatus)
256  {
257  m_bufferStatus->SetText(*dhe->getMessage());
258  }
259  }
260  else if (event->type() == DecoderHandlerEvent::kBufferStatus)
261  {
262  auto *dhe = dynamic_cast<DecoderHandlerEvent*>(event);
263  if (!dhe)
264  return;
265 
266  int available = 0;
267  int maxSize = 0;
268  dhe->getBufferStatus(&available, &maxSize);
269 
270  if (m_bufferStatus)
271  {
272  QString status = QString("%1%").arg((int)(100.0 / ((double)maxSize / (double)available)));
273  m_bufferStatus->SetText(status);
274  }
275 
276  if (m_bufferProgress)
277  {
278  m_bufferProgress->SetTotal(maxSize);
279  m_bufferProgress->SetUsed(available);
280  }
281  }
282  else if (event->type() == DecoderHandlerEvent::kOperationStop)
283  {
284  if (m_bufferStatus)
286  }
287  else if (event->type() == DialogCompletionEvent::kEventType)
288  {
289  auto *dce = dynamic_cast<DialogCompletionEvent*>(event);
290 
291  // make sure the user didn't ESCAPE out of the menu
292  if ((dce == nullptr) || (dce->GetResult() < 0))
293  return;
294 
295  QString resultid = dce->GetId();
296  QString resulttext = dce->GetResultText();
297 
298  if (resultid == "mainmenu")
299  {
300  if (resulttext == tr("Add Stream"))
301  {
303  MythScreenType *screen = new EditStreamMetadata(mainStack, this, nullptr);
304 
305  if (screen->Create())
306  mainStack->AddScreen(screen);
307  else
308  delete screen;
309  }
310  else if (resulttext == tr("Remove Stream"))
311  {
312  removeStream();
313  }
314  else if (resulttext == tr("Edit Stream"))
315  {
316  editStream();
317  }
318  else
319  handled = false;
320  }
321  else
322  handled = false;
323  }
324  else
325  handled = false;
326 
327 
328  if (!handled)
330 }
331 
332 bool StreamView::keyPressEvent(QKeyEvent *event)
333 {
334  if (GetFocusWidget() && GetFocusWidget()->keyPressEvent(event))
335  return true;
336 
337  QStringList actions;
338  bool handled = GetMythMainWindow()->TranslateKeyPress("Music", event, actions);
339 
340  for (int i = 0; i < actions.size() && !handled; i++)
341  {
342  QString action = actions[i];
343  handled = true;
344 
345  if (action == "EDIT")
346  {
347  editStream();
348  }
349  else if (action == "DELETE")
350  {
351  removeStream();
352  }
353  else if (action == "TOGGLELAST")
354  {
356  {
357  m_streamList->SetValueByData(QVariant::fromValue(m_lastStream));
358 
360  if (item)
361  streamItemClicked(item);
362  }
363  }
364  else
365  handled = false;
366  }
367 
368  if (!handled && MusicCommon::keyPressEvent(event))
369  handled = true;
370 
371  return handled;
372 }
373 
375 {
377  if (item)
378  {
379  auto *mdata = item->GetData().value<MusicMetadata *>();
381  MythScreenType *screen = new EditStreamMetadata(mainStack, this, mdata);
382 
383  if (screen->Create())
384  mainStack->AddScreen(screen);
385  else
386  delete screen;
387  }
388 }
389 
391 {
393  if (item)
394  {
395  auto *mdata = item->GetData().value<MusicMetadata *>();
396 
397  if (mdata)
398  {
399  ShowOkPopup(tr("Are you sure you want to delete this Stream?\n"
400  "Broadcaster: %1 - Channel: %2")
401  .arg(mdata->Broadcaster(), mdata->Channel()),
402  this, &StreamView::doRemoveStream, true);
403  }
404  }
405 }
406 
408 {
409  if (!ok)
410  return;
411 
413  if (item)
414  {
415  auto *mdata = item->GetData().value<MusicMetadata *>();
416 
417  if (mdata)
418  deleteStream(mdata);
419  }
420 }
421 
423 {
424  if (!gPlayer->getCurrentPlaylist())
425  return;
426 
427  m_streamList->Reset();
428 
429  bool foundActiveStream = false;
430 
431  for (int x = 0; x < gPlayer->getCurrentPlaylist()->getTrackCount(); x++)
432  {
434  auto *item = new MythUIButtonListItem(m_streamList, "",
435  QVariant::fromValue(mdata));
436  InfoMap metadataMap;
437  if (mdata)
438  mdata->toMap(metadataMap);
439  item->SetTextFromMap(metadataMap);
440  item->SetText("", "imageloaded");
441  item->SetFontState("normal");
442  item->DisplayState("default", "playstate");
443 
444  // if this is the current radio stream update its play state to match the player
445  if (gPlayer->getCurrentMetadata() && mdata &&
446  mdata->ID() == gPlayer->getCurrentMetadata()->ID())
447  {
448  if (gPlayer->isPlaying())
449  {
450  item->SetFontState("running");
451  item->DisplayState("playing", "playstate");
452  }
453  else if (gPlayer->isPaused())
454  {
455  item->SetFontState("idle");
456  item->DisplayState("paused", "playstate");
457  }
458  else
459  {
460  item->SetFontState("normal");
461  item->DisplayState("stopped", "playstate");
462  }
463 
465 
467 
468  foundActiveStream = true;
469  }
470  }
471 
472  if (m_streamList->GetCount() > 0 && !foundActiveStream)
473  {
475  gPlayer->stop(true);
476  }
477 
478  if (m_noStreams)
480 
481  if (m_streamList->GetCount() == 0)
482  LOG(VB_GENERAL, LOG_ERR, "StreamView hasn't found any streams!");
483 }
484 
486 {
487  if (!item)
488  return;
489 
491 }
492 
494 {
495  if (!item)
496  return;
497 
498  if (!item->GetText("imageloaded").isEmpty())
499  return;
500 
501  auto *mdata = item->GetData().value<MusicMetadata *>();
502  if (mdata)
503  {
504  if (!mdata->LogoUrl().isEmpty())
505  item->SetImage(mdata->getAlbumArtFile());
506  else
507  item->SetImage("");
508  }
509 
510  item->SetText(" ", "imageloaded");
511 }
512 
514 {
515  // sanity check this is a radio stream
516  int repo = ID_TO_REPO(mdata->ID());
517  if (repo != RT_Radio)
518  {
519  LOG(VB_GENERAL, LOG_ERR, "StreamView asked to add a stream but it isn't a radio stream!");
520  return;
521  }
522 
523  QString url = mdata->Url();
524 
526 
528 
530 
531  // find the new stream and make it the active item
532  for (int x = 0; x < m_streamList->GetCount(); x++)
533  {
535  auto *itemsdata = item->GetData().value<MusicMetadata *>();
536  if (itemsdata)
537  {
538  if (url == itemsdata->Url())
539  {
541  break;
542  }
543  }
544  }
545 }
546 
548 {
549  // sanity check this is a radio stream
550  int repo = ID_TO_REPO(mdata->ID());
551  if (repo != RT_Radio)
552  {
553  LOG(VB_GENERAL, LOG_ERR, "StreamView asked to update a stream but it isn't a radio stream!");
554  return;
555  }
556 
557  MusicMetadata::IdType id = mdata->ID();
558 
560 
562 
563  // update mdata to point to the new item
564  mdata = gMusicData->m_all_streams->getMetadata(id);
565 
566  if (!mdata)
567  return;
568 
569  // force the icon to reload incase it changed
570  QFile::remove(mdata->getAlbumArtFile());
571  mdata->reloadAlbumArtImages();
572 
574 
575  // if we just edited the currently playing stream update the current metadata to match
576  MusicMetadata *currentMetadata = gPlayer->getCurrentMetadata();
577  if (id == currentMetadata->ID())
578  {
579  currentMetadata->setBroadcaster(mdata->Broadcaster());
580  currentMetadata->setChannel(mdata->Channel());
581  }
582 
583  // update the played tracks list to match the new metadata
584  if (m_playedTracksList)
585  {
586  for (int x = 0; x < m_playedTracksList->GetCount(); x++)
587  {
589  auto *playedmdata = item->GetData().value<MusicMetadata *>();
590 
591  if (playedmdata && playedmdata->ID() == id)
592  {
593  playedmdata->setBroadcaster(mdata->Broadcaster());
594  playedmdata->setChannel(mdata->Channel());
595 
596  InfoMap metadataMap;
597  playedmdata->toMap(metadataMap);
598  item->SetTextFromMap(metadataMap);
599  }
600  }
601  }
602 
603  // find the stream and make it the active item
604  for (int x = 0; x < m_streamList->GetCount(); x++)
605  {
607  auto *itemsdata = item->GetData().value<MusicMetadata *>();
608  if (itemsdata)
609  {
610  if (mdata->ID() == itemsdata->ID())
611  {
613  break;
614  }
615  }
616  }
617 }
618 
620 {
621  // sanity check this is a radio stream
622  int repo = ID_TO_REPO(mdata->ID());
623  if (repo != RT_Radio)
624  {
625  LOG(VB_GENERAL, LOG_ERR, "StreamView asked to delete a stream but it isn't a radio stream!");
626  return;
627  }
628 
629  int currPos = m_streamList->GetCurrentPos();
630  int topPos = m_streamList->GetTopItemPos();
631 
632  // if we are playing this radio stream stop playing
633  if (gPlayer->getCurrentMetadata() == mdata)
634  gPlayer->stop(true);
635 
637 
639 
641 
642  m_streamList->SetItemCurrent(currPos, topPos);
643 }
644 
646 
648 {
649  if (!LoadWindowFromXML("stream-ui.xml", "editstreammetadata", this))
650  return false;
651 
652  bool err = false;
653  UIUtilE::Assign(this, m_broadcasterEdit, "broadcasteredit", &err);
654  UIUtilE::Assign(this, m_channelEdit, "channeledit", &err);
655  UIUtilE::Assign(this, m_descEdit, "descriptionedit", &err);
656  UIUtilE::Assign(this, m_url1Edit, "url1edit", &err);
657  UIUtilE::Assign(this, m_url2Edit, "url2edit", &err);
658  UIUtilE::Assign(this, m_url3Edit, "url3edit", &err);
659  UIUtilE::Assign(this, m_url4Edit, "url4edit", &err);
660  UIUtilE::Assign(this, m_url5Edit, "url5edit", &err);
661  UIUtilE::Assign(this, m_logourlEdit, "logourledit" , &err);
662  UIUtilE::Assign(this, m_genreEdit, "genreedit", &err);
663  UIUtilE::Assign(this, m_languageEdit, "languageedit", &err);
664  UIUtilE::Assign(this, m_countryEdit, "countryedit", &err);
665  UIUtilE::Assign(this, m_formatEdit, "formatedit", &err);
666  UIUtilE::Assign(this, m_saveButton, "savebutton", &err);
667  UIUtilE::Assign(this, m_cancelButton, "cancelbutton", &err);
668  UIUtilE::Assign(this, m_searchButton, "searchbutton", &err);
669 
670  if (err)
671  {
672  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'editstreampopup'");
673  return false;
674  }
675 
676  if (m_streamMeta)
677  {
691  }
692  else
693  m_formatEdit->SetText("%a - %t");
694 
698 
699  BuildFocusList();
700 
701  return true;
702 }
703 
705 {
707  MythScreenType *screen = new SearchStream(mainStack, this);
708 
709  if (screen->Create())
710  mainStack->AddScreen(screen);
711  else
712  delete screen;
713 
714 }
715 
717 {
718  bool doUpdate = true;
719 
720  if (!m_streamMeta)
721  {
724  doUpdate = false;
725  }
726 
734  m_streamMeta->setFormat("cast");
741 
742  if (doUpdate)
744  else
746 
747  Close();
748 }
749 
751 {
752  if (mdata)
753  {
755  m_channelEdit->SetText(mdata->Channel());
756  m_url1Edit->SetText(mdata->Url(0));
757  m_url2Edit->SetText(mdata->Url(1));
758  m_url3Edit->SetText(mdata->Url(2));
759  m_url4Edit->SetText(mdata->Url(3));
760  m_url5Edit->SetText(mdata->Url(4));
761  m_logourlEdit->SetText(mdata->LogoUrl());
762  m_genreEdit->SetText(mdata->Genre());
764  m_descEdit->SetText(mdata->Description());
765  m_countryEdit->SetText(mdata->Country());
766  m_languageEdit->SetText(mdata->Language());
767  }
768 }
769 
771 
773 {
774  if (!LoadWindowFromXML("stream-ui.xml", "searchstream", this))
775  return false;
776 
777  bool err = false;
778  UIUtilE::Assign(this, m_broadcasterList, "broadcasterlist", &err);
779  UIUtilE::Assign(this, m_genreList, "genrelist", &err);
780  UIUtilW::Assign(this, m_languageList, "languagelist", &err);
781  UIUtilW::Assign(this, m_countryList, "countrylist", &err);
782  UIUtilE::Assign(this, m_streamList, "streamlist", &err);
783  UIUtilE::Assign(this, m_channelEdit, "channeledit", &err);
784  UIUtilE::Assign(this, m_matchesText, "matchestext", &err);
785 
786  if (err)
787  {
788  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'searchstream'");
789  return false;
790  }
791 
794  m_matchesText->SetText("");
795 
804 
805 
806  if (m_countryList)
807  {
810 
814  }
815 
816  if (m_languageList)
817  {
821  }
822 
824 
825  LoadInBackground("Loading Streams...");
826 
827  BuildFocusList();
828 
829  return true;
830 }
831 
833 {
834  loadStreams();
835  QTimer::singleShot(0, this, &SearchStream::doneLoading);
836 }
837 
839 {
841  updateGenres();
842  updateLanguages();
843  updateCountries();
844  doUpdateStreams();
845 }
846 
848 {
849  if (!item)
850  return;
851 
852  auto mdata = item->GetData().value<MusicMetadata>();
854 
855  Close();
856 }
857 
859 {
860  if (!item)
861  return;
862 
863  auto mdata = item->GetData().value<MusicMetadata>();
864  if (!mdata.LogoUrl().isEmpty() && mdata.LogoUrl() != "-")
865  {
866  if (item->GetText("dummy") == " ")
867  {
868  item->SetImage(mdata.LogoUrl());
869  item->SetText("", "dummy");
870  }
871  }
872 }
873 
875 {
877 }
878 
880 {
882 
883  new MythUIButtonListItem(m_broadcasterList, tr("<All Broadcasters>"));
884 
885  MSqlQuery query(MSqlQuery::InitCon());
886 
887  query.prepare("SELECT DISTINCT broadcaster FROM music_streams ORDER BY broadcaster;");
888 
889  if (!query.exec() || !query.isActive())
890  {
891  MythDB::DBError("get broadcaster", query);
892  return;
893  }
894 
895  while (query.next())
896  {
897  new MythUIButtonListItem(m_broadcasterList, query.value(0).toString());
898  }
899 
900  m_broadcasterList->SetValue(tr("<All Broadcasters>"));
901 }
902 
904 {
905  m_genreList->Reset();
906 
907  new MythUIButtonListItem(m_genreList, tr("<All Genres>"));
908 
909  MSqlQuery query(MSqlQuery::InitCon());
910 
911  query.prepare("SELECT DISTINCT genre FROM music_streams ORDER BY genre;");
912 
913  if (!query.exec() || !query.isActive())
914  {
915  MythDB::DBError("get genres", query);
916  return;
917  }
918 
919  while (query.next())
920  {
921  new MythUIButtonListItem(m_genreList, query.value(0).toString());
922  }
923 
924  m_genreList->SetValue(tr("<All Genres>"));
925 }
926 
928 {
929  if (m_countryList)
930  {
931  m_countryList->Reset();
932 
933  new MythUIButtonListItem(m_countryList, tr("<All Countries>"));
934 
935  MSqlQuery query(MSqlQuery::InitCon());
936 
937  query.prepare("SELECT DISTINCT country FROM music_streams ORDER BY country;");
938 
939  if (!query.exec() || !query.isActive())
940  {
941  MythDB::DBError("get countries", query);
942  return;
943  }
944 
945  while (query.next())
946  {
947  new MythUIButtonListItem(m_countryList, query.value(0).toString());
948  }
949 
950  m_countryList->SetValue(tr("<All Countries>"));
951  }
952 }
953 
955 {
956  if (m_languageList)
957  {
959 
960  new MythUIButtonListItem(m_languageList, tr("<All Languages>"));
961 
962  MSqlQuery query(MSqlQuery::InitCon());
963 
964  query.prepare("SELECT DISTINCT language FROM music_streams ORDER BY language;");
965 
966  if (!query.exec() || !query.isActive())
967  {
968  MythDB::DBError("get languages", query);
969  return;
970  }
971 
972  while (query.next())
973  {
974  new MythUIButtonListItem(m_languageList, query.value(0).toString());
975  }
976 
977  m_languageList->SetValue(tr("<All Languages>"));
978  }
979 }
980 
982 {
983  if (m_updateTimer.isActive())
984  m_updateTimer.stop();
985 
986  m_updateTimer.start(500ms);
987 }
988 
990 {
991  if (m_updating)
992  return;
993 
994  QString broadcaster = m_broadcasterList->GetValue();
995  QString genre = m_genreList->GetValue();
996  QString language = m_languageList ? m_languageList->GetValue() : tr("<All Languages>");
997  QString country = m_countryList ? m_countryList->GetValue() : tr("<All Countries>");
998  QString channel = m_channelEdit->GetText();
999 
1000  // only update the buttonlist if something changed
1001  if (m_oldBroadcaster == broadcaster && m_oldGenre == genre && m_oldChannel == channel &&
1002  m_oldLanguage == language && m_oldCountry == country)
1003  return;
1004 
1005  m_oldBroadcaster = broadcaster;
1006  m_oldGenre = genre;
1007  m_oldChannel = channel;
1008  m_oldLanguage = language;
1009  m_oldCountry = country;
1010 
1011  bool searchBroadcaster = (broadcaster != tr("<All Broadcasters>"));
1012  bool searchGenre = (genre != tr("<All Genres>"));
1013  bool searchLanguage = (language != tr("<All Languages>"));
1014  bool searchCountry = (country != tr("<All Countries>"));
1015  bool searchChannel = !channel.isEmpty();
1016 
1017  m_streams.clear();
1018  m_streamList->Reset();
1019 
1020  MSqlQuery query(MSqlQuery::InitCon());
1021 
1022  QString sql = "SELECT broadcaster, channel, description, genre, url1, url2, url3, url4, url5, "
1023  "logourl, metaformat, country, language "
1024  "FROM music_streams ";
1025  bool doneWhere = false;
1026 
1027  if (searchBroadcaster)
1028  {
1029  sql += "WHERE broadcaster = :BROADCASTER ";
1030  doneWhere = true;
1031  }
1032 
1033  if (searchGenre)
1034  {
1035  if (!doneWhere)
1036  {
1037  sql += "WHERE genre = :GENRE ";
1038  doneWhere = true;
1039  }
1040  else
1041  sql += "AND genre = :GENRE ";
1042  }
1043 
1044  if (searchLanguage)
1045  {
1046  if (!doneWhere)
1047  {
1048  sql += "WHERE language = :LANGUAGE ";
1049  doneWhere = true;
1050  }
1051  else
1052  sql += "AND language = :LANGUAGE ";
1053  }
1054 
1055  if (searchCountry)
1056  {
1057  if (!doneWhere)
1058  {
1059  sql += "WHERE country = :COUNTRY ";
1060  doneWhere = true;
1061  }
1062  else
1063  sql += "AND country = :COUNTRY ";
1064  }
1065 
1066  if (searchChannel)
1067  {
1068  if (!doneWhere)
1069  {
1070  sql += "WHERE channel LIKE " + QString("'%%1%'").arg(channel);
1071  // doneWhere = true;
1072  }
1073  else
1074  sql += "AND channel LIKE " + QString("'%%1%' ").arg(channel);
1075  }
1076 
1077  sql += "ORDER BY broadcaster, channel;";
1078 
1079  query.prepare(sql);
1080 
1081  if (searchBroadcaster)
1082  query.bindValue(":BROADCASTER", broadcaster);
1083 
1084  if (searchGenre)
1085  query.bindValue(":GENRE", genre);
1086 
1087  if (searchLanguage)
1088  query.bindValue(":LANGUAGE", language);
1089 
1090  if (searchCountry)
1091  query.bindValue(":COUNTRY", country);
1092 
1093  if (!query.exec() || !query.isActive())
1094  {
1095  MythDB::DBError("search streams", query);
1096  return;
1097  }
1098 
1099  if (query.size() > 500)
1100  {
1101  QString message = tr("Updating stream list. Please Wait ...");
1102  OpenBusyPopup(message);
1103  }
1104 
1105  int count = 0;
1106  while (query.next())
1107  {
1108  MusicMetadata mdata;
1109  mdata.setBroadcaster(query.value(0).toString());
1110  mdata.setChannel(query.value(1).toString());
1111  mdata.setDescription(query.value(2).toString());
1112  mdata.setGenre(query.value(3).toString());
1113 
1114  for (size_t x = 0; x < STREAMURLCOUNT; x++)
1115  mdata.setUrl(query.value(4 + x).toString(), x);
1116 
1117  mdata.setLogoUrl(query.value(9).toString());
1118  mdata.setMetadataFormat(query.value(10).toString());
1119  mdata.setCountry(query.value(11).toString());
1120  mdata.setLanguage(query.value(12).toString());
1121 
1122  auto *item = new MythUIButtonListItem(m_streamList, "",
1123  QVariant::fromValue(mdata));
1124  InfoMap metadataMap;
1125  mdata.toMap(metadataMap);
1126 
1127  item->SetTextFromMap(metadataMap);
1128 
1129  item->SetText(" ", "dummy");
1130  count++;
1131 
1132  if ((count % 500) == 0)
1133  {
1134  qApp->processEvents();
1135  }
1136  }
1137 
1138  m_matchesText->SetText(QString("%1").arg(m_streamList->GetCount()));
1139 
1140  if (query.size() > 500)
1141  CloseBusyPopup();
1142 
1143  m_updating = false;
1144 }
MythUIButton::Clicked
void Clicked()
MusicCommon::m_currentView
MusicView m_currentView
Definition: musiccommon.h:141
StreamView::streamItemClicked
void streamItemClicked(MythUIButtonListItem *item)
Definition: streamview.cpp:485
MythUIButtonList::GetItemAt
MythUIButtonListItem * GetItemAt(int pos) const
Definition: mythuibuttonlist.cpp:1677
MSqlQuery::isActive
bool isActive(void) const
Definition: mythdbcon.h:215
MythScreenType::LoadInBackground
void LoadInBackground(const QString &message="")
Definition: mythscreentype.cpp:286
MSqlQuery::next
bool next(void)
Wrap QSqlQuery::next() so we can display the query results.
Definition: mythdbcon.cpp:813
MSqlQuery
QSqlQuery wrapper that fetches a DB connection from the connection pool.
Definition: mythdbcon.h:127
build_compdb.args
args
Definition: build_compdb.py:11
MythMainWindow::GetMainStack
MythScreenStack * GetMainStack()
Definition: mythmainwindow.cpp:318
SearchStream::m_oldLanguage
QString m_oldLanguage
Definition: streamview.h:131
MythUIButtonList::GetTopItemPos
int GetTopItemPos(void) const
Definition: mythuibuttonlist.h:240
StreamView::updateStreamList
void updateStreamList(void)
Definition: streamview.cpp:422
StreamView::m_bufferStatus
MythUIText * m_bufferStatus
Definition: streamview.h:49
gPlayer
MusicPlayer * gPlayer
Definition: musicplayer.cpp:37
MSqlQuery::size
int size(void) const
Definition: mythdbcon.h:214
Playlist::getSongAt
MusicMetadata * getSongAt(int pos) const
Definition: playlist.cpp:1089
MythUIButtonList::GetItemCurrent
MythUIButtonListItem * GetItemCurrent() const
Definition: mythuibuttonlist.cpp:1591
hardwareprofile.smolt.timeout
float timeout
Definition: smolt.py:102
AllStream::updateStream
void updateStream(MusicMetadata *mdata)
Definition: musicmetadata.cpp:1855
MythUIButtonList::SetValueByData
void SetValueByData(const QVariant &data)
Definition: mythuibuttonlist.cpp:1543
MusicPlayer::setCurrentTrackPos
bool setCurrentTrackPos(int pos)
Definition: musicplayer.cpp:1047
mythuitext.h
mythuiprogressbar.h
EditStreamMetadata::m_searchButton
MythUIButton * m_searchButton
Definition: streamview.h:92
MusicMetadata::LogoUrl
QString LogoUrl(void)
Definition: musicmetadata.h:275
SearchStream::doneLoading
void doneLoading(void)
Definition: streamview.cpp:838
MythEvent::kMythEventMessage
static const Type kMythEventMessage
Definition: mythevent.h:79
EditStreamMetadata::searchClicked
void searchClicked(void)
Definition: streamview.cpp:704
DialogCompletionEvent::GetId
QString GetId()
Definition: mythdialogbox.h:52
MusicMetadata::Genre
QString Genre() const
Definition: musicmetadata.h:175
AllStream::addStream
void addStream(MusicMetadata *mdata)
Definition: musicmetadata.cpp:1802
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:82
StreamView::Create
bool Create(void) override
Definition: streamview.cpp:39
MusicMetadata::setDescription
void setDescription(const QString &description)
Definition: musicmetadata.h:268
MusicMetadata::setBroadcaster
void setBroadcaster(const QString &broadcaster)
Definition: musicmetadata.h:262
MythUIButtonListItem::DisplayState
void DisplayState(const QString &state, const QString &name)
Definition: mythuibuttonlist.cpp:3558
MusicCommon::CreateCommon
bool CreateCommon(void)
Definition: musiccommon.cpp:76
MusicPlayerEvent
Definition: musicplayer.h:20
MusicMetadata::MetadataFormat
QString MetadataFormat(void)
Definition: musicmetadata.h:278
MythScreenType::Close
virtual void Close()
Definition: mythscreentype.cpp:386
MusicPlayer::loadStreamPlaylist
void loadStreamPlaylist(void)
Definition: musicplayer.cpp:1008
SearchStream::m_oldCountry
QString m_oldCountry
Definition: streamview.h:130
MusicCommon::keyPressEvent
bool keyPressEvent(QKeyEvent *e) override
Key event handler.
Definition: musiccommon.cpp:573
MusicMetadata::Url
QString Url(size_t index=0)
Definition: musicmetadata.cpp:660
StreamView::ShowMenu
void ShowMenu(void) override
Definition: streamview.cpp:77
SearchStream::doUpdateStreams
void doUpdateStreams(void)
Definition: streamview.cpp:989
SearchStream
Definition: streamview.h:97
SearchStream::m_genreList
MythUIButtonList * m_genreList
Definition: streamview.h:134
SearchStream::m_oldBroadcaster
QString m_oldBroadcaster
Definition: streamview.h:127
EditStreamMetadata::m_url3Edit
MythUITextEdit * m_url3Edit
Definition: streamview.h:83
AllStream::getMetadata
MusicMetadata * getMetadata(MusicMetadata::IdType an_id)
Definition: musicmetadata.cpp:1742
MusicCommon::createSubMenu
MythMenu * createSubMenu(void)
Definition: musiccommon.cpp:2248
MythUIButtonList::itemSelected
void itemSelected(MythUIButtonListItem *item)
MythEvent
This class is used as a container for messages.
Definition: mythevent.h:16
mythcoreutil.h
SearchStream::updateLanguages
void updateLanguages(void)
Definition: streamview.cpp:954
MythUIProgressBar::SetUsed
void SetUsed(int value)
Definition: mythuiprogressbar.cpp:69
mythdialogbox.h
MSqlQuery::value
QVariant value(int i) const
Definition: mythdbcon.h:204
MythScreenStack
Definition: mythscreenstack.h:16
MythScreenType::Create
virtual bool Create(void)
Definition: mythscreentype.cpp:266
mythdbcon.h
MusicMetadata::setChannel
void setChannel(const QString &channel)
Definition: musicmetadata.h:265
STREAMURLCOUNT
static constexpr size_t STREAMURLCOUNT
Definition: musicmetadata.h:76
MusicMetadata::ID
IdType ID() const
Definition: musicmetadata.h:218
MSqlQuery::exec
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
Definition: mythdbcon.cpp:619
StreamView::doRemoveStream
void doRemoveStream(bool ok)
Definition: streamview.cpp:407
MusicPlayer::isPlaying
bool isPlaying(void) const
Definition: musicplayer.h:109
MythScreenType::OpenBusyPopup
void OpenBusyPopup(const QString &message="")
Definition: mythscreentype.cpp:320
EditStreamMetadata::m_logourlEdit
MythUITextEdit * m_logourlEdit
Definition: streamview.h:86
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition: mythscreentype.h:45
SearchStream::m_updating
bool m_updating
Definition: streamview.h:142
StreamView::m_bufferProgress
MythUIProgressBar * m_bufferProgress
Definition: streamview.h:50
MusicMetadata
Definition: musicmetadata.h:80
EditStreamMetadata::m_url5Edit
MythUITextEdit * m_url5Edit
Definition: streamview.h:85
SearchStream::updateGenres
void updateGenres(void)
Definition: streamview.cpp:903
MythUITextEdit::GetText
QString GetText(void) const
Definition: mythuitextedit.h:50
MusicPlayer::getCurrentPlaylist
Playlist * getCurrentPlaylist(void)
Definition: musicplayer.cpp:1611
SearchStream::streamClicked
void streamClicked(MythUIButtonListItem *item)
Definition: streamview.cpp:847
mythdirs.h
StreamView::updateStream
void updateStream(MusicMetadata *mdata)
Definition: streamview.cpp:547
EditStreamMetadata::Create
bool Create() override
Definition: streamview.cpp:647
MusicPlayer::setPlayMode
void setPlayMode(PlayMode mode)
Definition: musicplayer.cpp:964
mythuibuttonlist.h
MythUIButtonList::GetCount
int GetCount() const
Definition: mythuibuttonlist.cpp:1656
MV_RADIO
@ MV_RADIO
Definition: musiccommon.h:42
SearchStream::updateCountries
void updateCountries(void)
Definition: streamview.cpp:927
musicutils.h
MythEvent::Message
const QString & Message() const
Definition: mythevent.h:65
MythUIButtonList::GetItemByData
MythUIButtonListItem * GetItemByData(const QVariant &data)
Definition: mythuibuttonlist.cpp:1685
ID_TO_REPO
static constexpr uint32_t ID_TO_REPO(uint32_t x)
Definition: musicmetadata.h:71
MythScreenType::GetFocusWidget
MythUIType * GetFocusWidget(void) const
Definition: mythscreentype.cpp:113
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:3268
EditStreamMetadata::saveClicked
void saveClicked(void)
Definition: streamview.cpp:716
MusicPlayerEvent::kPlayedTracksChangedEvent
static const Type kPlayedTracksChangedEvent
Definition: musicplayer.h:50
MusicPlayer::getCurrentMetadata
MusicMetadata * getCurrentMetadata(void)
get the metadata for the current track in the playlist
Definition: musicplayer.cpp:1170
mythuiutils.h
MythUIButtonListItem
Definition: mythuibuttonlist.h:41
SearchStream::m_countryList
MythUIButtonList * m_countryList
Definition: streamview.h:135
MythUITextEdit::SetText
void SetText(const QString &text, bool moveCursor=true)
Definition: mythuitextedit.cpp:197
MusicMetadata::Channel
QString Channel(void)
Definition: musicmetadata.h:266
OutputEvent::kStopped
static const Type kStopped
Definition: output.h:67
DecoderHandlerEvent
Events sent by the DecoderHandler and it's helper classes.
Definition: decoderhandler.h:25
MythUIProgressBar::SetTotal
void SetTotal(int value)
Definition: mythuiprogressbar.cpp:81
SearchStream::Create
bool Create() override
Definition: streamview.cpp:772
StreamView::m_streamList
MythUIButtonList * m_streamList
Definition: streamview.h:47
DecoderHandlerEvent::getBufferStatus
void getBufferStatus(int *available, int *maxSize) const
Definition: decoderhandler.cpp:61
EditStreamMetadata::m_formatEdit
MythUITextEdit * m_formatEdit
Definition: streamview.h:87
MusicMetadata::Description
QString Description(void)
Definition: musicmetadata.h:269
EditStreamMetadata::m_cancelButton
MythUIButton * m_cancelButton
Definition: streamview.h:93
EditStreamMetadata::m_broadcasterEdit
MythUITextEdit * m_broadcasterEdit
Definition: streamview.h:78
MythUIButtonList::itemClicked
void itemClicked(MythUIButtonListItem *item)
MythMainWindow::TranslateKeyPress
bool TranslateKeyPress(const QString &Context, QKeyEvent *Event, QStringList &Actions, bool AllowJumps=true)
Get a list of actions for a keypress in the given context.
Definition: mythmainwindow.cpp:1112
MythUIButtonList::GetCurrentPos
int GetCurrentPos() const
Definition: mythuibuttonlist.h:238
RT_Radio
@ RT_Radio
Definition: musicmetadata.h:62
MusicMetadata::toMap
void toMap(InfoMap &metadataMap, const QString &prefix="")
Definition: musicmetadata.cpp:1088
EditStreamMetadata::m_channelEdit
MythUITextEdit * m_channelEdit
Definition: streamview.h:79
MV_VISUALIZER
@ MV_VISUALIZER
Definition: musiccommon.h:37
StreamView::m_currStream
MusicMetadata * m_currStream
Definition: streamview.h:52
MusicPlayerEvent::kTrackChangeEvent
static const Type kTrackChangeEvent
Definition: musicplayer.h:39
MythDialogBox
Basic menu dialog, message and a list of options.
Definition: mythdialogbox.h:166
menu
static MythThemedMenu * menu
Definition: mythtv-setup.cpp:58
MSqlQuery::InitCon
static MSqlQueryInfo InitCon(ConnectionReuse _reuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
Definition: mythdbcon.cpp:551
MusicMetadata::Language
QString Language(void)
Definition: musicmetadata.h:284
DecoderHandlerEvent::kOperationStart
static const Type kOperationStart
Definition: decoderhandler.h:49
MusicMetadata::getAlbumArtFile
QString getAlbumArtFile(void)
Definition: musicmetadata.cpp:1258
MusicMetadata::setLanguage
void setLanguage(const QString &language)
Definition: musicmetadata.h:283
MythDB::DBError
static void DBError(const QString &where, const MSqlQuery &query)
Definition: mythdb.cpp:226
SearchStream::m_channelEdit
MythUITextEdit * m_channelEdit
Definition: streamview.h:137
MusicMetadata::setGenre
void setGenre(const QString &lgenre)
Definition: musicmetadata.h:176
MusicData::m_all_streams
AllStream * m_all_streams
Definition: musicdata.h:57
SearchStream::m_broadcasterList
MythUIButtonList * m_broadcasterList
Definition: streamview.h:133
MythScreenType::BuildFocusList
void BuildFocusList(void)
Definition: mythscreentype.cpp:206
StreamView::m_lastStream
MusicMetadata * m_lastStream
Definition: streamview.h:53
StreamView::deleteStream
void deleteStream(MusicMetadata *mdata)
Definition: streamview.cpp:619
StreamView::streamItemVisible
static void streamItemVisible(MythUIButtonListItem *item)
Definition: streamview.cpp:493
StreamView::addStream
void addStream(MusicMetadata *mdata)
Definition: streamview.cpp:513
MusicMetadata::updateStreamList
static bool updateStreamList(void)
Definition: musicmetadata.cpp:316
MusicMetadata::setMetadataFormat
void setMetadataFormat(const QString &metaformat)
Definition: musicmetadata.h:277
SearchStream::m_streamList
MythUIButtonList * m_streamList
Definition: streamview.h:138
AllStream::removeStream
void removeStream(MusicMetadata *mdata)
Definition: musicmetadata.cpp:1838
MV_LYRICS
@ MV_LYRICS
Definition: musiccommon.h:34
MythUIButtonListItem::GetData
QVariant GetData()
Definition: mythuibuttonlist.cpp:3660
MusicPlayer::isPaused
bool isPaused(void)
Definition: musicplayer.h:110
MusicCommon::updateUIPlayedList
void updateUIPlayedList(void)
Definition: musiccommon.cpp:2084
SearchStream::m_matchesText
MythUIText * m_matchesText
Definition: streamview.h:139
EditStreamMetadata::m_streamMeta
MusicMetadata * m_streamMeta
Definition: streamview.h:76
DecoderHandlerEvent::kOperationStop
static const Type kOperationStop
Definition: decoderhandler.h:50
MythUIButtonList::itemVisible
void itemVisible(MythUIButtonListItem *item)
musicdata.h
UIUtilDisp::Assign
static bool Assign(ContainerType *container, UIType *&item, const QString &name, bool *err=nullptr)
Definition: mythuiutils.h:27
EditStreamMetadata::m_descEdit
MythUITextEdit * m_descEdit
Definition: streamview.h:80
EditStreamMetadata::m_languageEdit
MythUITextEdit * m_languageEdit
Definition: streamview.h:90
MythUIButtonListItem::SetTextFromMap
void SetTextFromMap(const InfoMap &infoMap, const QString &state="")
Definition: mythuibuttonlist.cpp:3285
OutputEvent::kPlaying
static const Type kPlaying
Definition: output.h:63
musiccommon.h
gMusicData
MusicData * gMusicData
Definition: musicdata.cpp:21
streamview.h
MythUIButtonListItem::GetText
QString GetText(const QString &name="") const
Definition: mythuibuttonlist.cpp:3315
EditStreamMetadata::m_genreEdit
MythUITextEdit * m_genreEdit
Definition: streamview.h:88
SearchStream::updateStreams
void updateStreams(void)
Definition: streamview.cpp:981
MusicMetadata::IdType
uint32_t IdType
Definition: musicmetadata.h:86
SearchStream::updateBroadcasters
void updateBroadcasters(void)
Definition: streamview.cpp:879
mythuihelper.h
MusicCommon::updateTrackInfo
void updateTrackInfo(MusicMetadata *mdata)
Definition: musiccommon.cpp:1897
MusicPlayer::getPlayedTracksList
QList< MusicMetadata * > & getPlayedTracksList(void)
Definition: musicplayer.h:141
SearchStream::m_languageList
MythUIButtonList * m_languageList
Definition: streamview.h:136
MythUIButtonListItem::SetFontState
void SetFontState(const QString &state, const QString &name="")
Definition: mythuibuttonlist.cpp:3409
MythMenu
Definition: mythdialogbox.h:99
StreamView::m_noStreams
MythUIText * m_noStreams
Definition: streamview.h:48
EditStreamMetadata::changeStreamMetadata
void changeStreamMetadata(MusicMetadata *mdata)
Definition: streamview.cpp:750
StreamView::removeStream
void removeStream(void)
Definition: streamview.cpp:390
SearchStream::m_oldGenre
QString m_oldGenre
Definition: streamview.h:128
XMLParseBase::LoadWindowFromXML
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
Definition: xmlparsebase.cpp:687
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:3424
SearchStream::m_parent
EditStreamMetadata * m_parent
Definition: streamview.h:122
SearchStream::m_updateTimer
QTimer m_updateTimer
Definition: streamview.h:141
EditStreamMetadata::m_saveButton
MythUIButton * m_saveButton
Definition: streamview.h:94
MSqlQuery::bindValue
void bindValue(const QString &placeholder, const QVariant &val)
Add a single binding.
Definition: mythdbcon.cpp:889
MusicMetadata::Country
QString Country(void)
Definition: musicmetadata.h:281
DialogCompletionEvent
Event dispatched from MythUI modal dialogs to a listening class containing a result of some form.
Definition: mythdialogbox.h:41
StreamView::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: streamview.cpp:332
MusicMetadata::setUrl
void setUrl(const QString &url, size_t index=0)
Definition: musicmetadata.cpp:654
EditStreamMetadata
Definition: streamview.h:56
MythUIButtonList::GetValue
virtual QString GetValue() const
Definition: mythuibuttonlist.cpp:1610
DecoderHandlerEvent::kBufferStatus
static const Type kBufferStatus
Definition: decoderhandler.h:48
MythUIText::SetText
virtual void SetText(const QString &text)
Definition: mythuitext.cpp:132
MythUIType::SetVisible
virtual void SetVisible(bool visible)
Definition: mythuitype.cpp:1110
mythcontext.h
DialogCompletionEvent::kEventType
static const Type kEventType
Definition: mythdialogbox.h:57
MythUIButtonList::Reset
void Reset() override
Reset the widget to it's original state, should not reset changes made by the theme.
Definition: mythuibuttonlist.cpp:116
GetMythMainWindow
MythMainWindow * GetMythMainWindow(void)
Definition: mythmainwindow.cpp:104
MythUIButtonList::SetItemCurrent
void SetItemCurrent(MythUIButtonListItem *item)
Definition: mythuibuttonlist.cpp:1558
build_compdb.action
action
Definition: build_compdb.py:9
SearchStream::Load
void Load(void) override
Load data which will ultimately be displayed on-screen or used to determine what appears on-screen (S...
Definition: streamview.cpp:832
MusicCommon::m_playedTracksList
MythUIButtonList * m_playedTracksList
Definition: musiccommon.h:206
MusicPlayer::PLAYMODE_RADIO
@ PLAYMODE_RADIO
Definition: musicplayer.h:73
SearchStream::streamVisible
static void streamVisible(MythUIButtonListItem *item)
Definition: streamview.cpp:858
mythuibutton.h
MusicMetadata::Broadcaster
QString Broadcaster(void)
Definition: musicmetadata.h:263
MythMainWindow::GetStack
MythScreenStack * GetStack(const QString &Stackname)
Definition: mythmainwindow.cpp:323
MusicMetadata::setRepo
void setRepo(RepoType repo)
Definition: musicmetadata.h:220
SearchStream::loadStreams
static void loadStreams(void)
Definition: streamview.cpp:874
MythUITextEdit::valueChanged
void valueChanged()
MusicMetadata::reloadAlbumArtImages
void reloadAlbumArtImages(void)
Definition: musicmetadata.cpp:1372
SearchStream::m_streams
QList< MusicMetadata > m_streams
Definition: streamview.h:123
EditStreamMetadata::m_countryEdit
MythUITextEdit * m_countryEdit
Definition: streamview.h:89
MusicPlayer::stop
void stop(bool stopAll=false)
Definition: musicplayer.cpp:249
OutputEvent::kBuffering
static const Type kBuffering
Definition: output.h:64
StreamView::editStream
void editStream(void)
Definition: streamview.cpp:374
EditStreamMetadata::m_url2Edit
MythUITextEdit * m_url2Edit
Definition: streamview.h:82
mythdownloadmanager.h
MythUIButtonList::SetValue
virtual void SetValue(int value)
Definition: mythuibuttonlist.h:214
MusicMetadata::setFormat
void setFormat(const QString &lformat)
Definition: musicmetadata.h:237
StreamView::StreamView
StreamView(MythScreenStack *parent, MythScreenType *parentScreen)
Definition: streamview.cpp:33
build_compdb.filename
filename
Definition: build_compdb.py:21
EditStreamMetadata::m_url1Edit
MythUITextEdit * m_url1Edit
Definition: streamview.h:81
mythmainwindow.h
MusicMetadata::setCountry
void setCountry(const QString &country)
Definition: musicmetadata.h:280
MythScreenStack::AddScreen
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
Definition: mythscreenstack.cpp:52
SearchStream::m_oldChannel
QString m_oldChannel
Definition: streamview.h:129
ShowOkPopup
MythConfirmationDialog * ShowOkPopup(const QString &message, bool showCancel)
Non-blocking version of MythPopupBox::showOkPopup()
Definition: mythdialogbox.cpp:562
MusicCommon::customEvent
void customEvent(QEvent *event) override
Definition: musiccommon.cpp:1180
EditStreamMetadata::m_url4Edit
MythUITextEdit * m_url4Edit
Definition: streamview.h:84
StreamView::customEvent
void customEvent(QEvent *event) override
Definition: streamview.cpp:103
MythScreenType::CloseBusyPopup
void CloseBusyPopup(void)
Definition: mythscreentype.cpp:338
EditStreamMetadata::m_parent
StreamView * m_parent
Definition: streamview.h:74
MusicCommon
Definition: musiccommon.h:49
MusicMetadata::setLogoUrl
void setLogoUrl(const QString &logourl)
Definition: musicmetadata.h:274
MSqlQuery::prepare
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.
Definition: mythdbcon.cpp:838
musicplayer.h