Aubin Paul wrote:
> I did it a little differently, but it works pretty well with all three
> cases. Also, I came up with a way to make vfs always write to the
> overlay:
>
> def open(name, mode='r'):
> """
> open the file
> """
> try:
> if config.VFS_ONLY and not os.path.isfile(name): raise IOError
> else: return file(name, mode)
> except:
> ...
I don't see how this works? open should
if mode == 'r':
find it in normal dir or overlay dir
else
if file exists in normal dir, reuse file to write.
else create the file:
if config.VFS_ONLY:
create it in vfs
else try to create in normal dir
except create in vfs
Maybe we should write a function get_write_file which does all this
checking. Than we can use this function to get a filename to save and
use e.g. normal image storing (is it clear what I mean?)
> At this point, there are two things I'd like to do:
> 1. Convert mp3dir.py into "audio/extendedmeta.py"
Something like that. Or a special cache handler. But there more things
to do in this file:
1. Check for loops. Right now softlinks can cause bad endless loops (I
guess). E.g. remember the start time and when mmpython cache is
newer than start time, we have a loop.
2. The user may change the fxd manually. So I guess we should do the
following things:
o don't add Various for Various info. Just add nothing and if you
like the word 'Various', let the skin insert it when album/artist
is not defined. This is better for i19n support.
o When scanning again: compare length.
a. fxd file has no length: write as you write now
b. fxd has length and length is the same: don't write fxd file
c. length differs: there may be new files. If album/artist is now
nothing, remove album/artist (new files may have caused this).
If album/artist is now somthing, don't overwrite, it was the
same before and edited.
> 2. Have it optionally run when a new directory is entered, same as when
> mmpython.parse() is run and the progressbar comes up.
Or inside the configure dialog: cache/scan disc.
Dischi
--
Conversation, n.:
A vocal competition in which the one who is catching his breath
is called the listener.
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog