diff options
author | Jeremy Hansen <jebrhansen+github@gmail.com> | 2023-03-29 20:17:00 -0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-04-01 09:14:28 +0700 |
commit | aec811a4c3b760d86be694dbcdb223880b871f5f (patch) | |
tree | 34b67c3fbcd5ecdeaba5dc698ea5439fc57c514a /network | |
parent | 2b2a4fb056a30123c440e06f7a4a532b5f775866 (diff) |
network/transgui: Fix duplicate object status error.
Fix "Duplicate object member: status" error
Thanks to Ku33ma
https://github.com/transmission-remote-gui/transgui/pull/1329
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network')
-rw-r--r-- | network/transgui/dup-obj-status.patch | 49 | ||||
-rw-r--r-- | network/transgui/transgui.SlackBuild | 9 |
2 files changed, 56 insertions, 2 deletions
diff --git a/network/transgui/dup-obj-status.patch b/network/transgui/dup-obj-status.patch new file mode 100644 index 0000000000000..04967efd01e04 --- /dev/null +++ b/network/transgui/dup-obj-status.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/network/transgui/transgui.SlackBuild b/network/transgui/transgui.SlackBuild index dcebb22b76594..ca7ad023fc5fc 100644 --- a/network/transgui/transgui.SlackBuild +++ b/network/transgui/transgui.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for transgui -# Copyright 2016-2019 Jeremy Brent Hansen <jebrhansen+SBo -at- gmail.com> +# Copyright 2016-2023 Jeremy Brent Hansen <jebrhansen+SBo -at- gmail.com> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=transgui VERSION=${VERSION:-5.18.0} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -79,6 +79,11 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +# Fix "Duplicate object member: status" error +# Thanks to Ku33ma +# https://github.com/transmission-remote-gui/transgui/pull/1329 +patch -p1 < $CWD/dup-obj-status.patch + # Build transgui lazbuild "transgui.lpi" --lazarusdir=/usr/share/lazarus --widgetset=gtk2 |