packages: pynapi/pynapi.py, pynapi/pynapi.spec - ver 0.17; no need for p7zi...
arekm
arekm at pld-linux.org
Mon Feb 15 21:52:36 CET 2010
Author: arekm Date: Mon Feb 15 20:52:36 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- ver 0.17; no need for p7zip anymore (areq)
---- Files affected:
packages/pynapi:
pynapi.py (1.35 -> 1.36) , pynapi.spec (1.18 -> 1.19)
---- Diffs:
================================================================
Index: packages/pynapi/pynapi.py
diff -u packages/pynapi/pynapi.py:1.35 packages/pynapi/pynapi.py:1.36
--- packages/pynapi/pynapi.py:1.35 Tue Feb 9 20:38:29 2010
+++ packages/pynapi/pynapi.py Mon Feb 15 21:52:30 2010
@@ -22,8 +22,6 @@
import sys
import mimetypes
import urllib2
-import subprocess
-import tempfile
import time
import os
import getopt
@@ -190,7 +188,7 @@
print >> sys.stderr, "%s: %d/%d: Hashing video file failed: %s" % (prog, i, i_total, e)
continue
- url = "http://napiprojekt.pl/unit_napisy/dl.php?l=%s&f=%s&t=%s&v=other&kolejka=false&nick=&pass=&napios=%s" % \
+ url = "http://napiprojekt.pl/unit_napisy/dl.php?l=%s&f=%s&t=%s&v=dreambox&kolejka=false&nick=&pass=&napios=%s" % \
(languages[lang], d.hexdigest(), f(d.hexdigest()), os.name)
repeat = 3
@@ -227,28 +225,8 @@
if repeat == -1:
continue
- fp = tempfile.NamedTemporaryFile('wb', suffix=".7z")
- tfp = fp.name
- fp.write(sub)
- fp.flush()
-
- try:
- cmd = ['/usr/bin/7z', 'x', '-y', '-so', '-p' + napipass, tfp]
- sa = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True)
- (so, se) = sa.communicate(sub)
- retcode = sa.returncode
- except OSError, e:
- se = e
- retcode = True
-
- fp.close()
-
- if retcode:
- print >> sys.stderr, "%s: %d/%d: Subtitle decompression FAILED: %s" % (prog, i, i_total, se)
- continue
-
fp = open(vfile, 'w')
- fp.write(so)
+ fp.write(sub)
fp.close()
desc = get_desc_links(d.hexdigest(), file)
@@ -266,7 +244,7 @@
fp.close()
cover_stored = ", %s COVER STORED (%d bytes)" % (extension, len(cover))
- print >> sys.stderr, "%s: %d/%d: SUBTITLE STORED (%d bytes)%s" % (prog, i, i_total, len(so), cover_stored)
+ print >> sys.stderr, "%s: %d/%d: SUBTITLE STORED (%d bytes)%s" % (prog, i, i_total, len(sub), cover_stored)
return 0
================================================================
Index: packages/pynapi/pynapi.spec
diff -u packages/pynapi/pynapi.spec:1.18 packages/pynapi/pynapi.spec:1.19
--- packages/pynapi/pynapi.spec:1.18 Tue Feb 9 20:38:29 2010
+++ packages/pynapi/pynapi.spec Mon Feb 15 21:52:30 2010
@@ -2,14 +2,13 @@
Summary: pynapi - Movie Subtitle Downloader
Summary(pl.UTF-8): pynapi - narzędzie do ściągania napisów do filmów
Name: pynapi
-Version: 0.15
+Version: 0.16
Release: 1
License: GPL v3+
Group: Applications/Multimedia
Source0: pynapi.py
BuildRequires: python-modules
BuildRequires: rpm-pythonprov
-Requires: p7zip
%pyrequires_eq python-modules
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -43,6 +42,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.19 2010/02/15 20:52:30 arekm
+- ver 0.17; no need for p7zip anymore (areq)
+
Revision 1.18 2010/02/09 19:38:29 arekm
- ver 0.15; no debug
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/pynapi/pynapi.py?r1=1.35&r2=1.36&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/pynapi/pynapi.spec?r1=1.18&r2=1.19&f=u
More information about the pld-cvs-commit
mailing list