Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 9bec233b71a9002c27c5edbd2285da59f414714c 1 parent aaee5d6
Stuart Morgan stuartm authored
23 mythplugins/mythnews/mythnews/mythnews.cpp
View
@@ -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();
2  mythplugins/mythnews/mythnews/mythnews.h
View
@@ -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);
Please sign in to comment.
Something went wrong with that request. Please try again.