Update of /cvsroot/freevo/freevo/src/mediadb
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24501
Modified Files:
parser.py
Log Message:
do not remove ext for directories
Index: parser.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/mediadb/parser.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** parser.py 11 Apr 2005 18:17:12 -0000 1.5
--- parser.py 17 Apr 2005 16:40:23 -0000 1.6
***************
*** 102,106 ****
_FILENAME_REGEXP = re.compile("^(.*?)_(.)(.*)$")
! def getname(file):
"""
make a nicer display name from file
--- 102,106 ----
_FILENAME_REGEXP = re.compile("^(.*?)_(.)(.*)$")
! def getname(file, keep_ext):
"""
make a nicer display name from file
***************
*** 110,114 ****
# basename without ext
! if file.rfind('/') < file.rfind('.'):
name = file[file.rfind('/')+1:file.rfind('.')]
else:
--- 110,114 ----
# basename without ext
! if not keep_ext and file.rfind('/') < file.rfind('.'):
name = file[file.rfind('/')+1:file.rfind('.')]
else:
***************
*** 156,160 ****
if not fast_scan and not object['ext'] in [ 'xml', 'fxd' ]:
mminfo = mmpython.parse(filename)
! title = getname(filename)
object['title:filename'] = title
if mminfo:
--- 156,162 ----
if not fast_scan and not object['ext'] in [ 'xml', 'fxd' ]:
mminfo = mmpython.parse(filename)
!
! is_dir = os.path.isdir(filename)
! title = getname(filename, is_dir)
object['title:filename'] = title
if mminfo:
***************
*** 172,176 ****
object['title'] = title
! if os.path.isdir(filename):
object['isdir'] = True
if vfs.abspath(filename + '/' + basename + '.fxd'):
--- 174,178 ----
object['title'] = title
! if is_dir:
object['isdir'] = True
if vfs.abspath(filename + '/' + basename + '.fxd'):
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog