[arch-commits] Commit in subdownloader/trunk (PKGBUILD follow-download-links.patch)
Ray Rashif
schiv at archlinux.org
Wed Mar 2 22:51:44 UTC 2016
Date: Wednesday, March 2, 2016 @ 23:51:43
Author: schiv
Revision: 164262
upgpkg: subdownloader 2.0.18-3
subdownloader: backport fix for API breakage
Added:
subdownloader/trunk/follow-download-links.patch
Modified:
subdownloader/trunk/PKGBUILD
-----------------------------+
PKGBUILD | 12 +++++++--
follow-download-links.patch | 53 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 62 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2016-03-02 22:28:15 UTC (rev 164261)
+++ PKGBUILD 2016-03-02 22:51:43 UTC (rev 164262)
@@ -6,7 +6,7 @@
pkgname=subdownloader
pkgver=2.0.18
-pkgrel=2
+pkgrel=3
pkgdesc="Automatic download/upload of subtitles using fast hashing"
arch=('any')
url="http://www.subdownloader.net/"
@@ -15,17 +15,23 @@
makedepends=('icu')
options=('!emptydirs')
install=$pkgname.install
-source=("http://launchpad.net/$pkgname/trunk/$pkgver/+download/${pkgname}_$pkgver.orig.tar.gz")
-md5sums=('11dbc455f542b68e96e2cc539deb3f8f')
+source=("http://launchpad.net/$pkgname/trunk/$pkgver/+download/${pkgname}_$pkgver.orig.tar.gz"
+ "follow-download-links.patch")
+md5sums=('11dbc455f542b68e96e2cc539deb3f8f'
+ 'ae4eee141243cb5a20eeaaa49abcf75b')
build() {
cd "$srcdir/$pkgname-$pkgver"
+ # See https://bugs.archlinux.org/task/48402
+ patch -Np0 -i "$srcdir/follow-download-links.patch"
+
# python2 fix
for file in $(find . -name '*.py' -print); do
sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' $file
sed -i 's_^#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file
done
+
}
package() {
Added: follow-download-links.patch
===================================================================
--- follow-download-links.patch (rev 0)
+++ follow-download-links.patch 2016-03-02 22:51:43 UTC (rev 164262)
@@ -0,0 +1,53 @@
+------------------------------------------------------------
+revno: 557
+committer: Christos Trochalakis <yatiohi at ideopolis.gr>
+branch nick: subdownloader
+timestamp: Sat 2016-01-02 20:14:12 +0200
+message:
+ Follow opensubtitles.org download link
+
+ Download links were constructed by subdownloader instead of using the
+ download URL from the API.
+
+ Closes #1528605
+diff:
+=== modified file 'gui/main.py'
+--- gui/main.py 2012-11-04 14:45:22 +0000
++++ gui/main.py 2016-01-02 18:14:12 +0000
+@@ -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:
+
+=== modified file 'modules/SDService.py'
+--- modules/SDService.py 2011-05-30 02:16:51 +0000
++++ modules/SDService.py 2016-01-02 18:14:12 +0000
+@@ -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()))
+
+=== modified file 'modules/subtitlefile.py'
+--- modules/subtitlefile.py 2011-05-30 02:16:51 +0000
++++ modules/subtitlefile.py 2016-01-02 18:14:12 +0000
+@@ -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
More information about the arch-commits
mailing list