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->AddItem(tr("Add Stream"));
81 
83  {
84  menu->AddItem(tr("Edit Stream"));
85  menu->AddItem(tr("Remove Stream"));
86  }
87 
88  menu->AddItemV(MusicCommon::tr("Fullscreen Visualizer"), QVariant::fromValue((int)MV_VISUALIZER));
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 #if QT_VERSION < QT_VERSION_CHECK(5,14,0)
217  QStringList tokens = me->Message().split(" ", QString::SkipEmptyParts);
218 #else
219  QStringList tokens = me->Message().split(" ", Qt::SkipEmptyParts);
220 #endif
221 
222  if (tokens.isEmpty())
223  return;
224 
225  if (tokens[0] == "DOWNLOAD_FILE")
226  {
227  QStringList args = me->ExtraDataList();
228 
229  if (tokens[1] == "UPDATE")
230  {
231  }
232  else if (tokens[1] == "FINISHED")
233  {
234  QString url = args[0];
235  int fileSize = args[2].toInt();
236  int errorCode = args[4].toInt();
237  QString filename = args[1];
238 
239  if ((errorCode != 0) || (fileSize == 0))
240  LOG(VB_GENERAL, LOG_ERR, QString("StreamView: failed to download radio icon from '%1'").arg(url));
241  else
242  {
243  for (int x = 0; x < m_streamList->GetCount(); x++)
244  {
246  auto *mdata = item->GetData().value<MusicMetadata *>();
247  if (mdata && mdata->LogoUrl() == url)
248  item->SetImage(filename);
249  }
250  }
251  }
252  }
253  }
254  else if (event->type() == DecoderHandlerEvent::kOperationStart)
255  {
256  auto *dhe = dynamic_cast<DecoderHandlerEvent*>(event);
257  if (!dhe)
258  return;
259  if (dhe->getMessage() && m_bufferStatus)
260  {
261  m_bufferStatus->SetText(*dhe->getMessage());
262  }
263  }
264  else if (event->type() == DecoderHandlerEvent::kBufferStatus)
265  {
266  auto *dhe = dynamic_cast<DecoderHandlerEvent*>(event);
267  if (!dhe)
268  return;
269 
270  int available = 0;
271  int maxSize = 0;
272  dhe->getBufferStatus(&available, &maxSize);
273 
274  if (m_bufferStatus)
275  {
276  QString status = QString("%1%").arg((int)(100.0 / ((double)maxSize / (double)available)));
277  m_bufferStatus->SetText(status);
278  }
279 
280  if (m_bufferProgress)
281  {
282  m_bufferProgress->SetTotal(maxSize);
283  m_bufferProgress->SetUsed(available);
284  }
285  }
286  else if (event->type() == DecoderHandlerEvent::kOperationStop)
287  {
288  if (m_bufferStatus)
290  }
291  else if (event->type() == DialogCompletionEvent::kEventType)
292  {
293  auto *dce = dynamic_cast<DialogCompletionEvent*>(event);
294 
295  // make sure the user didn't ESCAPE out of the menu
296  if ((dce == nullptr) || (dce->GetResult() < 0))
297  return;
298 
299  QString resultid = dce->GetId();
300  QString resulttext = dce->GetResultText();
301 
302  if (resultid == "mainmenu")
303  {
304  if (resulttext == tr("Add Stream"))
305  {
307  MythScreenType *screen = new EditStreamMetadata(mainStack, this, nullptr);
308 
309  if (screen->Create())
310  mainStack->AddScreen(screen);
311  else
312  delete screen;
313  }
314  else if (resulttext == tr("Remove Stream"))
315  {
316  removeStream();
317  }
318  else if (resulttext == tr("Edit Stream"))
319  {
320  editStream();
321  }
322  else
323  handled = false;
324  }
325  else
326  handled = false;
327  }
328  else
329  handled = false;
330 
331 
332  if (!handled)
334 }
335 
336 bool StreamView::keyPressEvent(QKeyEvent *event)
337 {
338  if (GetFocusWidget() && GetFocusWidget()->keyPressEvent(event))
339  return true;
340 
341  QStringList actions;
342  bool handled = GetMythMainWindow()->TranslateKeyPress("Music", event, actions);
343 
344  for (int i = 0; i < actions.size() && !handled; i++)
345  {
346  QString action = actions[i];
347  handled = true;
348 
349  if (action == "EDIT")
350  {
351  editStream();
352  }
353  else if (action == "DELETE")
354  {
355  removeStream();
356  }
357  else if (action == "TOGGLELAST")
358  {
360  {
361  m_streamList->SetValueByData(QVariant::fromValue(m_lastStream));
362 
364  if (item)
365  streamItemClicked(item);
366  }
367  }
368  else
369  handled = false;
370  }
371 
372  if (!handled && MusicCommon::keyPressEvent(event))
373  handled = true;
374 
375  return handled;
376 }
377 
379 {
381  if (item)
382  {
383  auto *mdata = item->GetData().value<MusicMetadata *>();
385  MythScreenType *screen = new EditStreamMetadata(mainStack, this, mdata);
386 
387  if (screen->Create())
388  mainStack->AddScreen(screen);
389  else
390  delete screen;
391  }
392 }
393 
395 {
397  if (item)
398  {
399  auto *mdata = item->GetData().value<MusicMetadata *>();
400 
401  if (mdata)
402  {
403  ShowOkPopup(tr("Are you sure you want to delete this Stream?\n"
404  "Broadcaster: %1 - Channel: %2")
405  .arg(mdata->Broadcaster(), mdata->Channel()),
406  this, &StreamView::doRemoveStream, true);
407  }
408  }
409 }
410 
412 {
413  if (!ok)
414  return;
415 
417  if (item)
418  {
419  auto *mdata = item->GetData().value<MusicMetadata *>();
420 
421  if (mdata)
422  deleteStream(mdata);
423  }
424 }
425 
427 {
428  if (!gPlayer->getCurrentPlaylist())
429  return;
430 
431  m_streamList->Reset();
432 
433  bool foundActiveStream = false;
434 
435  for (int x = 0; x < gPlayer->getCurrentPlaylist()->getTrackCount(); x++)
436  {
438  auto *item = new MythUIButtonListItem(m_streamList, "",
439  QVariant::fromValue(mdata));
440  InfoMap metadataMap;
441  if (mdata)
442  mdata->toMap(metadataMap);
443  item->SetTextFromMap(metadataMap);
444  item->SetText("", "imageloaded");
445  item->SetFontState("normal");
446  item->DisplayState("default", "playstate");
447 
448  // if this is the current radio stream update its play state to match the player
449  if (gPlayer->getCurrentMetadata() && mdata &&
450  mdata->ID() == gPlayer->getCurrentMetadata()->ID())
451  {
452  if (gPlayer->isPlaying())
453  {
454  item->SetFontState("running");
455  item->DisplayState("playing", "playstate");
456  }
457  else if (gPlayer->isPaused())
458  {
459  item->SetFontState("idle");
460  item->DisplayState("paused", "playstate");
461  }
462  else
463  {
464  item->SetFontState("normal");
465  item->DisplayState("stopped", "playstate");
466  }
467 
469 
471 
472  foundActiveStream = true;
473  }
474  }
475 
476  if (m_streamList->GetCount() > 0 && !foundActiveStream)
477  {
479  gPlayer->stop(true);
480  }
481 
482  if (m_noStreams)
484 
485  if (m_streamList->GetCount() == 0)
486  LOG(VB_GENERAL, LOG_ERR, "StreamView hasn't found any streams!");
487 }
488 
490 {
491  if (!item)
492  return;
493 
495 }
496 
498 {
499  if (!item)
500  return;
501 
502  if (!item->GetText("imageloaded").isEmpty())
503  return;
504 
505  auto *mdata = item->GetData().value<MusicMetadata *>();
506  if (mdata)
507  {
508  if (!mdata->LogoUrl().isEmpty())
509  item->SetImage(mdata->getAlbumArtFile());
510  else
511  item->SetImage("");
512  }
513 
514  item->SetText(" ", "imageloaded");
515 }
516 
518 {
519  // sanity check this is a radio stream
520  int repo = ID_TO_REPO(mdata->ID());
521  if (repo != RT_Radio)
522  {
523  LOG(VB_GENERAL, LOG_ERR, "StreamView asked to add a stream but it isn't a radio stream!");
524  return;
525  }
526 
527  QString url = mdata->Url();
528 
530 
532 
534 
535  // find the new stream and make it the active item
536  for (int x = 0; x < m_streamList->GetCount(); x++)
537  {
539  auto *itemsdata = item->GetData().value<MusicMetadata *>();
540  if (itemsdata)
541  {
542  if (url == itemsdata->Url())
543  {
545  break;
546  }
547  }
548  }
549 }
550 
552 {
553  // sanity check this is a radio stream
554  int repo = ID_TO_REPO(mdata->ID());
555  if (repo != RT_Radio)
556  {
557  LOG(VB_GENERAL, LOG_ERR, "StreamView asked to update a stream but it isn't a radio stream!");
558  return;
559  }
560 
561  MusicMetadata::IdType id = mdata->ID();
562 
564 
566 
567  // update mdata to point to the new item
568  mdata = gMusicData->m_all_streams->getMetadata(id);
569 
570  if (!mdata)
571  return;
572 
573  // force the icon to reload incase it changed
574  QFile::remove(mdata->getAlbumArtFile());
575  mdata->reloadAlbumArtImages();
576 
578 
579  // if we just edited the currently playing stream update the current metadata to match
580  MusicMetadata *currentMetadata = gPlayer->getCurrentMetadata();
581  if (id == currentMetadata->ID())
582  {
583  currentMetadata->setBroadcaster(mdata->Broadcaster());
584  currentMetadata->setChannel(mdata->Channel());
585  }
586 
587  // update the played tracks list to match the new metadata
588  if (m_playedTracksList)
589  {
590  for (int x = 0; x < m_playedTracksList->GetCount(); x++)
591  {
593  auto *playedmdata = item->GetData().value<MusicMetadata *>();
594 
595  if (playedmdata && playedmdata->ID() == id)
596  {
597  playedmdata->setBroadcaster(mdata->Broadcaster());
598  playedmdata->setChannel(mdata->Channel());
599 
600  InfoMap metadataMap;
601  playedmdata->toMap(metadataMap);
602  item->SetTextFromMap(metadataMap);
603  }
604  }
605  }
606 
607  // find the stream and make it the active item
608  for (int x = 0; x < m_streamList->GetCount(); x++)
609  {
611  auto *itemsdata = item->GetData().value<MusicMetadata *>();
612  if (itemsdata)
613  {
614  if (mdata->ID() == itemsdata->ID())
615  {
617  break;
618  }
619  }
620  }
621 }
622 
624 {
625  // sanity check this is a radio stream
626  int repo = ID_TO_REPO(mdata->ID());
627  if (repo != RT_Radio)
628  {
629  LOG(VB_GENERAL, LOG_ERR, "StreamView asked to delete a stream but it isn't a radio stream!");
630  return;
631  }
632 
633  int currPos = m_streamList->GetCurrentPos();
634  int topPos = m_streamList->GetTopItemPos();
635 
636  // if we are playing this radio stream stop playing
637  if (gPlayer->getCurrentMetadata() == mdata)
638  gPlayer->stop(true);
639 
641 
643 
645 
646  m_streamList->SetItemCurrent(currPos, topPos);
647 }
648 
650 
652 {
653  if (!LoadWindowFromXML("stream-ui.xml", "editstreammetadata", this))
654  return false;
655 
656  bool err = false;
657  UIUtilE::Assign(this, m_broadcasterEdit, "broadcasteredit", &err);
658  UIUtilE::Assign(this, m_channelEdit, "channeledit", &err);
659  UIUtilE::Assign(this, m_descEdit, "descriptionedit", &err);
660  UIUtilE::Assign(this, m_url1Edit, "url1edit", &err);
661  UIUtilE::Assign(this, m_url2Edit, "url2edit", &err);
662  UIUtilE::Assign(this, m_url3Edit, "url3edit", &err);
663  UIUtilE::Assign(this, m_url4Edit, "url4edit", &err);
664  UIUtilE::Assign(this, m_url5Edit, "url5edit", &err);
665  UIUtilE::Assign(this, m_logourlEdit, "logourledit" , &err);
666  UIUtilE::Assign(this, m_genreEdit, "genreedit", &err);
667  UIUtilE::Assign(this, m_languageEdit, "languageedit", &err);
668  UIUtilE::Assign(this, m_countryEdit, "countryedit", &err);
669  UIUtilE::Assign(this, m_formatEdit, "formatedit", &err);
670  UIUtilE::Assign(this, m_saveButton, "savebutton", &err);
671  UIUtilE::Assign(this, m_cancelButton, "cancelbutton", &err);
672  UIUtilE::Assign(this, m_searchButton, "searchbutton", &err);
673 
674  if (err)
675  {
676  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'editstreampopup'");
677  return false;
678  }
679 
680  if (m_streamMeta)
681  {
695  }
696  else
697  m_formatEdit->SetText("%a - %t");
698 
702 
703  BuildFocusList();
704 
705  return true;
706 }
707 
709 {
711  MythScreenType *screen = new SearchStream(mainStack, this);
712 
713  if (screen->Create())
714  mainStack->AddScreen(screen);
715  else
716  delete screen;
717 
718 }
719 
721 {
722  bool doUpdate = true;
723 
724  if (!m_streamMeta)
725  {
728  doUpdate = false;
729  }
730 
738  m_streamMeta->setFormat("cast");
745 
746  if (doUpdate)
748  else
750 
751  Close();
752 }
753 
755 {
756  if (mdata)
757  {
759  m_channelEdit->SetText(mdata->Channel());
760  m_url1Edit->SetText(mdata->Url(0));
761  m_url2Edit->SetText(mdata->Url(1));
762  m_url3Edit->SetText(mdata->Url(2));
763  m_url4Edit->SetText(mdata->Url(3));
764  m_url5Edit->SetText(mdata->Url(4));
765  m_logourlEdit->SetText(mdata->LogoUrl());
766  m_genreEdit->SetText(mdata->Genre());
768  m_descEdit->SetText(mdata->Description());
769  m_countryEdit->SetText(mdata->Country());
770  m_languageEdit->SetText(mdata->Language());
771  }
772 }
773 
775 
777 {
778  if (!LoadWindowFromXML("stream-ui.xml", "searchstream", this))
779  return false;
780 
781  bool err = false;
782  UIUtilE::Assign(this, m_broadcasterList, "broadcasterlist", &err);
783  UIUtilE::Assign(this, m_genreList, "genrelist", &err);
784  UIUtilW::Assign(this, m_languageList, "languagelist", &err);
785  UIUtilW::Assign(this, m_countryList, "countrylist", &err);
786  UIUtilE::Assign(this, m_streamList, "streamlist", &err);
787  UIUtilE::Assign(this, m_channelEdit, "channeledit", &err);
788  UIUtilE::Assign(this, m_matchesText, "matchestext", &err);
789 
790  if (err)
791  {
792  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'searchstream'");
793  return false;
794  }
795 
798  m_matchesText->SetText("");
799 
808 
809 
810  if (m_countryList)
811  {
814 
818  }
819 
820  if (m_languageList)
821  {
825  }
826 
828 
829  LoadInBackground("Loading Streams...");
830 
831  BuildFocusList();
832 
833  return true;
834 }
835 
837 {
838  loadStreams();
839  QTimer::singleShot(0, this, &SearchStream::doneLoading);
840 }
841 
843 {
845  updateGenres();
846  updateLanguages();
847  updateCountries();
848  doUpdateStreams();
849 }
850 
852 {
853  if (!item)
854  return;
855 
856  auto mdata = item->GetData().value<MusicMetadata>();
858 
859  Close();
860 }
861 
863 {
864  if (!item)
865  return;
866 
867  auto mdata = item->GetData().value<MusicMetadata>();
868  if (!mdata.LogoUrl().isEmpty() && mdata.LogoUrl() != "-")
869  {
870  if (item->GetText("dummy") == " ")
871  {
872  item->SetImage(mdata.LogoUrl());
873  item->SetText("", "dummy");
874  }
875  }
876 }
877 
879 {
881 }
882 
884 {
886 
887  new MythUIButtonListItem(m_broadcasterList, tr("<All Broadcasters>"));
888 
889  MSqlQuery query(MSqlQuery::InitCon());
890 
891  query.prepare("SELECT DISTINCT broadcaster FROM music_streams ORDER BY broadcaster;");
892 
893  if (!query.exec() || !query.isActive())
894  {
895  MythDB::DBError("get broadcaster", query);
896  return;
897  }
898 
899  while (query.next())
900  {
901  new MythUIButtonListItem(m_broadcasterList, query.value(0).toString());
902  }
903 
904  m_broadcasterList->SetValue(tr("<All Broadcasters>"));
905 }
906 
908 {
909  m_genreList->Reset();
910 
911  new MythUIButtonListItem(m_genreList, tr("<All Genres>"));
912 
913  MSqlQuery query(MSqlQuery::InitCon());
914 
915  query.prepare("SELECT DISTINCT genre FROM music_streams ORDER BY genre;");
916 
917  if (!query.exec() || !query.isActive())
918  {
919  MythDB::DBError("get genres", query);
920  return;
921  }
922 
923  while (query.next())
924  {
925  new MythUIButtonListItem(m_genreList, query.value(0).toString());
926  }
927 
928  m_genreList->SetValue(tr("<All Genres>"));
929 }
930 
932 {
933  if (m_countryList)
934  {
935  m_countryList->Reset();
936 
937  new MythUIButtonListItem(m_countryList, tr("<All Countries>"));
938 
939  MSqlQuery query(MSqlQuery::InitCon());
940 
941  query.prepare("SELECT DISTINCT country FROM music_streams ORDER BY country;");
942 
943  if (!query.exec() || !query.isActive())
944  {
945  MythDB::DBError("get countries", query);
946  return;
947  }
948 
949  while (query.next())
950  {
951  new MythUIButtonListItem(m_countryList, query.value(0).toString());
952  }
953 
954  m_countryList->SetValue(tr("<All Countries>"));
955  }
956 }
957 
959 {
960  if (m_languageList)
961  {
963 
964  new MythUIButtonListItem(m_languageList, tr("<All Languages>"));
965 
966  MSqlQuery query(MSqlQuery::InitCon());
967 
968  query.prepare("SELECT DISTINCT language FROM music_streams ORDER BY language;");
969 
970  if (!query.exec() || !query.isActive())
971  {
972  MythDB::DBError("get languages", query);
973  return;
974  }
975 
976  while (query.next())
977  {
978  new MythUIButtonListItem(m_languageList, query.value(0).toString());
979  }
980 
981  m_languageList->SetValue(tr("<All Languages>"));
982  }
983 }
984 
986 {
987  if (m_updateTimer.isActive())
988  m_updateTimer.stop();
989 
990  m_updateTimer.start(500ms);
991 }
992 
994 {
995  if (m_updating)
996  return;
997 
998  QString broadcaster = m_broadcasterList->GetValue();
999  QString genre = m_genreList->GetValue();
1000  QString language = m_languageList ? m_languageList->GetValue() : tr("<All Languages>");
1001  QString country = m_countryList ? m_countryList->GetValue() : tr("<All Countries>");
1002  QString channel = m_channelEdit->GetText();
1003 
1004  // only update the buttonlist if something changed
1005  if (m_oldBroadcaster == broadcaster && m_oldGenre == genre && m_oldChannel == channel &&
1006  m_oldLanguage == language && m_oldCountry == country)
1007  return;
1008 
1009  m_oldBroadcaster = broadcaster;
1010  m_oldGenre = genre;
1011  m_oldChannel = channel;
1012  m_oldLanguage = language;
1013  m_oldCountry = country;
1014 
1015  bool searchBroadcaster = (broadcaster != tr("<All Broadcasters>"));
1016  bool searchGenre = (genre != tr("<All Genres>"));
1017  bool searchLanguage = (language != tr("<All Languages>"));
1018  bool searchCountry = (country != tr("<All Countries>"));
1019  bool searchChannel = !channel.isEmpty();
1020 
1021  m_streams.clear();
1022  m_streamList->Reset();
1023 
1024  MSqlQuery query(MSqlQuery::InitCon());
1025 
1026  QString sql = "SELECT broadcaster, channel, description, genre, url1, url2, url3, url4, url5, "
1027  "logourl, metaformat, country, language "
1028  "FROM music_streams ";
1029  bool doneWhere = false;
1030 
1031  if (searchBroadcaster)
1032  {
1033  sql += "WHERE broadcaster = :BROADCASTER ";
1034  doneWhere = true;
1035  }
1036 
1037  if (searchGenre)
1038  {
1039  if (!doneWhere)
1040  {
1041  sql += "WHERE genre = :GENRE ";
1042  doneWhere = true;
1043  }
1044  else
1045  sql += "AND genre = :GENRE ";
1046  }
1047 
1048  if (searchLanguage)
1049  {
1050  if (!doneWhere)
1051  {
1052  sql += "WHERE language = :LANGUAGE ";
1053  doneWhere = true;
1054  }
1055  else
1056  sql += "AND language = :LANGUAGE ";
1057  }
1058 
1059  if (searchCountry)
1060  {
1061  if (!doneWhere)
1062  {
1063  sql += "WHERE country = :COUNTRY ";
1064  doneWhere = true;
1065  }
1066  else
1067  sql += "AND country = :COUNTRY ";
1068  }
1069 
1070  if (searchChannel)
1071  {
1072  if (!doneWhere)
1073  {
1074  sql += "WHERE channel LIKE " + QString("'%%1%'").arg(channel);
1075  // doneWhere = true;
1076  }
1077  else
1078  sql += "AND channel LIKE " + QString("'%%1%' ").arg(channel);
1079  }
1080 
1081  sql += "ORDER BY broadcaster, channel;";
1082 
1083  query.prepare(sql);
1084 
1085  if (searchBroadcaster)
1086  query.bindValue(":BROADCASTER", broadcaster);
1087 
1088  if (searchGenre)
1089  query.bindValue(":GENRE", genre);
1090 
1091  if (searchLanguage)
1092  query.bindValue(":LANGUAGE", language);
1093 
1094  if (searchCountry)
1095  query.bindValue(":COUNTRY", country);
1096 
1097  if (!query.exec() || !query.isActive())
1098  {
1099  MythDB::DBError("search streams", query);
1100  return;
1101  }
1102 
1103  if (query.size() > 500)
1104  {
1105  QString message = tr("Updating stream list. Please Wait ...");
1106  OpenBusyPopup(message);
1107  }
1108 
1109  int count = 0;
1110  while (query.next())
1111  {
1112  MusicMetadata mdata;
1113  mdata.setBroadcaster(query.value(0).toString());
1114  mdata.setChannel(query.value(1).toString());
1115  mdata.setDescription(query.value(2).toString());
1116  mdata.setGenre(query.value(3).toString());
1117 
1118  for (size_t x = 0; x < STREAMURLCOUNT; x++)
1119  mdata.setUrl(query.value(4 + x).toString(), x);
1120 
1121  mdata.setLogoUrl(query.value(9).toString());
1122  mdata.setMetadataFormat(query.value(10).toString());
1123  mdata.setCountry(query.value(11).toString());
1124  mdata.setLanguage(query.value(12).toString());
1125 
1126  auto *item = new MythUIButtonListItem(m_streamList, "",
1127  QVariant::fromValue(mdata));
1128  InfoMap metadataMap;
1129  mdata.toMap(metadataMap);
1130 
1131  item->SetTextFromMap(metadataMap);
1132 
1133  item->SetText(" ", "dummy");
1134  count++;
1135 
1136  if ((count % 500) == 0)
1137  {
1138  qApp->processEvents();
1139  }
1140  }
1141 
1142  m_matchesText->SetText(QString("%1").arg(m_streamList->GetCount()));
1143 
1144  if (query.size() > 500)
1145  CloseBusyPopup();
1146 
1147  m_updating = false;
1148 }
MythUIButton::Clicked
void Clicked()
MusicCommon::m_currentView
MusicView m_currentView
Definition: musiccommon.h:140
StreamView::streamItemClicked
void streamItemClicked(MythUIButtonListItem *item)
Definition: streamview.cpp:489
MythUIButtonList::GetItemAt
MythUIButtonListItem * GetItemAt(int pos) const
Definition: mythuibuttonlist.cpp:1673
MSqlQuery::isActive
bool isActive(void) const
Definition: mythdbcon.h:216
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:811
MSqlQuery
QSqlQuery wrapper that fetches a DB connection from the connection pool.
Definition: mythdbcon.h:128
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:426
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:215
Playlist::getSongAt
MusicMetadata * getSongAt(int pos) const
Definition: playlist.cpp:1089
MythUIButtonList::GetItemCurrent
MythUIButtonListItem * GetItemCurrent() const
Definition: mythuibuttonlist.cpp:1587
hardwareprofile.smolt.timeout
float timeout
Definition: smolt.py:103
AllStream::updateStream
void updateStream(MusicMetadata *mdata)
Definition: musicmetadata.cpp:1849
MythUIButtonList::SetValueByData
void SetValueByData(const QVariant &data)
Definition: mythuibuttonlist.cpp:1539
MusicPlayer::setCurrentTrackPos
bool setCurrentTrackPos(int pos)
Definition: musicplayer.cpp:1037
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:842
MythEvent::kMythEventMessage
static const Type kMythEventMessage
Definition: mythevent.h:79
EditStreamMetadata::searchClicked
void searchClicked(void)
Definition: streamview.cpp:708
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:1796
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:3563
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:998
SearchStream::m_oldCountry
QString m_oldCountry
Definition: streamview.h:130
MusicCommon::keyPressEvent
bool keyPressEvent(QKeyEvent *e) override
Key event handler.
Definition: musiccommon.cpp:576
MusicMetadata::Url
QString Url(size_t index=0)
Definition: musicmetadata.cpp:657
StreamView::ShowMenu
void ShowMenu(void) override
Definition: streamview.cpp:77
SearchStream::doUpdateStreams
void doUpdateStreams(void)
Definition: streamview.cpp:993
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:1736
MusicCommon::createSubMenu
MythMenu * createSubMenu(void)
Definition: musiccommon.cpp:2215
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:958
MythUIProgressBar::SetUsed
void SetUsed(int value)
Definition: mythuiprogressbar.cpp:69
mythdialogbox.h
MSqlQuery::value
QVariant value(int i) const
Definition: mythdbcon.h:205
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:617
StreamView::doRemoveStream
void doRemoveStream(bool ok)
Definition: streamview.cpp:411
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:907
MythUITextEdit::GetText
QString GetText(void) const
Definition: mythuitextedit.h:50
MusicPlayer::getCurrentPlaylist
Playlist * getCurrentPlaylist(void)
Definition: musicplayer.cpp:1601
SearchStream::streamClicked
void streamClicked(MythUIButtonListItem *item)
Definition: streamview.cpp:851
mythdirs.h
StreamView::updateStream
void updateStream(MusicMetadata *mdata)
Definition: streamview.cpp:551
EditStreamMetadata::Create
bool Create() override
Definition: streamview.cpp:651
MusicPlayer::setPlayMode
void setPlayMode(PlayMode mode)
Definition: musicplayer.cpp:954
mythuibuttonlist.h
MythUIButtonList::GetCount
int GetCount() const
Definition: mythuibuttonlist.cpp:1652
MV_RADIO
@ MV_RADIO
Definition: musiccommon.h:42
SearchStream::updateCountries
void updateCountries(void)
Definition: streamview.cpp:931
musicutils.h
MythEvent::Message
const QString & Message() const
Definition: mythevent.h:65
MythUIButtonList::GetItemByData
MythUIButtonListItem * GetItemByData(const QVariant &data)
Definition: mythuibuttonlist.cpp:1681
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:720
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:1160
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:776
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:1111
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:1085
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:549
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:1255
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:623
StreamView::streamItemVisible
static void streamItemVisible(MythUIButtonListItem *item)
Definition: streamview.cpp:497
StreamView::addStream
void addStream(MusicMetadata *mdata)
Definition: streamview.cpp:517
MusicMetadata::updateStreamList
static bool updateStreamList(void)
Definition: musicmetadata.cpp:313
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:1832
MV_LYRICS
@ MV_LYRICS
Definition: musiccommon.h:34
MythUIButtonListItem::GetData
QVariant GetData()
Definition: mythuibuttonlist.cpp:3665
MusicPlayer::isPaused
bool isPaused(void)
Definition: musicplayer.h:110
MusicCommon::updateUIPlayedList
void updateUIPlayedList(void)
Definition: musiccommon.cpp:2071
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:985
MusicMetadata::IdType
uint32_t IdType
Definition: musicmetadata.h:86
SearchStream::updateBroadcasters
void updateBroadcasters(void)
Definition: streamview.cpp:883
mythuihelper.h
MusicCommon::updateTrackInfo
void updateTrackInfo(MusicMetadata *mdata)
Definition: musiccommon.cpp:1884
MusicPlayer::getPlayedTracksList
QList< MusicMetadata * > & getPlayedTracksList(void)
Definition: musicplayer.h:137
SearchStream::m_languageList
MythUIButtonList * m_languageList
Definition: streamview.h:136
MythUIButtonListItem::SetFontState
void SetFontState(const QString &state, const QString &name="")
Definition: mythuibuttonlist.cpp:3414
MythMenu
Definition: mythdialogbox.h:99
StreamView::m_noStreams
MythUIText * m_noStreams
Definition: streamview.h:48
EditStreamMetadata::changeStreamMetadata
void changeStreamMetadata(MusicMetadata *mdata)
Definition: streamview.cpp:754
StreamView::removeStream
void removeStream(void)
Definition: streamview.cpp:394
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:695
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:3429
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:887
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:336
MusicMetadata::setUrl
void setUrl(const QString &url, size_t index=0)
Definition: musicmetadata.cpp:651
EditStreamMetadata
Definition: streamview.h:56
MythUIButtonList::GetValue
virtual QString GetValue() const
Definition: mythuibuttonlist.cpp:1606
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:1108
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:1554
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:836
MusicCommon::m_playedTracksList
MythUIButtonList * m_playedTracksList
Definition: musiccommon.h:205
MusicPlayer::PLAYMODE_RADIO
@ PLAYMODE_RADIO
Definition: musicplayer.h:73
SearchStream::streamVisible
static void streamVisible(MythUIButtonListItem *item)
Definition: streamview.cpp:862
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:878
MythUITextEdit::valueChanged
void valueChanged()
MusicMetadata::reloadAlbumArtImages
void reloadAlbumArtImages(void)
Definition: musicmetadata.cpp:1366
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:239
OutputEvent::kBuffering
static const Type kBuffering
Definition: output.h:64
StreamView::editStream
void editStream(void)
Definition: streamview.cpp:378
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:1184
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:48
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:836
musicplayer.h