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