Skip to content

Commit

Permalink
Drop external player support from MythNews and while we're at it pass…
Browse files Browse the repository at this point in the history
… the article title/description in so that they are displayed in the OSD.
  • Loading branch information
stuartm committed Jan 23, 2012
1 parent ee0a85c commit 5bc07dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
21 changes: 4 additions & 17 deletions mythplugins/mythnews/mythnews/mythnews.cpp
Expand Up @@ -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)
Expand Down Expand Up @@ -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();
}
Expand Down
2 changes: 1 addition & 1 deletion mythplugins/mythnews/mythnews/mythnews.h
Expand Up @@ -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);
Expand Down

0 comments on commit 5bc07dc

Please sign in to comment.