From unknown Fri Aug 15 20:50:47 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39814] [PATCH] gnu: anki: Fix mpv audio playback Resent-From: Robert Smith Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 27 Feb 2020 20:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 39814 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 39814@debbugs.gnu.org Cc: Robert Smith X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.158283418828031 (code B ref -1); Thu, 27 Feb 2020 20:10:01 +0000 Received: (at submit) by debbugs.gnu.org; 27 Feb 2020 20:09:48 +0000 Received: from localhost ([127.0.0.1]:60319 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j7PTf-0007I2-Rp for submit@debbugs.gnu.org; Thu, 27 Feb 2020 15:09:48 -0500 Received: from lists.gnu.org ([209.51.188.17]:39828) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j7PTd-0007Hu-1v for submit@debbugs.gnu.org; Thu, 27 Feb 2020 15:09:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54153) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7PTZ-00048f-J2 for guix-patches@gnu.org; Thu, 27 Feb 2020 15:09:44 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j7PTX-0000qH-A0 for guix-patches@gnu.org; Thu, 27 Feb 2020 15:09:41 -0500 Received: from mout01.posteo.de ([185.67.36.65]:40247) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j7PTW-0000pF-NT for guix-patches@gnu.org; Thu, 27 Feb 2020 15:09:39 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 6474F16005E for ; Thu, 27 Feb 2020 21:09:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1582834175; bh=87ckEHLF/l6tc9JCVNEf3InxgmYkPorcaHeoW4C6nHs=; h=From:To:Cc:Subject:Date:From; b=NgbLj5Jx7RJtITdtxXKZqhjZCHaYqD8XPrS0Y6eX1hu/oTAEbA6my2wmExLOaKJxf 1NJFRneEU50iwvzFZUxjQcBNOoLQQc1Tk3CM8SChQ5PV+ckDAdkxwCC6D2LSJghGRW mSlZv69kAWdDlAZUHw5GMpowAgpu8IHTsrPddmegW3UGENU2rCCPHtGVVASltzRv6t iORv04m/BoTIlD4Ns9NbiKB9dfyT/4YqUCi1CAkAoy6xzAW+cPEiFwmXBJSu4eZfTW O2lCEbd59t3/uB2TjA5XLyHHAIsiHXEz1bIFoXf5TfXUbGXZ+eYMi/0Be2D6P79hKc f0lzE5mYmiYQw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 48T3fk4gcgz6tmK; Thu, 27 Feb 2020 21:09:34 +0100 (CET) From: Robert Smith Date: Thu, 27 Feb 2020 21:09:09 +0100 Message-Id: <20200227200909.16365-1-robertsmith@posteo.net> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 185.67.36.65 X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) * gnu/packages/patches/anki-mpv-args.patch: New file. * gnu/packages/education.scm (anki): Adjust accordingly. --- mpv now requires that the input-ipc-server argument be passed with an equals sign and without any spaces. This is a slightly out-of-date version of anki, so presumably mpv used to be more lenient with command line arguments. mpv was also added to the PATH using wrap-program to to ensure anki can find it at runtime. --- gnu/packages/education.scm | 6 ++++- gnu/packages/patches/anki-mpv-args.patch | 30 ++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/anki-mpv-args.patch diff --git a/gnu/packages/education.scm b/gnu/packages/education.scm index 20fc9a3706..d8427f6eab 100644 --- a/gnu/packages/education.scm +++ b/gnu/packages/education.scm @@ -738,7 +738,8 @@ adjust the level of difficulty.") (uri (string-append "https://apps.ankiweb.net/downloads/archive/a= nki-" version "-source.tgz")) (sha256 - (base32 "1gfr51rnllkyzli73p4r51h5ypzfa3m7lic3m3rzpywmqwrxs07k"))= )) + (base32 "1gfr51rnllkyzli73p4r51h5ypzfa3m7lic3m3rzpywmqwrxs07k")) + (patches (search-patches "anki-mpv-args.patch")))) (build-system gnu-build-system) (arguments `(#:make-flags (list (string-append "PREFIX=3D" %output)) @@ -779,6 +780,9 @@ adjust the level of difficulty.") (wrap-program program `("QTWEBENGINEPROCESS_PATH" =3D (,qtwebengineprocess)) + `("PATH" prefix (,(string-append + (assoc-ref inputs "mpv") + "/bin"))) `("PYTHONPATH" =3D ,site-packages))) (find-files bin "."))) #t))))) diff --git a/gnu/packages/patches/anki-mpv-args.patch b/gnu/packages/patc= hes/anki-mpv-args.patch new file mode 100644 index 0000000000..a66632c0e0 --- /dev/null +++ b/gnu/packages/patches/anki-mpv-args.patch @@ -0,0 +1,30 @@ +From 0e2c723f2b920f96937725a12e3db13c14795117 Mon Sep 17 00:00:00 2001 +From: Robert Smith +Date: Thu, 27 Feb 2020 20:07:08 +0100 +Subject: [PATCH] Fix mpv argument formatting + +--- +mpv now requires that the input-ipc-server argument be passed with an +equals sign and without any spaces. This is a slightly out-of-date +version of anki, so presumably mpv used to be more lenient with +command line arguments. +--- + anki/mpv.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/anki/mpv.py b/anki/mpv.py +index f53d9d0..c6e7dd7 100644 +--- a/anki/mpv.py ++++ b/anki/mpv.py +@@ -104,7 +104,7 @@ class MPVBase: + """ + self.argv =3D [self.executable] + self.argv +=3D self.default_argv +- self.argv +=3D ["--input-ipc-server", self._sock_filename] ++ self.argv +=3D ["--input-ipc-server=3D" + self._sock_filename] + if self.window_id is not None: + self.argv +=3D ["--wid", str(self.window_id)] +=20 +--=20 +2.25.0 + --=20 2.25.1 From unknown Fri Aug 15 20:50:47 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39814] [PATCH] gnu: anki: Fix mpv audio playback Resent-From: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 01 Mar 2020 21:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39814 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Robert Smith Cc: 39814@debbugs.gnu.org X-Debbugs-Original-Cc: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.158309757130426 (code B ref -1); Sun, 01 Mar 2020 21:20:01 +0000 Received: (at submit) by debbugs.gnu.org; 1 Mar 2020 21:19:31 +0000 Received: from localhost ([127.0.0.1]:37043 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j8Vzn-0007ug-Ei for submit@debbugs.gnu.org; Sun, 01 Mar 2020 16:19:31 -0500 Received: from lists.gnu.org ([209.51.188.17]:54365) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j8Vzk-0007uT-GY for submit@debbugs.gnu.org; Sun, 01 Mar 2020 16:19:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54363) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8Vzj-0001sh-7i for guix-patches@gnu.org; Sun, 01 Mar 2020 16:19:28 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,RCVD_IN_DNSWL_NONE, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j8Vzf-0004Oy-Lp for guix-patches@gnu.org; Sun, 01 Mar 2020 16:19:27 -0500 Received: from pat.zlotemysli.pl ([37.59.186.212]:56028) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j8Vzf-0004OS-Cg for guix-patches@gnu.org; Sun, 01 Mar 2020 16:19:23 -0500 Received: (qmail 26140 invoked by uid 1009); 1 Mar 2020 22:19:21 +0100 Received: from 188.123.215.55 (kuba@kadziolka.net@188.123.215.55) by pat (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/25737. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.027677 secs); 01 Mar 2020 21:19:21 -0000 Received: from unknown (HELO gravity) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with SMTP; 1 Mar 2020 22:19:21 +0100 Date: Sun, 1 Mar 2020 22:20:08 +0100 From: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= Message-ID: <20200301212008.m25dqyny6pgebzrg@gravity> References: <20200227200909.16365-1-robertsmith@posteo.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="i6dm5zgoqlhzjhvd" Content-Disposition: inline In-Reply-To: <20200227200909.16365-1-robertsmith@posteo.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 37.59.186.212 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --i6dm5zgoqlhzjhvd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Feb 27, 2020 at 09:09:09PM +0100, Robert Smith wrote: > * gnu/packages/patches/anki-mpv-args.patch: New file. > * gnu/packages/education.scm (anki): Adjust accordingly. Please add the new file to gnu/local.mk > @@ -779,6 +780,9 @@ adjust the level of difficulty.") > (wrap-program program > `("QTWEBENGINEPROCESS_PATH" = > (,qtwebengineprocess)) > + `("PATH" prefix (,(string-append > + (assoc-ref inputs "mpv") > + "/bin"))) > `("PYTHONPATH" = ,site-packages))) > (find-files bin "."))) > #t))))) Please mention this in the commit message. > diff --git a/gnu/packages/patches/anki-mpv-args.patch b/gnu/packages/patches/anki-mpv-args.patch > new file mode 100644 > index 0000000000..a66632c0e0 > --- /dev/null > +++ b/gnu/packages/patches/anki-mpv-args.patch > @@ -0,0 +1,30 @@ > +From 0e2c723f2b920f96937725a12e3db13c14795117 Mon Sep 17 00:00:00 2001 > +From: Robert Smith > +Date: Thu, 27 Feb 2020 20:07:08 +0100 > +Subject: [PATCH] Fix mpv argument formatting > + > +--- > +mpv now requires that the input-ipc-server argument be passed with an > +equals sign and without any spaces. This is a slightly out-of-date > +version of anki, so presumably mpv used to be more lenient with > +command line arguments. > +--- > + anki/mpv.py | 2 +- > + 1 file changed, 1 insertion(+), 1 deletion(-) I don't know how I feel about this header for the patch. > +--- a/anki/mpv.py > ++++ b/anki/mpv.py > +@@ -104,7 +104,7 @@ class MPVBase: > + """ > + self.argv = [self.executable] > + self.argv += self.default_argv > +- self.argv += ["--input-ipc-server", self._sock_filename] > ++ self.argv += ["--input-ipc-server=" + self._sock_filename] > + if self.window_id is not None: > + self.argv += ["--wid", str(self.window_id)] It seems that this is not the only place that should be modified, considering the upstream commit that fixes the same issue: https://github.com/ankitects/anki/commit/ccd715013609133c55e83924734efa78abc03326 --i6dm5zgoqlhzjhvd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE5Xa/ss9usT31cTO54xWnWEYTFWQFAl5cJwgACgkQ4xWnWEYT FWSW0BAAwjYywI6/HaeiYylit4TvFZ1dp+m5SQLkPoAasXBrWfCNCyYz3aseZNes sSODRja3NPZWLYn9lG9rlwU/0K/gH6a9u+v3tlcTot8sXrpy2pMmoY3/Xwz+mYSB 5Cz88AfmZsru48YP0EVnPIf1asbjdJEIEqVZc8CXPQBWn/tmdFo0Jz1eJFnkwaQE Z2MSxWs+RV5I0IESlU3qBX/T4V0bMMjUu2GDBMyjvZH9A3wphA77MsKkqBl0fVEZ mfAl7zFO6nqlbKH1QtD6froz6tZ9VDYxp9fdLjs3F3OkDVLwisgwJnZKdqZn3fpz 06/GMtI2KuV11KsO9zbbZ5HC01NQLZcVy5JhpZVDb6VFogZzz9NmX9EHSGA27dlx cYBYKZEwrZaowhF8mNT0JyVVCRJ/4BS2hKdD9oKcB7w1ybkmXQfhvmRmna8VEsBS lKKoU26CdgQ7UZ6xouWWc5HGvE5zT7/e1/YymptpBH7mN643tX7MKwzOt9PrR89+ ww1fnnmgUGDUGQNy+1H6vKWU8ObQoSzgHYBiyrwUw3YwZqQrO0kH1INYsmnny3rm uUOHvUK4S3z8n+uzOoKBNmNYqQGv9BU/nYUFF7tg/SK9YS9OuPvZQzo3Z+dvbO1W Nyf13KekKNrWgyBQbqtQo+Oxz/iyrHMwUttPXbvpWohdAuX/uzY= =fsjw -----END PGP SIGNATURE----- --i6dm5zgoqlhzjhvd-- From unknown Fri Aug 15 20:50:47 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39814] [PATCH v2] gnu: anki: Fix mpv audio playback References: <20200227200909.16365-1-robertsmith@posteo.net> In-Reply-To: <20200227200909.16365-1-robertsmith@posteo.net> Resent-From: Robert Smith Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 06 Mar 2020 16:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39814 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: kuba@kadziolka.net Cc: 39814@debbugs.gnu.org, Robert Smith Received: via spool by 39814-submit@debbugs.gnu.org id=B39814.1583510446724 (code B ref 39814); Fri, 06 Mar 2020 16:01:01 +0000 Received: (at 39814) by debbugs.gnu.org; 6 Mar 2020 16:00:46 +0000 Received: from localhost ([127.0.0.1]:45772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jAFOy-0000BX-VR for submit@debbugs.gnu.org; Fri, 06 Mar 2020 11:00:46 -0500 Received: from mout02.posteo.de ([185.67.36.66]:56861) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jAFOt-0000BD-Qm for 39814@debbugs.gnu.org; Fri, 06 Mar 2020 11:00:39 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 340F9240102 for <39814@debbugs.gnu.org>; Fri, 6 Mar 2020 17:00:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1583510429; bh=liDpYY+JXakk1Nj66HKodP3E67sXcvnaJ++AgI5dHvI=; h=From:To:Cc:Subject:Date:From; b=cRW3DSpf2f57/5NO3OOKe3wCvrWgTAzPQLefHI4nTRyKvXVpUOhet6NkEyxFDxck/ l42Oyab9ErlKUfxC6/GZy0iZXOwCuDUwLnQC4sqSdQIwaG6qlHk9KVb0rIJTv1Jd8Z eRDALe6BcPuDf7eDgSX/NnRwnaJ/cVBxzsgHRXjXXoSQReVxWwm7tuwfftiMcUAalN 4gA6jSfzBwB/MZhPQlaYrCyueoyRz0FTA3vdhryB4AHphAD3dy5F7+S0/tkF1Hm1qd BMnwE6fW+9r3AqNEI/VJxsLkuxfCVlY2Hh6yZSIkDuc4rFDlIl2sCRh5mb352+jZRY RAkas0s3VDmig== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 48Yslc2mvqz9rxV; Fri, 6 Mar 2020 17:00:28 +0100 (CET) From: Robert Smith Date: Fri, 6 Mar 2020 17:00:19 +0100 Message-Id: <20200306160019.13440-1-robertsmith@posteo.net> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/patches/anki-mpv-args.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/education.scm (anki): Adjust accordingly, wrap anki's PATH to include mpv executable. --- Thanks for the feedback Jakub, I've rewritten the patch based on the upstream commit and modified the commit message. --- gnu/local.mk | 1 + gnu/packages/education.scm | 6 +++- gnu/packages/patches/anki-mpv-args.patch | 42 ++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/anki-mpv-args.patch diff --git a/gnu/local.mk b/gnu/local.mk index 857345cfad..bd4796d41d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -716,6 +716,7 @@ dist_patch_DATA = \ %D%/packages/patches/akonadi-timestamps.patch \ %D%/packages/patches/allegro-mesa-18.2.5-and-later.patch \ %D%/packages/patches/amule-crypto-6.patch \ + %D%/packages/patches/anki-mpv-args.patch \ %D%/packages/patches/antiword-CVE-2014-8123.patch \ %D%/packages/patches/antlr3-3_1-fix-java8-compilation.patch \ %D%/packages/patches/antlr3-3_3-fix-java8-compilation.patch \ diff --git a/gnu/packages/education.scm b/gnu/packages/education.scm index 20fc9a3706..d8427f6eab 100644 --- a/gnu/packages/education.scm +++ b/gnu/packages/education.scm @@ -738,7 +738,8 @@ adjust the level of difficulty.") (uri (string-append "https://apps.ankiweb.net/downloads/archive/anki-" version "-source.tgz")) (sha256 - (base32 "1gfr51rnllkyzli73p4r51h5ypzfa3m7lic3m3rzpywmqwrxs07k")))) + (base32 "1gfr51rnllkyzli73p4r51h5ypzfa3m7lic3m3rzpywmqwrxs07k")) + (patches (search-patches "anki-mpv-args.patch")))) (build-system gnu-build-system) (arguments `(#:make-flags (list (string-append "PREFIX=" %output)) @@ -779,6 +780,9 @@ adjust the level of difficulty.") (wrap-program program `("QTWEBENGINEPROCESS_PATH" = (,qtwebengineprocess)) + `("PATH" prefix (,(string-append + (assoc-ref inputs "mpv") + "/bin"))) `("PYTHONPATH" = ,site-packages))) (find-files bin "."))) #t))))) diff --git a/gnu/packages/patches/anki-mpv-args.patch b/gnu/packages/patches/anki-mpv-args.patch new file mode 100644 index 0000000000..21b9bd0aba --- /dev/null +++ b/gnu/packages/patches/anki-mpv-args.patch @@ -0,0 +1,42 @@ +Modified from upstream commit: +https://github.com/ankitects/anki/commit/ccd715013609133c55e83924734efa78abc03326 +Fixes mpv argument syntax (support for old syntax removed in mpv 0.31): +https://anki.tenderapp.com/discussions/ankidesktop/38186-mpvprocesserror-unable-to-start-process +Necessary because we are currently unable to upgrade anki to the +latest version in guix (NPM dependencies currently unpackaged). +--- + anki/mpv.py | 4 ++-- + anki/sound.py | 1 - + 2 files changed, 2 insertions(+), 3 deletions(-) + +diff --git a/anki/mpv.py b/anki/mpv.py +index f53d9d0..563fddc 100644 +--- a/anki/mpv.py ++++ b/anki/mpv.py +@@ -104,9 +104,9 @@ class MPVBase: + """ + self.argv = [self.executable] + self.argv += self.default_argv +- self.argv += ["--input-ipc-server", self._sock_filename] ++ self.argv += ["--input-ipc-server="+self._sock_filename] + if self.window_id is not None: +- self.argv += ["--wid", str(self.window_id)] ++ self.argv += ["--wid="+str(self.window_id)] + + def _start_process(self): + """Start the mpv process. +diff --git a/anki/sound.py b/anki/sound.py +index aa3431b..a5fce44 100644 +--- a/anki/sound.py ++++ b/anki/sound.py +@@ -124,7 +124,6 @@ class MpvManager(MPV): + def setMpvConfigBase(base): + mpvConfPath = os.path.join(base, "mpv.conf") + MpvManager.default_argv += [ +- "--no-config", + "--include="+mpvConfPath, + ] + +-- +2.25.1 + -- 2.25.1 From unknown Fri Aug 15 20:50:47 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Robert Smith Subject: bug#39814: closed (Re: [PATCH v2] gnu: anki: Fix mpv audio playback) Message-ID: References: <20200307163039.nprj5l6cr3ldk2xv@gravity> <20200227200909.16365-1-robertsmith@posteo.net> X-Gnu-PR-Message: they-closed 39814 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 39814@debbugs.gnu.org Date: Sat, 07 Mar 2020 16:30:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1583598602-3226-1" This is a multi-part message in MIME format... ------------=_1583598602-3226-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #39814: [PATCH] gnu: anki: Fix mpv audio playback which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 39814@debbugs.gnu.org. --=20 39814: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D39814 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1583598602-3226-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 39814-done) by debbugs.gnu.org; 7 Mar 2020 16:29:54 +0000 Received: from localhost ([127.0.0.1]:47440 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jAcKo-0000pP-0c for submit@debbugs.gnu.org; Sat, 07 Mar 2020 11:29:54 -0500 Received: from pat.zlotemysli.pl ([37.59.186.212]:40042) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jAcKk-0000pE-7Y for 39814-done@debbugs.gnu.org; Sat, 07 Mar 2020 11:29:52 -0500 Received: (qmail 1425 invoked by uid 1009); 7 Mar 2020 17:29:47 +0100 Received: from 188.123.215.55 (kuba@kadziolka.net@188.123.215.55) by pat (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/25743. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.022691 secs); 07 Mar 2020 16:29:47 -0000 Received: from unknown (HELO gravity) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with SMTP; 7 Mar 2020 17:29:47 +0100 Date: Sat, 7 Mar 2020 17:30:39 +0100 From: Jakub =?utf-8?B?S8SFZHppb8WCa2E=?= To: Robert Smith Subject: Re: [PATCH v2] gnu: anki: Fix mpv audio playback Message-ID: <20200307163039.nprj5l6cr3ldk2xv@gravity> References: <20200306160019.13440-1-robertsmith@posteo.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="uqumojfmr3txjfi2" Content-Disposition: inline In-Reply-To: <20200306160019.13440-1-robertsmith@posteo.net> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39814-done Cc: 39814-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --uqumojfmr3txjfi2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Mar 06, 2020 at 05:00:19PM +0100, Robert Smith wrote: > * gnu/packages/patches/anki-mpv-args.patch: New file. > * gnu/local.mk (dist_patch_DATA): Adjust accordingly. > * gnu/packages/education.scm (anki): Adjust accordingly, wrap anki's > PATH to include mpv executable. > --- > Thanks for the feedback Jakub, I've rewritten the patch based on the > upstream commit and modified the commit message. Thanks! The revised patch LGTM, and it indeed helps with audio playback in anki, so I've pushed it to master as 880a316591650a06c18aeaef1703800784d2c196 --uqumojfmr3txjfi2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE5Xa/ss9usT31cTO54xWnWEYTFWQFAl5jzC8ACgkQ4xWnWEYT FWSf1xAAwcifVgkYuIXZUIUUI7KFDDqYXtyJjW47LIr9A1nJSudX8bksd+QHfKo6 ITItwyxkyI9jlyBOIQmAur/4e4CCFT+aufOkDsLeHyOMvWLlnZPVEvduhDn/r9Ud 681LR+ZtX1nEscA8kNDiiYP8rlOCO9x4Lj/qHzE9NWExDMV/JDhIGWUj7xrC2vKU HIwuDZmuL2enbQnymfH3c3CGyNaQQElHw/hxG8v33WT8AKevcwaVbAfUTEiHpqnP TqvKVP6qSLx1R433vlnqjy9H9CgngVJwtAA897goDCRXN3FucxeITybC7uJGiV0f At27A/BjIbJ1D2iYVD4XTj+3uvinfuhFfa+NBcmtrAGVKqZ0aOo49qNLpqLahdba sqbtW47tIG1fCMoT5qHx4iM+YLbOlM6UPAEOa9kgeqgkDXwgGUbrWXWuSE/efTm/ /qz4en9L822CaFHW/bXRgDDCxuD0bVSq71+PFQz/Kh8VR/zAk27DQTAs9U1JaEUE q6WeB7CpwsPt5jbWxqEWQ9nCl/IJ23/uufRMeEBrSvm7HIrrukgwudiERcFNID6o 3d9roLJSk34/ZhmaewvT/hp32fztw2Km9/zi5pRcn2NQTKec6loX2bJxluRjg48p OPJhG4w6Ifl9X7AndWHZjHgsc9ST9h5xPus09SOnXvgtQJEjWlQ= =tosf -----END PGP SIGNATURE----- --uqumojfmr3txjfi2-- ------------=_1583598602-3226-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 27 Feb 2020 20:09:48 +0000 Received: from localhost ([127.0.0.1]:60319 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j7PTf-0007I2-Rp for submit@debbugs.gnu.org; Thu, 27 Feb 2020 15:09:48 -0500 Received: from lists.gnu.org ([209.51.188.17]:39828) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j7PTd-0007Hu-1v for submit@debbugs.gnu.org; Thu, 27 Feb 2020 15:09:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54153) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7PTZ-00048f-J2 for guix-patches@gnu.org; Thu, 27 Feb 2020 15:09:44 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j7PTX-0000qH-A0 for guix-patches@gnu.org; Thu, 27 Feb 2020 15:09:41 -0500 Received: from mout01.posteo.de ([185.67.36.65]:40247) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j7PTW-0000pF-NT for guix-patches@gnu.org; Thu, 27 Feb 2020 15:09:39 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 6474F16005E for ; Thu, 27 Feb 2020 21:09:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1582834175; bh=87ckEHLF/l6tc9JCVNEf3InxgmYkPorcaHeoW4C6nHs=; h=From:To:Cc:Subject:Date:From; b=NgbLj5Jx7RJtITdtxXKZqhjZCHaYqD8XPrS0Y6eX1hu/oTAEbA6my2wmExLOaKJxf 1NJFRneEU50iwvzFZUxjQcBNOoLQQc1Tk3CM8SChQ5PV+ckDAdkxwCC6D2LSJghGRW mSlZv69kAWdDlAZUHw5GMpowAgpu8IHTsrPddmegW3UGENU2rCCPHtGVVASltzRv6t iORv04m/BoTIlD4Ns9NbiKB9dfyT/4YqUCi1CAkAoy6xzAW+cPEiFwmXBJSu4eZfTW O2lCEbd59t3/uB2TjA5XLyHHAIsiHXEz1bIFoXf5TfXUbGXZ+eYMi/0Be2D6P79hKc f0lzE5mYmiYQw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 48T3fk4gcgz6tmK; Thu, 27 Feb 2020 21:09:34 +0100 (CET) From: Robert Smith To: guix-patches@gnu.org Subject: [PATCH] gnu: anki: Fix mpv audio playback Date: Thu, 27 Feb 2020 21:09:09 +0100 Message-Id: <20200227200909.16365-1-robertsmith@posteo.net> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 185.67.36.65 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: submit Cc: Robert Smith X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) * gnu/packages/patches/anki-mpv-args.patch: New file. * gnu/packages/education.scm (anki): Adjust accordingly. --- mpv now requires that the input-ipc-server argument be passed with an equals sign and without any spaces. This is a slightly out-of-date version of anki, so presumably mpv used to be more lenient with command line arguments. mpv was also added to the PATH using wrap-program to to ensure anki can find it at runtime. --- gnu/packages/education.scm | 6 ++++- gnu/packages/patches/anki-mpv-args.patch | 30 ++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/anki-mpv-args.patch diff --git a/gnu/packages/education.scm b/gnu/packages/education.scm index 20fc9a3706..d8427f6eab 100644 --- a/gnu/packages/education.scm +++ b/gnu/packages/education.scm @@ -738,7 +738,8 @@ adjust the level of difficulty.") (uri (string-append "https://apps.ankiweb.net/downloads/archive/a= nki-" version "-source.tgz")) (sha256 - (base32 "1gfr51rnllkyzli73p4r51h5ypzfa3m7lic3m3rzpywmqwrxs07k"))= )) + (base32 "1gfr51rnllkyzli73p4r51h5ypzfa3m7lic3m3rzpywmqwrxs07k")) + (patches (search-patches "anki-mpv-args.patch")))) (build-system gnu-build-system) (arguments `(#:make-flags (list (string-append "PREFIX=3D" %output)) @@ -779,6 +780,9 @@ adjust the level of difficulty.") (wrap-program program `("QTWEBENGINEPROCESS_PATH" =3D (,qtwebengineprocess)) + `("PATH" prefix (,(string-append + (assoc-ref inputs "mpv") + "/bin"))) `("PYTHONPATH" =3D ,site-packages))) (find-files bin "."))) #t))))) diff --git a/gnu/packages/patches/anki-mpv-args.patch b/gnu/packages/patc= hes/anki-mpv-args.patch new file mode 100644 index 0000000000..a66632c0e0 --- /dev/null +++ b/gnu/packages/patches/anki-mpv-args.patch @@ -0,0 +1,30 @@ +From 0e2c723f2b920f96937725a12e3db13c14795117 Mon Sep 17 00:00:00 2001 +From: Robert Smith +Date: Thu, 27 Feb 2020 20:07:08 +0100 +Subject: [PATCH] Fix mpv argument formatting + +--- +mpv now requires that the input-ipc-server argument be passed with an +equals sign and without any spaces. This is a slightly out-of-date +version of anki, so presumably mpv used to be more lenient with +command line arguments. +--- + anki/mpv.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/anki/mpv.py b/anki/mpv.py +index f53d9d0..c6e7dd7 100644 +--- a/anki/mpv.py ++++ b/anki/mpv.py +@@ -104,7 +104,7 @@ class MPVBase: + """ + self.argv =3D [self.executable] + self.argv +=3D self.default_argv +- self.argv +=3D ["--input-ipc-server", self._sock_filename] ++ self.argv +=3D ["--input-ipc-server=3D" + self._sock_filename] + if self.window_id is not None: + self.argv +=3D ["--wid", str(self.window_id)] +=20 +--=20 +2.25.0 + --=20 2.25.1 ------------=_1583598602-3226-1--