[arch-commits] Commit in subdownloader/repos (4 files)

Ray Rashif schiv at archlinux.org
Wed Mar 2 22:51:55 UTC 2016


    Date: Wednesday, March 2, 2016 @ 23:51:54
  Author: schiv
Revision: 164263

archrelease: copy trunk to community-testing-any

Added:
  subdownloader/repos/community-testing-any/
  subdownloader/repos/community-testing-any/PKGBUILD
    (from rev 164262, subdownloader/trunk/PKGBUILD)
  subdownloader/repos/community-testing-any/follow-download-links.patch
    (from rev 164262, subdownloader/trunk/follow-download-links.patch)
  subdownloader/repos/community-testing-any/subdownloader.install
    (from rev 164262, subdownloader/trunk/subdownloader.install)

-----------------------------+
 PKGBUILD                    |   68 ++++++++++++++++++++++++++++++++++++++++++
 follow-download-links.patch |   53 ++++++++++++++++++++++++++++++++
 subdownloader.install       |   11 ++++++
 3 files changed, 132 insertions(+)

Copied: subdownloader/repos/community-testing-any/PKGBUILD (from rev 164262, subdownloader/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD	                        (rev 0)
+++ community-testing-any/PKGBUILD	2016-03-02 22:51:54 UTC (rev 164263)
@@ -0,0 +1,68 @@
+# $Id$
+# Maintainer: Ray Rashif <schiv at archlinux.org>
+# Contributor: Andrea Scarpino <andrea at archlinux.org>
+# Contributor: Geoffroy Carrier <geoffroy.carrier at koon.fr>
+# Contributor: Thomas Jost <thomas.jost at gmail.com>
+
+pkgname=subdownloader
+pkgver=2.0.18
+pkgrel=3
+pkgdesc="Automatic download/upload of subtitles using fast hashing"
+arch=('any')
+url="http://www.subdownloader.net/"
+license=('GPL3')
+depends=('imdbpy' 'kaa-metadata' 'python2-pyqt')
+makedepends=('icu')
+options=('!emptydirs')
+install=$pkgname.install
+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() {
+  cd "$srcdir/$pkgname-$pkgver"
+
+  # prepare dirs
+  install -d "$pkgdir/usr/share/$pkgname" \
+    "$pkgdir/usr/bin" \
+    "$pkgdir/usr/share/man/man1/"
+
+  # manuals
+  gzip subdownloader.1
+  install -D subdownloader.1.gz "$pkgdir/usr/share/man/man1/"
+
+  # freedesktop.org
+  install -D -m644 subdownloader.desktop \
+    "$pkgdir/usr/share/applications/subdownloader.desktop"
+  rm subdownloader.1.gz subdownloader.desktop
+
+  # runtime and executables
+  cp -a * "$pkgdir/usr/share/$pkgname/"
+  chmod 755 "$pkgdir/usr/share/$pkgname/run.py"
+  ln -s "/usr/share/$pkgname/run.py" \
+    "$pkgdir/usr/bin/subdownloader"
+
+  install -D -m644 gui/images/subdownloader.png \
+    "$pkgdir/usr/share/pixmaps/subdownloader.png"
+
+  # unnecessary directories
+  cd "$pkgdir/usr/share/$pkgname"
+  rm -r distribution
+}
+
+# vim:set ts=2 sw=2 et:

Copied: subdownloader/repos/community-testing-any/follow-download-links.patch (from rev 164262, subdownloader/trunk/follow-download-links.patch)
===================================================================
--- community-testing-any/follow-download-links.patch	                        (rev 0)
+++ community-testing-any/follow-download-links.patch	2016-03-02 22:51:54 UTC (rev 164263)
@@ -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

Copied: subdownloader/repos/community-testing-any/subdownloader.install (from rev 164262, subdownloader/trunk/subdownloader.install)
===================================================================
--- community-testing-any/subdownloader.install	                        (rev 0)
+++ community-testing-any/subdownloader.install	2016-03-02 22:51:54 UTC (rev 164263)
@@ -0,0 +1,11 @@
+post_install() {
+  update-desktop-database -q
+}
+
+post_upgrade() {
+  post_install
+}
+
+post_remove() {
+  post_install
+}



More information about the arch-commits mailing list