Permalink
Browse files

Drop external player support from MythNews and while we're at it pass…

… the article title/description in so that they are displayed in the OSD.
  • Loading branch information...
1 parent ee0a85c commit 5bc07dc5466b23b639d07e081ba111667906ec84 @stuartm stuartm committed Jan 23, 2012
Showing with 5 additions and 18 deletions.
  1. +4 −17 mythplugins/mythnews/mythnews/mythnews.cpp
  2. +1 −1 mythplugins/mythnews/mythnews/mythnews.h
@@ -875,7 +875,7 @@ void MythNews::slotViewArticle(MythUIButtonListItem *articlesListItem)
QString sFilename(fileprefix + "/newstempfile");
if (getHttpFile(sFilename, cmdURL))
- playVideo(sFilename);
+ playVideo(sFilename, article);
}
void MythNews::ShowEditDialog(bool edit)
@@ -957,25 +957,12 @@ void MythNews::deleteNewsSite(void)
}
// does not need locking
-void MythNews::playVideo(const QString &filename)
+void MythNews::playVideo(const QString &filename, const NewsArticle &article)
{
- QString command_string = gCoreContext->GetSetting("VideoDefaultPlayer");
-
sendPlaybackStart();
- if ((command_string.indexOf("Internal", 0, Qt::CaseInsensitive) > -1) ||
- (command_string.length() < 1))
- {
- command_string = "Internal";
- GetMythMainWindow()->HandleMedia(command_string, filename);
- }
- else
- {
- if (command_string.contains("%s"))
- command_string = command_string.replace("%s", filename);
-
- myth_system(command_string);
- }
+ GetMythMainWindow()->HandleMedia("Internal", filename, article.title(),
+ article.description());
sendPlaybackEnd();
}
@@ -41,7 +41,7 @@ class MythNews : public MythScreenType
bool getHttpFile(const QString &sFilename, const QString &cmdURL);
void createProgress(const QString &title);
QString formatSize(long long bytes, int prec);
- void playVideo(const QString &filename);
+ void playVideo(const QString &filename, const NewsArticle &article);
// menu stuff
void ShowMenu(void);

0 comments on commit 5bc07dc

Please sign in to comment.