00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include <iostream>
00023 #include <cstdlib>
00024
00025 #include <unistd.h>
00026
00027 #include <qnetwork.h>
00028 #include <qapplication.h>
00029 #include <qdatetime.h>
00030 #include <qpainter.h>
00031 #include <qdir.h>
00032 #include <qtimer.h>
00033 #include <qregexp.h>
00034 #include <qprocess.h>
00035
00036 #include <qurl.h>
00037 #include "mythtv/mythcontext.h"
00038 #include "mythtv/mythdbcon.h"
00039 #include "mythtv/httpcomms.h"
00040
00041 #include "mythflix.h"
00042 #include "flixutil.h"
00043
00044 MythFlix::MythFlix(MythMainWindow *parent, const char *name )
00045 : MythDialog(parent, name)
00046 {
00047 qInitNetworkProtocols ();
00048
00049
00050
00051 QString fileprefix = MythContext::GetConfDir();
00052
00053 QDir dir(fileprefix);
00054 if (!dir.exists())
00055 dir.mkdir(fileprefix);
00056
00057 fileprefix += "/MythFlix";
00058 dir = QDir(fileprefix);
00059 if (!dir.exists())
00060 dir.mkdir(fileprefix);
00061
00062
00063 zoom = QString("-z %1").arg(gContext->GetNumSetting("WebBrowserZoomLevel",200));
00064 browser = gContext->GetSetting("WebBrowserCommand",
00065 gContext->GetInstallPrefix() +
00066 "/bin/mythbrowser");
00067 expectingPopup = false;
00068 m_InColumn = 0;
00069 m_UISites = 0;
00070 m_UIArticles = 0;
00071
00072 setNoErase();
00073 loadTheme();
00074
00075 updateBackground();
00076
00077
00078
00079 MSqlQuery query(MSqlQuery::InitCon());
00080 query.exec("SELECT name, url, updated FROM netflix WHERE is_queue=0 ORDER BY name");
00081
00082 if (!query.isActive()) {
00083 VERBOSE(VB_IMPORTANT, QString("MythFlix: Error in loading sites from DB"));
00084 }
00085 else {
00086 QString name;
00087 QString url;
00088 QDateTime time;
00089 while ( query.next() ) {
00090 name = QString::fromUtf8(query.value(0).toString());
00091 url = QString::fromUtf8(query.value(1).toString());
00092 time.setTime_t(query.value(2).toUInt());
00093 m_NewsSites.append(new NewsSite(name,url,time));
00094 }
00095 }
00096
00097 for (NewsSite *site = m_NewsSites.first(); site; site = m_NewsSites.next())
00098 {
00099 UIListBtnTypeItem* item =
00100 new UIListBtnTypeItem(m_UISites, site->name());
00101 item->setData(site);
00102 }
00103
00104
00105 NewsSite* site = (NewsSite*) m_NewsSites.first();
00106 connect(site, SIGNAL(finished(NewsSite*)),
00107 this, SLOT(slotNewsRetrieved(NewsSite*)));
00108
00109 slotRetrieveNews();
00110 }
00111
00112 MythFlix::~MythFlix()
00113 {
00114 delete m_Theme;
00115 }
00116
00117 void MythFlix::loadTheme()
00118 {
00119 m_Theme = new XMLParse();
00120 m_Theme->SetWMult(wmult);
00121 m_Theme->SetHMult(hmult);
00122
00123 QDomElement xmldata;
00124 m_Theme->LoadTheme(xmldata, "browse", "netflix-");
00125
00126 for (QDomNode child = xmldata.firstChild(); !child.isNull();
00127 child = child.nextSibling()) {
00128
00129 QDomElement e = child.toElement();
00130 if (!e.isNull()) {
00131
00132 if (e.tagName() == "font") {
00133 m_Theme->parseFont(e);
00134 }
00135 else if (e.tagName() == "container") {
00136 QRect area;
00137 QString name;
00138 int context;
00139 m_Theme->parseContainer(e, name, context, area);
00140
00141 if (name.lower() == "sites")
00142 m_SitesRect = area;
00143 else if (name.lower() == "articles")
00144 m_ArticlesRect = area;
00145 else if (name.lower() == "info")
00146 m_InfoRect = area;
00147 }
00148 else {
00149 VERBOSE(VB_IMPORTANT, QString("MythFlix: Unknown element: %1").arg(e.tagName()));
00150 exit(-1);
00151 }
00152 }
00153 }
00154
00155 LayerSet *container = m_Theme->GetSet("sites");
00156 if (!container) {
00157 VERBOSE(VB_IMPORTANT, QString("MythFlix: Failed to get sites container."));
00158 exit(-1);
00159 }
00160
00161 m_UISites = (UIListBtnType*)container->GetType("siteslist");
00162 if (!m_UISites) {
00163 VERBOSE(VB_IMPORTANT, QString("MythFlix: Failed to get list area."));
00164 exit(-1);
00165 }
00166
00167 connect(m_UISites, SIGNAL(itemSelected(UIListBtnTypeItem*)),
00168 SLOT(slotSiteSelected(UIListBtnTypeItem*)));
00169
00170 container = m_Theme->GetSet("articles");
00171 if (!container) {
00172 VERBOSE(VB_IMPORTANT, QString("MythFlix: Failed to get articles container."));
00173 exit(-1);
00174 }
00175
00176 m_UIArticles = (UIListBtnType*)container->GetType("articleslist");
00177 if (!m_UIArticles) {
00178 VERBOSE(VB_IMPORTANT, QString("MythFlix: Failed to get articles list area."));
00179 exit(-1);
00180 }
00181
00182 connect(m_UIArticles, SIGNAL(itemSelected(UIListBtnTypeItem*)),
00183 SLOT(slotArticleSelected(UIListBtnTypeItem*)));
00184
00185 m_UISites->SetActive(true);
00186 m_UIArticles->SetActive(false);
00187 }
00188
00189
00190 void MythFlix::paintEvent(QPaintEvent *e)
00191 {
00192 QRect r = e->rect();
00193
00194 if (r.intersects(m_SitesRect))
00195 updateSitesView();
00196 if (r.intersects(m_ArticlesRect))
00197 updateArticlesView();
00198 if (r.intersects(m_InfoRect))
00199 updateInfoView();
00200 }
00201
00202 void MythFlix::updateBackground(void)
00203 {
00204 QPixmap bground(size());
00205 bground.fill(this, 0, 0);
00206
00207 QPainter tmp(&bground);
00208
00209 LayerSet *container = m_Theme->GetSet("background");
00210 if (container)
00211 {
00212 container->Draw(&tmp, 0, 0);
00213 }
00214
00215 tmp.end();
00216 m_background = bground;
00217
00218 setPaletteBackgroundPixmap(m_background);
00219 }
00220
00221 void MythFlix::updateSitesView()
00222 {
00223 QPixmap pix(m_SitesRect.size());
00224 pix.fill(this, m_SitesRect.topLeft());
00225 QPainter p(&pix);
00226
00227 LayerSet* container = m_Theme->GetSet("sites");
00228 if (container) {
00229 container->Draw(&p, 0, 0);
00230 container->Draw(&p, 1, 0);
00231 container->Draw(&p, 2, 0);
00232 container->Draw(&p, 3, 0);
00233 container->Draw(&p, 4, 0);
00234 container->Draw(&p, 5, 0);
00235 container->Draw(&p, 6, 0);
00236 container->Draw(&p, 7, 0);
00237 container->Draw(&p, 8, 0);
00238 }
00239 p.end();
00240
00241 bitBlt(this, m_SitesRect.left(), m_SitesRect.top(),
00242 &pix, 0, 0, -1, -1, Qt::CopyROP);
00243 }
00244
00245 void MythFlix::updateArticlesView()
00246 {
00247 QPixmap pix(m_ArticlesRect.size());
00248 pix.fill(this, m_ArticlesRect.topLeft());
00249 QPainter p(&pix);
00250
00251 LayerSet* container = m_Theme->GetSet("articles");
00252 if (container) {
00253 container->Draw(&p, 0, 0);
00254 container->Draw(&p, 1, 0);
00255 container->Draw(&p, 2, 0);
00256 container->Draw(&p, 3, 0);
00257 container->Draw(&p, 4, 0);
00258 container->Draw(&p, 5, 0);
00259 container->Draw(&p, 6, 0);
00260 container->Draw(&p, 7, 0);
00261 container->Draw(&p, 8, 0);
00262 }
00263 p.end();
00264
00265 bitBlt(this, m_ArticlesRect.left(), m_ArticlesRect.top(),
00266 &pix, 0, 0, -1, -1, Qt::CopyROP);
00267 }
00268
00269 void MythFlix::updateInfoView()
00270 {
00271 QPixmap pix(m_InfoRect.size());
00272 pix.fill(this, m_InfoRect.topLeft());
00273 QPainter p(&pix);
00274
00275 LayerSet* container = m_Theme->GetSet("info");
00276 if (container)
00277 {
00278 NewsSite *site = 0;
00279 NewsArticle *article = 0;
00280
00281 UIListBtnTypeItem *siteUIItem = m_UISites->GetItemCurrent();
00282 if (siteUIItem && siteUIItem->getData())
00283 site = (NewsSite*) siteUIItem->getData();
00284
00285 UIListBtnTypeItem *articleUIItem = m_UIArticles->GetItemCurrent();
00286 if (articleUIItem && articleUIItem->getData())
00287 article = (NewsArticle*) articleUIItem->getData();
00288
00289 if (m_InColumn == 1) {
00290
00291 if (article)
00292 {
00293
00294 UITextType *ttype =
00295 (UITextType *)container->GetType("status");
00296
00297
00298
00299 ttype =
00300 (UITextType *)container->GetType("title");
00301 if (ttype)
00302 ttype->SetText(article->title());
00303
00304 ttype =
00305 (UITextType *)container->GetType("description");
00306 if (ttype)
00307 ttype->SetText(article->description());
00308
00309
00310 {
00311 QString artText = article->description();
00312
00313 if( artText.find(QRegExp("</(p|P)>")) )
00314 {
00315 artText.replace( QRegExp("<(p|P)>"), "");
00316 artText.replace( QRegExp("</(p|P)>"), "\n\n");
00317 }
00318 else
00319 {
00320 artText.replace( QRegExp("<(p|P)>"), "\n\n");
00321 artText.replace( QRegExp("</(p|P)>"), "");
00322 }
00323 artText.replace( QRegExp("<(br|BR|)/>"), "\n");
00324 artText.replace( QRegExp("<(br|BR|)>"), "\n");
00325
00326
00327
00328 artText.replace( QRegExp("\t"), "");
00329
00330 artText.replace( QRegExp(" "), "");
00331
00332 artText.replace( QRegExp("\n "), "\n");
00333
00334 QRegExp removeHTML(QRegExp("</?.+>"));
00335 removeHTML.setMinimal(true);
00336 artText.remove((const QRegExp&) removeHTML);
00337 artText = artText.stripWhiteSpace();
00338 ttype->SetText(artText);
00339 }
00340
00341 QString imageLoc = article->articleURL();
00342 int length = imageLoc.length();
00343 int index = imageLoc.findRev("/");
00344 imageLoc = imageLoc.mid(index,length) + ".jpg";
00345
00346 QString fileprefix = MythContext::GetConfDir();
00347
00348 QDir dir(fileprefix);
00349 if (!dir.exists())
00350 dir.mkdir(fileprefix);
00351
00352 fileprefix += "/MythFlix";
00353
00354 dir = QDir(fileprefix);
00355 if (!dir.exists())
00356 dir.mkdir(fileprefix);
00357
00358 VERBOSE(VB_FILE, QString("MythFlix: Boxshot File Prefix: %1").arg(fileprefix));
00359
00360 QString sFilename(fileprefix + "/" + imageLoc);
00361
00362 bool exists = QFile::exists(sFilename);
00363 if (!exists)
00364 {
00365 VERBOSE(VB_NETWORK, QString("MythFlix: Copying boxshot file from server (%1)").arg(imageLoc));
00366
00367 QString sURL("http://cdn.nflximg.com/us/boxshots/large/" + imageLoc);
00368
00369 if (!HttpComms::getHttpFile(sFilename, sURL, 20000))
00370 VERBOSE(VB_NETWORK, QString("MythFlix: Failed to download image from: %1").arg(sURL));
00371
00372 VERBOSE(VB_NETWORK, QString("MythFlix: Finished copying boxshot file from server (%1)").arg(imageLoc));
00373 }
00374
00375 UIImageType *itype = (UIImageType *)container->GetType("boxshot");
00376 if (itype)
00377 {
00378 itype->SetImage(sFilename);
00379 itype->LoadImage();
00380
00381 if (itype->isHidden())
00382 itype->show();
00383 }
00384
00385 }
00386 }
00387 else {
00388
00389 if (site)
00390 {
00391 UITextType *ttype =
00392 (UITextType *)container->GetType("status");
00393
00394
00395
00396 ttype =
00397 (UITextType *)container->GetType("title");
00398 if (ttype)
00399 ttype->SetText(site->name());
00400
00401 ttype =
00402 (UITextType *)container->GetType("description");
00403 if (ttype)
00404 ttype->SetText(site->description());
00405
00406 UIImageType *itype = (UIImageType *)container->GetType("boxshot");
00407 if (itype)
00408 {
00409 itype->hide();
00410 }
00411
00412 }
00413 }
00414
00415 container->Draw(&p, 0, 0);
00416 container->Draw(&p, 1, 0);
00417 container->Draw(&p, 2, 0);
00418 container->Draw(&p, 3, 0);
00419 container->Draw(&p, 4, 0);
00420 container->Draw(&p, 5, 0);
00421 container->Draw(&p, 6, 0);
00422 container->Draw(&p, 7, 0);
00423 container->Draw(&p, 8, 0);
00424 }
00425
00426 p.end();
00427
00428
00429 bitBlt(this, m_InfoRect.left(), m_InfoRect.top(),
00430 &pix, 0, 0, -1, -1, Qt::CopyROP);
00431 }
00432
00433 void MythFlix::keyPressEvent(QKeyEvent *e)
00434 {
00435 if (!e) return;
00436
00437 bool handled = false;
00438 QStringList actions;
00439 gContext->GetMainWindow()->TranslateKeyPress("NetFlix", e, actions);
00440
00441 for (unsigned int i = 0; i < actions.size() && !handled; i++)
00442 {
00443 QString action = actions[i];
00444 handled = true;
00445
00446 if (action == "UP")
00447 cursorUp();
00448 else if (action == "PAGEUP")
00449 cursorUp(true);
00450 else if (action == "DOWN")
00451 cursorDown();
00452 else if (action == "PAGEDOWN")
00453 cursorDown(true);
00454 else if (action == "LEFT")
00455 cursorLeft();
00456 else if (action == "RIGHT")
00457 cursorRight();
00458 else if((action == "SELECT") || (action == "MENU"))
00459 displayOptions();
00460 else
00461 handled = false;
00462 }
00463
00464 if (!handled)
00465 MythDialog::keyPressEvent(e);
00466 }
00467
00468 void MythFlix::cursorUp(bool page)
00469 {
00470 UIListBtnType::MovementUnit unit = page ? UIListBtnType::MovePage : UIListBtnType::MoveItem;
00471
00472 if (m_InColumn == 0) {
00473 m_UISites->MoveUp(unit);
00474 }
00475 else {
00476 m_UIArticles->MoveUp(unit);
00477 }
00478 }
00479
00480 void MythFlix::cursorDown(bool page)
00481 {
00482 UIListBtnType::MovementUnit unit = page ? UIListBtnType::MovePage : UIListBtnType::MoveItem;
00483
00484 if (m_InColumn == 0) {
00485 m_UISites->MoveDown(unit);
00486 }
00487 else {
00488 m_UIArticles->MoveDown(unit);
00489 }
00490 }
00491
00492 void MythFlix::cursorRight()
00493 {
00494 if (m_InColumn == 1)
00495 {
00496 slotViewArticle();
00497 return;
00498 }
00499
00500 m_InColumn++;
00501
00502 m_UISites->SetActive(false);
00503 m_UIArticles->SetActive(true);
00504
00505 update(m_SitesRect);
00506 update(m_ArticlesRect);
00507 update(m_InfoRect);
00508 }
00509
00510 void MythFlix::cursorLeft()
00511 {
00512 if (m_InColumn == 0)
00513 {
00514 accept();
00515 return;
00516 }
00517
00518 m_InColumn--;
00519
00520 m_UISites->SetActive(true);
00521 m_UIArticles->SetActive(false);
00522
00523 update(m_SitesRect);
00524 update(m_ArticlesRect);
00525 update(m_InfoRect);
00526 }
00527
00528 void MythFlix::slotRetrieveNews()
00529 {
00530 if (m_NewsSites.count() == 0)
00531 return;
00532
00533 for (NewsSite* site = m_NewsSites.first(); site; site = m_NewsSites.next())
00534 {
00535 site->retrieve();
00536 }
00537
00538 }
00539
00540 void MythFlix::slotNewsRetrieved(NewsSite* site)
00541 {
00542 processAndShowNews(site);
00543 }
00544
00545 void MythFlix::processAndShowNews(NewsSite* site)
00546 {
00547 if (!site)
00548 return;
00549
00550 site->process();
00551
00552 UIListBtnTypeItem *siteUIItem = m_UISites->GetItemCurrent();
00553 if (!siteUIItem || !siteUIItem->getData())
00554 return;
00555
00556 if (site == (NewsSite*) siteUIItem->getData()) {
00557
00558 m_UIArticles->Reset();
00559
00560 for (NewsArticle* article = site->articleList().first(); article;
00561 article = site->articleList().next()) {
00562 UIListBtnTypeItem* item =
00563 new UIListBtnTypeItem(m_UIArticles, article->title());
00564 item->setData(article);
00565 }
00566
00567 update(m_ArticlesRect);
00568 update(m_InfoRect);
00569 }
00570 }
00571
00572 void MythFlix::slotShowNetFlixPage()
00573 {
00574 if (expectingPopup)
00575 slotCancelPopup();
00576
00577 UIListBtnTypeItem *articleUIItem = m_UIArticles->GetItemCurrent();
00578 if (articleUIItem && articleUIItem->getData())
00579 {
00580 NewsArticle *article = (NewsArticle*) articleUIItem->getData();
00581 if(article)
00582 {
00583 QString cmdUrl(article->articleURL());
00584 cmdUrl.replace('\'', "%27");
00585
00586 QString cmd = QString("%1 %2 '%3'")
00587 .arg(browser)
00588 .arg(zoom)
00589 .arg(cmdUrl);
00590 VERBOSE(VB_GENERAL, QString("MythFlixBrowse: Opening Neflix site: (%1)").arg(cmd));
00591 myth_system(cmd);
00592 }
00593 }
00594 }
00595
00596 void MythFlix::slotSiteSelected(UIListBtnTypeItem *item)
00597 {
00598 if (!item || !item->getData())
00599 return;
00600
00601 processAndShowNews((NewsSite*) item->getData());
00602 }
00603
00604 void MythFlix::slotArticleSelected(UIListBtnTypeItem*)
00605 {
00606 update(m_ArticlesRect);
00607 update(m_InfoRect);
00608 }
00609
00610 void MythFlix::slotViewArticle()
00611 {
00612 if (expectingPopup)
00613 slotCancelPopup();
00614
00615 QString queueName = chooseQueue();
00616 if (queueName != "__NONE__")
00617 InsertMovieIntoQueue(queueName, false);
00618 }
00619
00620 void MythFlix::slotViewArticleTop()
00621 {
00622 if (expectingPopup)
00623 slotCancelPopup();
00624
00625 QString queueName = chooseQueue();
00626 if (queueName != "__NONE__")
00627 InsertMovieIntoQueue(queueName, true);
00628 }
00629
00630 void MythFlix::InsertMovieIntoQueue(QString queueName, bool atTop)
00631 {
00632 UIListBtnTypeItem *articleUIItem = m_UIArticles->GetItemCurrent();
00633
00634 if (!articleUIItem)
00635 return;
00636
00637 NewsArticle *article = (NewsArticle*) articleUIItem->getData();
00638 if(!article)
00639 return;
00640
00641 QStringList args = gContext->GetShareDir() + "mythflix/scripts/netflix.pl";
00642
00643 if (queueName != "")
00644 {
00645 args += "-q";
00646 args += queueName;
00647 }
00648
00649 QString movieID(article->articleURL());
00650 int length = movieID.length();
00651 int index = movieID.findRev("/");
00652 movieID = movieID.mid(index+1,length);
00653
00654 args += "-A";
00655 args += movieID;
00656
00657 QString results = executeExternal(args, "Add Movie");
00658
00659 if (atTop)
00660 {
00661
00662 args = gContext->GetShareDir() + "mythflix/scripts/netflix.pl";
00663
00664 if (queueName != "")
00665 {
00666 args += "-q";
00667 args += queueName;
00668 }
00669
00670 args += "-1";
00671 args += movieID;
00672
00673 results = executeExternal(args, "Move To Top");
00674 }
00675 }
00676
00677 void MythFlix::displayOptions()
00678 {
00679
00680 popup = new MythPopupBox(gContext->GetMainWindow(), "menu popup");
00681
00682 QLabel *label = popup->addLabel(tr("Browse Options"),
00683 MythPopupBox::Large, false);
00684 label->setAlignment(Qt::AlignCenter | Qt::WordBreak);
00685
00686 QButton *topButton = popup->addButton(tr("Add to Top of Queue"), this,
00687 SLOT(slotViewArticleTop()));
00688 popup->addButton(tr("Add to Bottom of Queue"), this, SLOT(slotViewArticle()));
00689
00690 popup->addButton(tr("Show NetFlix Page"), this, SLOT(slotShowNetFlixPage()));
00691
00692 popup->addButton(tr("Cancel"), this, SLOT(slotCancelPopup()));
00693
00694 popup->ShowPopup(this, SLOT(slotCancelPopup()));
00695
00696 topButton->setFocus();
00697
00698 expectingPopup = true;
00699
00700 }
00701
00702 void MythFlix::slotCancelPopup(void)
00703 {
00704 popup->hide();
00705 expectingPopup = false;
00706
00707 popup->deleteLater();
00708 popup = NULL;
00709
00710 setActiveWindow();
00711 }
00712
00713
00714
00715
00716
00717 QString MythFlix::executeExternal(const QStringList& args, const QString& purpose)
00718 {
00719 QString ret = "";
00720 QString err = "";
00721
00722 VERBOSE(VB_GENERAL, QString("%1: Executing '%2'").arg(purpose).
00723 arg(args.join(" ")).local8Bit() );
00724 QProcess proc(args, this);
00725
00726 QString cmd = args[0];
00727 QFileInfo info(cmd);
00728
00729 if (!info.exists())
00730 {
00731 err = QString("\"%1\" failed: does not exist").arg(cmd.local8Bit());
00732 }
00733 else if (!info.isExecutable())
00734 {
00735 err = QString("\"%1\" failed: not executable").arg(cmd.local8Bit());
00736 }
00737 else if (proc.start())
00738 {
00739 while (true)
00740 {
00741 while (proc.canReadLineStdout() || proc.canReadLineStderr())
00742 {
00743 if (proc.canReadLineStdout())
00744 {
00745 ret += QString::fromLocal8Bit(proc.readLineStdout(),-1) + "\n";
00746 }
00747
00748 if (proc.canReadLineStderr())
00749 {
00750 if (err == "")
00751 {
00752 err = cmd + ": ";
00753 }
00754
00755 err += QString::fromLocal8Bit(proc.readLineStderr(),-1) + "\n";
00756 }
00757 }
00758
00759 if (proc.isRunning())
00760 {
00761 qApp->processEvents();
00762 usleep(10000);
00763 }
00764 else
00765 {
00766 if (!proc.normalExit())
00767 {
00768 err = QString("\"%1\" failed: Process exited abnormally")
00769 .arg(cmd.local8Bit());
00770 }
00771
00772 break;
00773 }
00774 }
00775 }
00776 else
00777 {
00778 err = QString("\"%1\" failed: Could not start process")
00779 .arg(cmd.local8Bit());
00780 }
00781
00782 while (proc.canReadLineStdout() || proc.canReadLineStderr())
00783 {
00784 if (proc.canReadLineStdout())
00785 {
00786 ret += QString::fromLocal8Bit(proc.readLineStdout(),-1) + "\n";
00787 }
00788
00789 if (proc.canReadLineStderr())
00790 {
00791 if (err == "")
00792 {
00793 err = cmd + ": ";
00794 }
00795
00796 err += QString::fromLocal8Bit(proc.readLineStderr(), -1) + "\n";
00797 }
00798 }
00799
00800 if (err != "")
00801 {
00802 QString tempPurpose(purpose);
00803
00804 if (tempPurpose == "")
00805 tempPurpose = "Command";
00806
00807 VERBOSE(VB_IMPORTANT, QString("%1").arg(err));
00808 MythPopupBox::showOkPopup(gContext->GetMainWindow(),
00809 QObject::tr(tempPurpose + " failed"), QObject::tr(err + "\n\nCheck NetFlix Settings"));
00810 ret = "#ERROR";
00811 }
00812
00813 VERBOSE(VB_IMPORTANT, ret);
00814 return ret;
00815 }
00816
00817