[packages/pynapi] - rel 3; downloaded files that have less than 20 lines are considered to be error messages rather th
arekm
arekm at pld-linux.org
Wed Feb 13 20:06:14 CET 2013
commit 33a62f95d3afd65e4918448640f656ba6680de0c
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Wed Feb 13 20:06:10 2013 +0100
- rel 3; downloaded files that have less than 20 lines are considered to be error messages rather than real subtitles (no proper error handling/error codes on napiprojekt server side).
pynapi.py | 2 +-
pynapi.spec | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/pynapi.spec b/pynapi.spec
index 282fdaf..8c55f4e 100644
--- a/pynapi.spec
+++ b/pynapi.spec
@@ -2,7 +2,7 @@ Summary: pynapi - Movie Subtitle Downloader
Summary(pl.UTF-8): pynapi - narzędzie do ściągania napisów do filmów
Name: pynapi
Version: 0.18
-Release: 2
+Release: 3
License: GPL v3+
Group: Applications/Multimedia
Source0: pynapi.py
diff --git a/pynapi.py b/pynapi.py
index c99d1e8..459118f 100644
--- a/pynapi.py
+++ b/pynapi.py
@@ -138,7 +138,7 @@ def get_subtitle(digest, lang="PL"):
time.sleep(0.5)
continue
- if sub.startswith('NPc') or sub.find('Blad polaczenia z baza danych') != -1:
+ if len(sub.split('\n')) < 20:
raise Exception('Subtitle NOT FOUND')
repeat = 0
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/pynapi.git/commitdiff/33a62f95d3afd65e4918448640f656ba6680de0c
More information about the pld-cvs-commit
mailing list