Aubin Paul wrote:
> On Tue, Dec 09, 2003 at 08:48:47PM +0100, Dirk Meyer wrote:
>> 1. Create a file for each directory to store that data. This is more
>>    or less duplicate work since mmpython does that.
>
> I think this would be necessary, simply because mmpython is a seperate
> program now.

Agreed. But maybe we could store the mmpython data ourself and bypass
the mmpython cache?

>
>> 2. You the mmpython cache. This is bad, because a) a cache shouldn't
>>    contain data that isn't stored somewhere else. Removing the cache
>>    will destroy your meta infos.
>
> A generalized storage interface would be nice. For example, you would
> create a meta item for each media file.
>
> myfile = util.MetaStore(file)
>
> myfile.store('PLAYDATE',date)
> myfile.increment('PLAYCOUNT')
>
> As you can see, it's very simple. We store a item for the file, the
> item could be a string, int, float or boolean.  I don't think we would
> need to worry about type safety, but the increment function would want
> a number and it would be silly to have to pull out the old item, add
> one and then write it in every source file so an increment method
> would be good.

So MetaStore is a dict containing variables for a 'file' (not an
item)? The big question is: when is this informationen added to the
item? Should each item call the util.MetaStore function? Or could it
be simpler? We will only need the data through the getattr function,
maybe this function could add the meta info if not loaded?

How to store the data? One file for each file will slow things now,
one file at all may be too huge. One file for a directory like
mmpython uses may be a good idea. 

> And then, we could support multiple datastores outside of the code. So
> we could use flatfiles now, and then move to sqlite or CSV or mysql or
> whatever someone cared to write for. 

Maybe use shelve.py?

Maybe remove the links to the current player in the items and store
the whole item?



Dischi

-- 
Hello, you've reached the psychiatric hotline. If you are
obsessive/compulsive, press 1 repeatedly. If you have multiple
personalities, press 2, 3, 4, and 5. If you are simply paranoid, just
stay on the line - we know who you are.


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to