Update of /cvsroot/freevo/freevo/src/mediadb
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21562/src/mediadb
Modified Files:
generic.py item.py listing.py parser.py
Log Message:
use kaa.metadata instead of mmpython
Index: generic.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/mediadb/generic.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** generic.py 7 May 2005 17:33:27 -0000 1.4
--- generic.py 2 Jul 2005 16:46:25 -0000 1.5
***************
*** 38,43 ****
import logging
! # mmpython
! from mmpython.disc.discinfo import cdrom_disc_id
# freevo imports
--- 38,43 ----
import logging
! # kaa.metadata
! from kaa.metadata.disc.discinfo import cdrom_disc_id
# freevo imports
Index: parser.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/mediadb/parser.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** parser.py 9 Jun 2005 20:11:41 -0000 1.9
--- parser.py 2 Jul 2005 16:46:26 -0000 1.10
***************
*** 34,38 ****
import stat
import time
! import mmpython
import pickle
import cPickle
--- 34,38 ----
import stat
import time
! import kaa.metadata
import pickle
import cPickle
***************
*** 59,63 ****
"""
global VERSION
! VERSION += mmpython.version.CHANGED
for f in os.listdir(os.path.dirname(__file__)):
if f.endswith('_parser.py'):
--- 59,63 ----
"""
global VERSION
! VERSION += kaa.metadata.version.CHANGED
for f in os.listdir(os.path.dirname(__file__)):
if f.endswith('_parser.py'):
***************
*** 69,73 ****
def simplify(object):
"""
! mmpython has huge objects to cache, we don't need them.
This function simplifies them to be only string, integer, dict or
list of one of those above. This makes the caching much faster
--- 69,73 ----
def simplify(object):
"""
! Kaa.metadata has huge objects to cache, we don't need them.
This function simplifies them to be only string, integer, dict or
list of one of those above. This makes the caching much faster
***************
*** 175,179 ****
ext = object[EXTENTION]
if not ext in [ 'xml', 'fxd' ]:
! mminfo = mmpython.parse(filename)
is_dir = os.path.isdir(filename)
--- 175,179 ----
ext = object[EXTENTION]
if not ext in [ 'xml', 'fxd' ]:
! mminfo = kaa.metadata.parse(filename)
is_dir = os.path.isdir(filename)
***************
*** 182,186 ****
if mminfo:
! # store mmpython data as pickle for faster loading
object[MMINFO] = cPickle.dumps(simplify(mminfo),
pickle.HIGHEST_PROTOCOL)
--- 182,186 ----
if mminfo:
! # store kaa.metadata data as pickle for faster loading
object[MMINFO] = cPickle.dumps(simplify(mminfo),
pickle.HIGHEST_PROTOCOL)
Index: listing.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/mediadb/listing.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** listing.py 25 Jun 2005 08:52:27 -0000 1.7
--- listing.py 2 Jul 2005 16:46:26 -0000 1.8
***************
*** 73,77 ****
"""
Update the directory listing. This means parsing all changed / new
! files. If fast is True, only new files will be updated and mmpython
checking is disabled. The listing is still not correct then. If
callback not not None, callback will be called on each item.
--- 73,77 ----
"""
Update the directory listing. This means parsing all changed / new
! files. If fast is True, only new files will be updated and metadata
checking is disabled. The listing is still not correct then. If
callback not not None, callback will be called on each item.
Index: item.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/mediadb/item.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** item.py 25 Jun 2005 08:52:27 -0000 1.9
--- item.py 2 Jul 2005 16:46:26 -0000 1.10
***************
*** 61,65 ****
# tmp data only valid in the current session
self.tmp = {}
! # mmpython data for the item
self.mminfo = None
# hidden variables (FIXME)
--- 61,65 ----
# tmp data only valid in the current session
self.tmp = {}
! # kaa.metadata data for the item
self.mminfo = None
# hidden variables (FIXME)
***************
*** 107,111 ****
return self.hidden_variables[key]
if self.mminfo == None:
! # unpickle mmpython data
if not self.attr.has_key(MMINFO):
return None
--- 107,111 ----
return self.hidden_variables[key]
if self.mminfo == None:
! # unpickle kaa.metadata data
if not self.attr.has_key(MMINFO):
return None
***************
*** 146,150 ****
return True
if self.mminfo == None:
! # unpickle mmpython data
if not self.attr.has_key(MMINFO):
return False
--- 146,150 ----
return True
if self.mminfo == None:
! # unpickle kaa.metadata data
if not self.attr.has_key(MMINFO):
return False
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog