[mythtv] Ticket #4270: MythTV on Windows (with MinGW)

Chris Pinkham cpinkham at bc2va.org
Sun Dec 30 20:16:07 UTC 2007


* On Sun Dec 30, 2007 at 08:28:29AM -0800, Anduin Withers wrote:
> > Rather than duplicating some bits of the code,
> > you could create a special 'MythVideo' or similar Storage Group
> > and let the Storage Group code handle locating your files during
> > playback.  You could also add methods to the StorageGroup class to list
> > all unique files in a Storage Group and that method could be used
> > in MythVideo to get a list of all MythVideo files.
> 
> I had skipping them because they were too flat. They could be used but
> restricted to GetDirList() only. MythVideo needs some of the information
> storage groups try to eliminate (the path relative to a prefix is used
> during tree building).

You could add several methods:

QStringList StorageGroup::GetAllFiles(bool descendIntoSubDirs = false)
    - get list of all files in the current SG's directories

QStringList StorageGroup::GetDirFiles(QString dir)
    - get list of all files in the specified dir

QStringList StorageGroup::GetDirSubDirs(QString dir)
    - get list of all subdirs in the specified dir

These would let you traverse the tree(s) in a GUI and would come in
handy for other things as well.  If you only store the actual filename
in the DB, then the user can move files around without needing to update
the DB.  This makes MythVideo as flexible as the main MythTV
functionality regarding file locations.

mythgallery could take advantage of code like this as well for its
browser.

--
Chris


More information about the mythtv-dev mailing list