SOURCES: pynapi.py Table with video file suffixes.
arekm
arekm at pld-linux.org
Sat Jan 17 23:27:54 CET 2009
Author: arekm Date: Sat Jan 17 22:27:54 2009 GMT
Module: SOURCES Tag: HEAD
---- Log message:
Table with video file suffixes.
---- Files affected:
SOURCES:
pynapi.py (1.9 -> 1.10)
---- Diffs:
================================================================
Index: SOURCES/pynapi.py
diff -u SOURCES/pynapi.py:1.9 SOURCES/pynapi.py:1.10
--- SOURCES/pynapi.py:1.9 Sat Jan 17 20:19:39 2009
+++ SOURCES/pynapi.py Sat Jan 17 23:27:48 2009
@@ -25,6 +25,8 @@
prog = os.path.basename(sys.argv[0])
+video_files = [ 'avi', 'mkv', 'mpg' ]
+
def f(z):
idx = [ 0xe, 0x3, 0x6, 0x8, 0x2 ]
mul = [ 2, 2, 5, 4, 3 ]
@@ -74,7 +76,7 @@
if os.path.isdir(arg):
for dirpath, dirnames, filenames in os.walk(arg, topdown=False):
for file in filenames:
- if file.lower().endswith('.avi'):
+ if file[-4:-3] == '.' and file.lower()[-3:] in video_files:
files.append(os.path.join(dirpath, file))
else:
files.append(arg)
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/pynapi.py?r1=1.9&r2=1.10&f=u
More information about the pld-cvs-commit
mailing list