packages: subconv/subconv.py, subconv/subconv.spec - ver 4; working fps det...

arekm arekm at pld-linux.org
Sun Feb 21 22:00:48 CET 2010


Author: arekm                        Date: Sun Feb 21 21:00:48 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- ver 4; working fps detection for mdvd format

---- Files affected:
packages/subconv:
   subconv.py (1.10 -> 1.11) , subconv.spec (1.8 -> 1.9) 

---- Diffs:

================================================================
Index: packages/subconv/subconv.py
diff -u packages/subconv/subconv.py:1.10 packages/subconv/subconv.py:1.11
--- packages/subconv/subconv.py:1.10	Sun Feb 21 20:55:42 2010
+++ packages/subconv/subconv.py	Sun Feb 21 22:00:43 2010
@@ -35,7 +35,11 @@
     returns: FPS
     """
     def mediainfo_fps(file):
-        f = subprocess.Popen(['mediainfo', '--Inform=Video;%FrameRate%', file], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+        f = None
+        try:
+            f = subprocess.Popen(['mediainfo', '--Inform=Video;%FrameRate%', file], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+        except OSError, e:
+            return False
         (out, err) = f.communicate()
         if out:
             out = out.strip()
@@ -44,7 +48,11 @@
         return float(out)
 
     def file_fps(file):
-        f = subprocess.Popen(['file', file], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+        f = None
+        try:
+            f = subprocess.Popen(['file', file], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+        except OSError, e:
+            return False
         (out, err) = f.communicate()
         if out:
             out = out.strip()

================================================================
Index: packages/subconv/subconv.spec
diff -u packages/subconv/subconv.spec:1.8 packages/subconv/subconv.spec:1.9
--- packages/subconv/subconv.spec:1.8	Sun Feb 21 16:19:16 2010
+++ packages/subconv/subconv.spec	Sun Feb 21 22:00:43 2010
@@ -1,14 +1,14 @@
 # $Revision$, $Date$
 Summary:	Subtitle formats converter
 Name:		subconv
-Version:	0.3
-Release:	4
+Version:	0.4
+Release:	1
 License:	GPL
 Group:		Applications/System
 Source0:	%{name}.py
 URL:		http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/subconv/
 Requires:	python-modules >= 1:2.4
-Suggests:	mediainfo
+Requires:	mediainfo
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -35,6 +35,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.9  2010/02/21 21:00:43  arekm
+- ver 4; working fps detection for mdvd format
+
 Revision 1.8  2010/02/21 15:19:16  arekm
 - python >= 2.4 needed
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/subconv/subconv.py?r1=1.10&r2=1.11&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/subconv/subconv.spec?r1=1.8&r2=1.9&f=u



More information about the pld-cvs-commit mailing list