[Python-apps-commits] r12727 - in packages/subdownloader/trunk/debian (3 files)

mattia at users.alioth.debian.org mattia at users.alioth.debian.org
Fri Jan 15 23:54:01 UTC 2016


    Date: Friday, January 15, 2016 @ 23:53:59
  Author: mattia
Revision: 12727

Make subdownloader download subtitles again after opensubtitles.org
API change.  Closes: #810530  LP: #1528605

Added:
  packages/subdownloader/trunk/debian/patches/follow-opensubtitles-download-link
Modified:
  packages/subdownloader/trunk/debian/changelog
  packages/subdownloader/trunk/debian/patches/series

Modified: packages/subdownloader/trunk/debian/changelog
===================================================================
--- packages/subdownloader/trunk/debian/changelog	2016-01-15 20:50:42 UTC (rev 12726)
+++ packages/subdownloader/trunk/debian/changelog	2016-01-15 23:53:59 UTC (rev 12727)
@@ -1,8 +1,13 @@
-subdownloader (2.0.18-2) UNRELEASED; urgency=low
+subdownloader (2.0.18-2) UNRELEASED; urgency=medium
 
+  [ Emilien Klein ]
   * d/patches/load-translations.patch: Corrects Debian's program folder to
       load the translations correctly (Closes: #767036).
 
+  [ Mattia Rizzolo ]
+  * Make subdownloader download subtitles again after opensubtitles.org
+    API change.  Closes: #810530  LP: #1528605
+
  -- Emilien Klein <emilien+debian at klein.st>  Mon, 27 Oct 2014 23:26:06 +0100
 
 subdownloader (2.0.18-1) unstable; urgency=low

Added: packages/subdownloader/trunk/debian/patches/follow-opensubtitles-download-link
===================================================================
--- packages/subdownloader/trunk/debian/patches/follow-opensubtitles-download-link	                        (rev 0)
+++ packages/subdownloader/trunk/debian/patches/follow-opensubtitles-download-link	2016-01-15 23:53:59 UTC (rev 12727)
@@ -0,0 +1,49 @@
+Description: make subdownloader work again after API change
+ Follow opensubtitles.org download link
+ .
+ Download links were constructed by subdownloader instead of using the
+ download URL from the API.
+Author: Christos Trochalakis <yatiohi at ideopolis.gr>
+Bug: https://bugs.launchpad.net/subdownloader/+bug/1528605
+Bug-Debian: https://bugs.debian.org/810530
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+bug/1528605
+Acked-By: Mattia Rizzolo <mattia at debian.org>
+Last-Update: 2016-01-13
+
+
+--- a/gui/main.py
++++ b/gui/main.py
+@@ -1140,7 +1140,7 @@
+                    if not skip_all:
+                         log.debug("Downloading subtitle '%s'" % destinationPath)
+ 			#print {sub.getIdFileOnline():destinationPath}
+-                        osHttpRequests.download('http://www.opensubtitles.org/en/download/file/%s.gz' %sub.getIdFileOnline(), destinationPath)
++                        osHttpRequests.download(sub.getDownloadLink(), destinationPath)
+                         #if self.OSDBServer.DownloadSubtitles({sub.getIdFileOnline():destinationPath}):
+                             #success_downloaded += 1
+                         #else:
+--- a/modules/SDService.py
++++ b/modules/SDService.py
+@@ -490,6 +490,7 @@
+                             #sub.setLanguageName(i["LanguageName"]) 
+                             sub.setRating(i["SubRating"])
+                             sub.setUploader(i["UserNickName"])
++                            sub.setDownloadLink(i["SubDownloadLink"])
+                             sub.setVideo(video)
+                             
+                             self.log.debug("  [%s] - %s"%  (sub.getLanguage(), sub.getFileName()))
+--- a/modules/subtitlefile.py
++++ b/modules/subtitlefile.py
+@@ -139,6 +139,12 @@
+     def getRating(self):
+         return self.rating
+ 
++    def setDownloadLink(self, link):
++        self.download_link = link
++
++    def getDownloadLink(self):
++        return self.download_link
++
+     def setExtraInfo(self, info, data):
+         self._extraInfo[info] = data
+ 

Modified: packages/subdownloader/trunk/debian/patches/series
===================================================================
--- packages/subdownloader/trunk/debian/patches/series	2016-01-15 20:50:42 UTC (rev 12726)
+++ packages/subdownloader/trunk/debian/patches/series	2016-01-15 23:53:59 UTC (rev 12727)
@@ -2,3 +2,4 @@
 resize-icon.patch
 desktop-file-remove-path.patch
 no-mime-type-in-desktop-file.patch
+follow-opensubtitles-download-link




More information about the Python-apps-commits mailing list