[mythtv-commits] mythtv commit: r25351 - in trunk/mythtv by cpinkham

mythtv at cvs.mythtv.org mythtv at cvs.mythtv.org
Fri Jul 16 04:42:20 UTC 2010


      Author: cpinkham
        Date: 2010-07-16 04:42:20 +0000 (Fri, 16 Jul 2010)
New Revision: 25351
   Changeset: http://svn.mythtv.org/trac/changeset/25351

Modified:

   trunk/mythtv/libs/libmythdb/mythcoreutil.cpp
   trunk/mythtv/libs/libmythdb/mythcoreutil.h
   trunk/mythtv/libs/libmythdb/mythdownloadmanager.cpp
   trunk/mythtv/libs/libmythdb/mythdownloadmanager.h
   trunk/mythtv/libs/libmythdb/mythversion.h
   trunk/mythtv/libs/libmythdb/storagegroup.cpp
   trunk/mythtv/libs/libmythdb/storagegroup.h
   trunk/mythtv/libs/libmythui/mythuihelper.cpp
   trunk/mythtv/libs/libmythui/mythuihelper.h
   trunk/mythtv/programs/mythbackend/mainserver.cpp
   trunk/mythtv/programs/mythbackend/mainserver.h

Log:

Merge in a bunch of Theme Downloader supporting code.

NOTE: For those who don't want to read till the end, this does modify
the binary API version, so make clean, etc..

Add the following new MythDownloadManager methods:

  void preCache(const QString &url);
  void queueDownload(QNetworkRequest *req, QByteArray *data, QObject *caller);
  bool download(QNetworkRequest *req, QByteArray *data);
  void queuePost(const QString &url, QByteArray *data, QObject *caller);
  void queuePost(QNetworkRequest *req, QByteArray *data, QObject *caller);
  bool post(const QString &url, QByteArray *data);
  bool post(QNetworkRequest *req, QByteArray *data);

Add the ability to download myth:// URIs via the MythDownloadManager.

Add two built-in Storage Groups, 'Themes' and 'Temp'.  Themes points
at GetConfDir() + "/themes" and Temp points at GetConfDir() + "/tmp".
Temp is used for temporary files downloaded on the master backend,
Themes will be used in the future.

Add MythUIHelper::GetThemeName() to get the name of the current theme
without having to hit the database.

Add a pair of new backend commands to instruct the backend to download
a remote file into a local storage group.

   DOWNLOAD_FILE
   DOWNLOAD_FILE_NOW

   Each command takes a URL, Storage Group name, and destination filename
   as arguments.  The reply contains the myth:// URI of the file downloaded.

Add a pair of helper functions for sending the new DOWNLOAD_FILE* commands.

   QString RemoteDownloadFile(const QString &url,
                              const QString &storageGroup,
                              const QString &filename)

   QString RemoteDownloadFileNow(const QString &url,
                                 const QString &storageGroup,
                                 const QString &filename)

   Each helper returns the myth:// URI for the file downloaded.

Send out status events for asynchronous downloads.  These are send out
locally on the frontend for a local download.  Downloads on the backend
trigger events to be sent out globally.  Local downloads include the
local filename of the destination file if the data is being downloaded
to a file.  Backend downloads include the myth:// URI of the file
being downloaded.

   DOWNLOAD_FILE UPDATE
   remoteURL                   (http://blah.com/blah/blah/blah.jpg)
   localFilename               (/some/dir/blah.jpg OR myth://Fanart@192.168.1.1/blah.jpg)
   bytesReceived               (1024)
   bytesTotal                  (10240)

   DOWNLOAD_FILE FINISHED
   remoteURL                   (http://blah.com/blah/blah/blah.jpg)
   localFilename               (/some/dir/blah.jpg OR myth://Fanart@192.168.1.1/blah.jpg)
   bytesDownloaded             (10240)
   errorString                 (placeholder for more verbose messages)
   errorCode                   (non-zero is error)

Includes some threading fixes for MythDownloadManager for async downloads.

Speed up last modified checking by checking disk cache metadata for
recently downloaded files instead of requesting page from cache and
then checking headers of returned page.

NOTE: This does modify the binary API version, so make clean, etc..






More information about the mythtv-commits mailing list