Update of /cvsroot/freevo/freevo/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6891/src
Modified Files:
directory.py
Log Message:
better overlay change scanning
Index: directory.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/directory.py,v
retrieving revision 1.150
retrieving revision 1.151
diff -C2 -d -r1.150 -r1.151
*** directory.py 8 Jan 2005 12:53:56 -0000 1.150
--- directory.py 8 Jan 2005 13:02:16 -0000 1.151
***************
*** 1002,1012 ****
ret = []
for f in os.listdir(vfs.getoverlay(self.dir)):
! if f.endswith('.raw'):
! if f[f[:-4].rfind('.')+1:-4].lower() in config.VIDEO_SUFFIX:
! ret.append(f)
! else:
! if not f.endswith('.cache') and not \
os.path.isdir(os.path.join(self.dir, f)):
! ret.append(f)
return ret
--- 1002,1009 ----
ret = []
for f in os.listdir(vfs.getoverlay(self.dir)):
! # ignore .raw and .cache files
! if not f.endswith('.raw') and not f.endswith('.cache') and not \
os.path.isdir(os.path.join(self.dir, f)):
! ret.append(f)
return ret
***************
*** 1040,1044 ****
eventhandler.post(MENU_BACK_ONE_MENU)
self.dir = None
! return
changed = False
--- 1037,1041 ----
eventhandler.post(MENU_BACK_ONE_MENU)
self.dir = None
! return False
changed = False
***************
*** 1049,1052 ****
--- 1046,1050 ----
for f in self.files:
if not f in new_files:
+ # deleted a file
changed = True
break
***************
*** 1054,1057 ****
--- 1052,1056 ----
for f in new_files:
if not f in self.files:
+ # added a file
changed = True
break
***************
*** 1068,1071 ****
--- 1067,1071 ----
self.item.__dirwatcher_last_files = self.files
+ return True
***************
*** 1075,1078 ****
--- 1075,1080 ----
eventhandler.is_menu():
self.scan()
+ return True
+
# and activate that DaemonPlugin
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog