Permalink
Browse files

Stream video files in mythnews instead of downloading them. This mean…

…s playback starts much fasteralthough there is still a delay for buffering
  • Loading branch information...
1 parent aaee5d6 commit 9bec233b71a9002c27c5edbd2285da59f414714c @stuartm stuartm committed Jan 23, 2012
Showing with 4 additions and 21 deletions.
  1. +3 −20 mythplugins/mythnews/mythnews/mythnews.cpp
  2. +1 −1 mythplugins/mythnews/mythnews/mythnews.h
@@ -831,24 +831,7 @@ void MythNews::slotViewArticle(MythUIButtonListItem *articlesListItem)
}
}
- QString cmdURL(article.enclosure());
-
- QString fileprefix = GetConfDir();
-
- QDir dir(fileprefix);
- if (!dir.exists())
- dir.mkdir(fileprefix);
-
- fileprefix += "/MythNews";
-
- dir = QDir(fileprefix);
- if (!dir.exists())
- dir.mkdir(fileprefix);
-
- QString sFilename(fileprefix + "/newstempfile");
-
- if (getHttpFile(sFilename, cmdURL))
- playVideo(sFilename, article);
+ playVideo(article);
}
void MythNews::ShowEditDialog(bool edit)
@@ -947,11 +930,11 @@ void MythNews::deleteNewsSite(void)
}
// does not need locking
-void MythNews::playVideo(const QString &filename, const NewsArticle &article)
+void MythNews::playVideo(const NewsArticle &article)
{
sendPlaybackStart();
- GetMythMainWindow()->HandleMedia("Internal", filename,
+ GetMythMainWindow()->HandleMedia("Internal", article.enclosure(),
article.description(), article.title());
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, const NewsArticle &article);
+ void playVideo(const NewsArticle &article);
// menu stuff
void ShowMenu(void);

0 comments on commit 9bec233

Please sign in to comment.