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

George Nassas gnassas at mac.com
Tue Jan 1 15:24:20 UTC 2008


On 1-Jan-08, at 1:58 AM, Anduin Withers wrote:

> A storage group doesn't necessarily specify a single directory, so  
> there
> cannot be that simple one-to-one mapping.

My thought was to make an assumption/requirement that relative video  
paths be unique within a storage group. I'd do it either formally, by  
creating a unique index on SG + filename, or informally by refusing  
to scan duplicate paths.

Personally I think such a restriction is reasonable. I see the point  
of an earlier poster that requiring unique filenames across all your  
videos is onerous but if you're going to the trouble to build a file  
system tree of all your vids the paths are probably going to be  
unique. And, if you must have duplicate video paths, you can always  
fall back to multiple storage groups.

Building the video tree then becomes a matter of tearing through the  
relative paths in videometadata (or the list returned by  
SG::GetAllFiles) and passing them to smart_dir_node. There will be a  
slight performance gain there but I doubt it's much.

As a aside, before too long I'd also like to add lazy loading for  
metadata. I have > 1,700 videos in my table but a given folder will  
have 6-30 entries so it's kind of a waste to load up the whole list  
each time. Anyway that's for another time.

One remaining issue - the current code creates a folder for each  
entry in VideoStartupDir. I hate this behaviour and have a kludgy  
patch to get rid of it for the current code. In the new setup I'd  
either get rid of those folders entirely or have per-storage group  
attribute for root level folder. Again, if you must have a top-level  
folder for each directory you can go with multiple storage groups.

The safest, most transparent, way would be for the DB convert to  
create one SG for each VideoStartupDir entry and to use the last  
folder as a top-level folder in mythvideo. People who want my way of  
presentation can then merge the SGs and clear the folder attribute.

What do you think?

- George



More information about the mythtv-dev mailing list