[mythtv] [mythtv-commits] mythtv commit: r15029 - in trunk/mythtv by danielk

Chris Pinkham cpinkham at bc2va.org
Mon Dec 3 20:24:08 UTC 2007


* On Mon Dec 03, 2007 at 07:27:31PM +0000, mythtv at cvs.mythtv.org wrote:
>       Author: danielk
>         Date: 2007-12-03 19:27:31 +0000 (Mon, 03 Dec 2007)
> New Revision: 15029
>    Changeset: http://cvs.mythtv.org/trac/changeset/15029
> 
> Modified:
> 
>    trunk/mythtv/libs/libmythtv/storagegroup.cpp
>    trunk/mythtv/libs/libmythtv/storagegroup.h

StorageGroup::FindRecordingFile() will already search all existing
Storage Group directories.  So you don't need to cycle through all
groups calling FindRecordingFile() inside StorageGroup::FindFile().

FindRecordingFile calls FindRecordingDir().  FindRecoringDir will
search in the following order until the file is found:

  1) The current Storage Group's directories
  2) The 'Default' Storage Group for this host
  3) Any Storage Group's directories.

You can short-circuit and just do #3 by doing the following:

StorageGroup sgroup;
QString tmpFile = sgroup.FindRecordingDir(filename);

This is because if you don't specify a group name when you instantiate
sgroup, then by default it uses the list of all directories in the
storagegroup table.

--
Chris


More information about the mythtv-dev mailing list