summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--1329.patch49
-rw-r--r--PKGBUILD9
3 files changed, 58 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 83f71ede2bb..0f8b0d94ba0 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = transgui
pkgdesc = A feature rich cross platform Transmission BitTorrent client. Faster and has more functionality than the built-in web GUI.
pkgver = 5.18.0
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/transmission-remote-gui/transgui
arch = i686
arch = x86_64
@@ -11,8 +11,10 @@ pkgbase = transgui
makedepends = gtk2
source = https://github.com/transmission-remote-gui/transgui/archive/v5.18.0.tar.gz
source = transgui.desktop
+ source = https://github.com/transmission-remote-gui/transgui/pull/1329.patch
sha256sums = d1cbb16eb35d41e76f4a171a3887053899e8dc6a1124afc21615b5038ea60d78
sha256sums = 6c1723e084bd4afc908957e005dea60f919b42426d82cbcdee89239c64c6093d
+ sha256sums = f50857a783950421bb22b8c59923a84196968bac6c9488bcf241bb005298a390
pkgname = transgui-qt
depends = qt5pas
diff --git a/1329.patch b/1329.patch
new file mode 100644
index 00000000000..04967efd01e
--- /dev/null
+++ b/1329.patch
@@ -0,0 +1,49 @@
+From 8d63a310cbdc99ff8d565e2429c0740a8be5c3cb Mon Sep 17 00:00:00 2001
+From: Kuzz <Kuzz@ThinkPad.localdomain>
+Date: Wed, 29 Jul 2020 21:24:21 +0300
+Subject: [PATCH] Deduplicate RequestInfo params. #1325
+
+---
+ rpc.pas | 17 ++++++++++++++---
+ 1 file changed, 14 insertions(+), 3 deletions(-)
+
+diff --git a/rpc.pas b/rpc.pas
+index 2cbfeee0..7f9254c8 100644
+--- a/rpc.pas
++++ b/rpc.pas
+@@ -816,21 +816,32 @@ function TRpc.RequestInfo(TorrentId: integer; const Fields: array of const; cons
+ req, args: TJSONObject;
+ _fields: TJSONArray;
+ i: integer;
++ sl: TStringList;
+ begin
+ Result:=nil;
+ req:=TJSONObject.Create;
++ sl:=TStringList.Create;
+ try
+ req.Add('method', 'torrent-get');
+ args:=TJSONObject.Create;
+ if TorrentId <> 0 then
+ args.Add('ids', TJSONArray.Create([TorrentId]));
+- _fields:=TJSONArray.Create(Fields);
+- for i:=Low(ExtraFields) to High(ExtraFields) do
+- _fields.Add(ExtraFields[i]);
++ _fields:=TJSONArray.Create;
++ for i:=Low(Fields) to High(Fields) do
++ if (Fields[i].VType=vtAnsiString) then
++ sl.Add(String(Fields[i].VAnsiString));
++ sl.AddStrings(ExtraFields);
++ sl.Sort;
++ for i:=sl.Count-2 downto 0 do
++ if (sl[i]=sl[i+1]) then
++ sl.Delete(i+1);
++ for i:=0 to sl.Count-1 do
++ _fields.Add(sl[i]);
+ args.Add('fields', _fields);
+ req.Add('arguments', args);
+ Result:=SendRequest(req);
+ finally
++ sl.Free;
+ req.Free;
+ end;
+ end;
diff --git a/PKGBUILD b/PKGBUILD
index 9fceb1b661b..f12f2be290d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,19 +6,22 @@
pkgbase='transgui'
pkgname=("${pkgbase}-qt" "${pkgbase}-gtk")
pkgver='5.18.0'
-pkgrel='1'
+pkgrel='2'
pkgdesc='A feature rich cross platform Transmission BitTorrent client. Faster and has more functionality than the built-in web GUI.'
arch=('i686' 'x86_64')
url="https://github.com/transmission-remote-gui/${pkgbase}"
license=("GPL")
makedepends=('lazarus' 'qt5pas' 'gtk2')
source=("${url}/archive/v${pkgver}.tar.gz"
- "${pkgbase}.desktop")
+ "${pkgbase}.desktop"
+ "https://github.com/transmission-remote-gui/transgui/pull/1329.patch")
sha256sums=('d1cbb16eb35d41e76f4a171a3887053899e8dc6a1124afc21615b5038ea60d78'
- '6c1723e084bd4afc908957e005dea60f919b42426d82cbcdee89239c64c6093d')
+ '6c1723e084bd4afc908957e005dea60f919b42426d82cbcdee89239c64c6093d'
+ 'f50857a783950421bb22b8c59923a84196968bac6c9488bcf241bb005298a390')
prepare() {
cd "${srcdir}/${pkgbase}-${pkgver}"
+ patch -p1 -i "${srcdir}/1329.patch"
mkdir "${srcdir}/build-qt" "${srcdir}/build-gtk"
}