unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#67120] [PATCH 0/4] Add jellyfin-mpv-player and deps
@ 2023-11-12  4:13 Ian Eure
  2023-11-12  4:16 ` [bug#67120] [PATCH 1/4] gnu: Add python-mpv-jsonipc Ian Eure
                   ` (13 more replies)
  0 siblings, 14 replies; 42+ messages in thread
From: Ian Eure @ 2023-11-12  4:13 UTC (permalink / raw)
  To: 67120; +Cc: Ian Eure

This patchset adds jellyfin-mpv-shim and a handful of Python dependencies it needs.

Ian Eure (4):
  gnu: Add python-mpv-jsonipc.
  gnu: Add python-jellyfin-apiclient.
  gnu: Add python-pystray.
  gnu: Add jellyfin-mpv-shim.

 gnu/packages/python-xyz.scm | 61 +++++++++++++++++++++++++++++++++++++
 gnu/packages/video.scm      | 41 +++++++++++++++++++++++++
 2 files changed, 102 insertions(+)


base-commit: af6105afc67a15a491a0a4fd18a28c9f801a0b94
-- 
2.41.0





^ permalink raw reply	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH 1/4] gnu: Add python-mpv-jsonipc.
  2023-11-12  4:13 [bug#67120] [PATCH 0/4] Add jellyfin-mpv-player and deps Ian Eure
@ 2023-11-12  4:16 ` Ian Eure
  2023-11-12  4:16 ` [bug#67120] [PATCH 2/4] gnu: Add python-jellyfin-apiclient Ian Eure
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 42+ messages in thread
From: Ian Eure @ 2023-11-12  4:16 UTC (permalink / raw)
  To: 67120; +Cc: Ian Eure, Lars-Dominik Braun, Marius Bakke, Munyoki Kilyungi,
	jgart

* gnu/packages/python-xyz.scm (python-mpv-jsonipc): New variable.

Change-Id: I7aa01f25d873faa2a7dd8aa6ea54a1a3ae91006f
---
 gnu/packages/python-xyz.scm | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index e521c1580d..6669a6ab73 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -145,6 +145,7 @@
 ;;; Copyright © c4droid <c4droid@foxmail.com>
 ;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2023 Attila Lendvai <attila@lendvai.name>
+;;; Copyright © 2023 Ian Eure <ian@retrospec.tv>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -24652,6 +24653,22 @@ (define-public online-judge-tools
 submitting it.")
     (license license:expat)))
 
+(define-public python-mpv-jsonipc
+  (package
+    (name "python-mpv-jsonipc")
+    (version "1.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "python-mpv-jsonipc" version))
+       (sha256
+        (base32 "0ymdwrx544a6gn6wm9dixpgzbfrbpxvcj5ys7m41cgb4lvpvx691"))))
+    (build-system pyproject-build-system)
+    (home-page "https://github.com/iwalton3/python-mpv-jsonipc")
+    (synopsis "Python API to MPV using JSON IPC")
+    (description "Python API to MPV using JSON IPC")
+    (license license:asl2.0)))
+
 (define-public python-parso
   (package
     (name "python-parso")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH 2/4] gnu: Add python-jellyfin-apiclient.
  2023-11-12  4:13 [bug#67120] [PATCH 0/4] Add jellyfin-mpv-player and deps Ian Eure
  2023-11-12  4:16 ` [bug#67120] [PATCH 1/4] gnu: Add python-mpv-jsonipc Ian Eure
@ 2023-11-12  4:16 ` Ian Eure
  2023-11-12  4:16 ` [bug#67120] [PATCH 3/4] gnu: Add python-pystray Ian Eure
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 42+ messages in thread
From: Ian Eure @ 2023-11-12  4:16 UTC (permalink / raw)
  To: 67120; +Cc: Ian Eure, Lars-Dominik Braun, Marius Bakke, Munyoki Kilyungi,
	jgart

* gnu/packages/python-xyz.scm (python-jellyfin-apiclient): New variable.

Change-Id: I9c2401a951fe6b980c449f7707c7275b5585ae10
---
 gnu/packages/python-xyz.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 6669a6ab73..9beebc5358 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -24669,6 +24669,24 @@ (define-public python-mpv-jsonipc
     (description "Python API to MPV using JSON IPC")
     (license license:asl2.0)))
 
+(define-public python-jellyfin-apiclient
+  (package
+    (name "python-jellyfin-apiclient")
+    (version "1.9.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "jellyfin-apiclient-python" version))
+       (sha256
+        (base32 "0r67cp9nizvn3cbslgi30zpd3mw4a6zal0ygik3jv5lni1xdkk5w"))))
+    (build-system pyproject-build-system)
+    (propagated-inputs (list python-certifi python-requests python-urllib3
+                             python-websocket-client))
+    (home-page "https://github.com/iwalton3/jellyfin-apiclient-python")
+    (synopsis "Python API client for Jellyfin")
+    (description "Python API client for Jellyfin")
+    (license license:gpl3)))
+
 (define-public python-parso
   (package
     (name "python-parso")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH 3/4] gnu: Add python-pystray.
  2023-11-12  4:13 [bug#67120] [PATCH 0/4] Add jellyfin-mpv-player and deps Ian Eure
  2023-11-12  4:16 ` [bug#67120] [PATCH 1/4] gnu: Add python-mpv-jsonipc Ian Eure
  2023-11-12  4:16 ` [bug#67120] [PATCH 2/4] gnu: Add python-jellyfin-apiclient Ian Eure
@ 2023-11-12  4:16 ` Ian Eure
  2023-11-12  4:16 ` [bug#67120] [PATCH 4/4] gnu: Add jellyfin-mpv-shim Ian Eure
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 42+ messages in thread
From: Ian Eure @ 2023-11-12  4:16 UTC (permalink / raw)
  To: 67120; +Cc: Ian Eure, Lars-Dominik Braun, Marius Bakke, Munyoki Kilyungi,
	jgart

* gnu/packages/python-xyz.scm (python-pystray): New variable.

Change-Id: Ia6ef6388b76db59640914b80ee756d98f5e3e5eb
---
 gnu/packages/python-xyz.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 9beebc5358..8c43be75c3 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -30439,6 +30439,32 @@ (define-public python-qdarkstyle
 Qt applications.")
     (license license:expat)))
 
+(define-public python-pystray
+  (package
+    (name "python-pystray")
+    (version "0.19.5")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/moses-palmer/pystray.git")
+             (commit "1907f8681d6d421517c63d94f425f9cdd74d0034")))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1vj6c8s7rbc7xc4bi5brx5629ls1ri9prcw9290v85hagilmp609"))))
+    (build-system python-build-system)
+    (arguments
+     (list
+      #:phases #~(modify-phases %standard-phases
+                   (delete 'check)
+                   (delete 'sanity-check))))
+    (native-inputs (list python-sphinx xorg-server-for-tests))
+    (propagated-inputs (list python-pillow python-six python-xlib))
+    (home-page "https://github.com/moses-palmer/pystray")
+    (synopsis "Create a system tray icon")
+    (description "This library allows you to create a system tray icon.")
+    (license license:lgpl3)))
+
 (define-public python-bitstring
   (package
     (name "python-bitstring")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH 4/4] gnu: Add jellyfin-mpv-shim.
  2023-11-12  4:13 [bug#67120] [PATCH 0/4] Add jellyfin-mpv-player and deps Ian Eure
                   ` (2 preceding siblings ...)
  2023-11-12  4:16 ` [bug#67120] [PATCH 3/4] gnu: Add python-pystray Ian Eure
@ 2023-11-12  4:16 ` Ian Eure
  2023-11-12 17:23 ` [bug#67120] [PATCH v2 1/4] gnu: Add python-mpv-jsonipc Ian Eure
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 42+ messages in thread
From: Ian Eure @ 2023-11-12  4:16 UTC (permalink / raw)
  To: 67120; +Cc: Ian Eure

* gnu/packages/video.scm (jellyfin-mpv-shim): New variable.

Change-Id: I7c4aa48c96ab09b427d6f80f290f95f671ce41fd
---
 gnu/packages/video.scm | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 68581301a2..66468e3dba 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -66,6 +66,7 @@
 ;;; Copyright © 2023 Ott Joon <oj@vern.cc>
 ;;; Copyright © 2023 Dominik Delgado Steuter <dds@disroot.org>
 ;;; Copyright © 2023 Saku Laesvuori <saku@laesvuori.fi>
+;;; Copyright © 2023 Ian Eure <ian@retrospec.tv>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2406,6 +2407,46 @@ (define-public smplayer
 the last played position, etc.")
     (license license:gpl2+)))
 
+(define-public jellyfin-mpv-shim
+  (let ((desktop-base "jellyfin_mpv_shim/integration/")
+        (package-id "com.github.iwalton3.jellyfin-mpv-shim"))
+  (package
+    (name "python-jellyfin-mpv-shim")
+    (version "2.6.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "jellyfin-mpv-shim" version))
+       (sha256
+        (base32 "1cy2sfv84k5nw8bqy4aa7v0hdawp7gk5s7wq850xizqk0sz7cipp"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:tests? #f ;Disabled because they seem to boot the UI
+      #:phases #~(modify-phases %standard-phases
+                   (delete 'sanity-check) ;This also seems to boot the UI
+                   (add-after 'install 'install-desktop-file
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let* ((out (assoc-ref outputs "out"))
+                              (apps (string-append out "/share/applications")))
+                         (install-file
+                          (string-append desktop-base package-id ".appdata.xml")
+                          apps)
+                         (install-file
+                          (string-append desktop-base package-id ".desktop")
+                          apps) #t))))))
+    (native-inputs (list xorg-server-for-tests))
+    (propagated-inputs (list `(,python "tk")
+                             python-jellyfin-apiclient
+                             python-mpv
+                             python-mpv-jsonipc
+                             python-pystray
+                             python-requests))
+    (home-page "https://github.com/jellyfin/jellyfin-mpv-shim")
+    (synopsis "Cast media from Jellyfin Mobile and Web apps to MPV")
+    (description "Cast media from Jellyfin Mobile and Web apps to MPV.")
+    (license license:gpl2))))
+
 (define-public gallery-dl
   (package
     (name "gallery-dl")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH v2 1/4] gnu: Add python-mpv-jsonipc.
  2023-11-12  4:13 [bug#67120] [PATCH 0/4] Add jellyfin-mpv-player and deps Ian Eure
                   ` (3 preceding siblings ...)
  2023-11-12  4:16 ` [bug#67120] [PATCH 4/4] gnu: Add jellyfin-mpv-shim Ian Eure
@ 2023-11-12 17:23 ` Ian Eure
  2023-11-12 17:23   ` [bug#67120] [PATCH v2 2/4] gnu: Add python-jellyfin-apiclient Ian Eure
                     ` (2 more replies)
  2023-11-30  1:54 ` [bug#67120] [PATCH v2 0/4] Add jellyfin-mpv-shim and deps Ian Eure
                   ` (8 subsequent siblings)
  13 siblings, 3 replies; 42+ messages in thread
From: Ian Eure @ 2023-11-12 17:23 UTC (permalink / raw)
  To: 67120; +Cc: Ian Eure, Lars-Dominik Braun, Marius Bakke, Munyoki Kilyungi,
	jgart

* gnu/packages/python-xyz.scm (python-mpv-jsonipc): New variable.

Change-Id: I7aa01f25d873faa2a7dd8aa6ea54a1a3ae91006f
---
 gnu/packages/python-xyz.scm | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index e521c1580d..6669a6ab73 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -145,6 +145,7 @@
 ;;; Copyright © c4droid <c4droid@foxmail.com>
 ;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2023 Attila Lendvai <attila@lendvai.name>
+;;; Copyright © 2023 Ian Eure <ian@retrospec.tv>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -24652,6 +24653,22 @@ (define-public online-judge-tools
 submitting it.")
     (license license:expat)))
 
+(define-public python-mpv-jsonipc
+  (package
+    (name "python-mpv-jsonipc")
+    (version "1.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "python-mpv-jsonipc" version))
+       (sha256
+        (base32 "0ymdwrx544a6gn6wm9dixpgzbfrbpxvcj5ys7m41cgb4lvpvx691"))))
+    (build-system pyproject-build-system)
+    (home-page "https://github.com/iwalton3/python-mpv-jsonipc")
+    (synopsis "Python API to MPV using JSON IPC")
+    (description "Python API to MPV using JSON IPC")
+    (license license:asl2.0)))
+
 (define-public python-parso
   (package
     (name "python-parso")

base-commit: af6105afc67a15a491a0a4fd18a28c9f801a0b94
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH v2 2/4] gnu: Add python-jellyfin-apiclient.
  2023-11-12 17:23 ` [bug#67120] [PATCH v2 1/4] gnu: Add python-mpv-jsonipc Ian Eure
@ 2023-11-12 17:23   ` Ian Eure
  2023-11-12 17:23   ` [bug#67120] [PATCH v2 3/4] gnu: Add python-pystray Ian Eure
  2023-11-12 17:23   ` [bug#67120] [PATCH v2 4/4] gnu: Add jellyfin-mpv-shim Ian Eure
  2 siblings, 0 replies; 42+ messages in thread
From: Ian Eure @ 2023-11-12 17:23 UTC (permalink / raw)
  To: 67120; +Cc: Ian Eure, Lars-Dominik Braun, Marius Bakke, Munyoki Kilyungi,
	jgart

* gnu/packages/python-xyz.scm (python-jellyfin-apiclient): New variable.

Change-Id: I9c2401a951fe6b980c449f7707c7275b5585ae10
---
 gnu/packages/python-xyz.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 6669a6ab73..9beebc5358 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -24669,6 +24669,24 @@ (define-public python-mpv-jsonipc
     (description "Python API to MPV using JSON IPC")
     (license license:asl2.0)))
 
+(define-public python-jellyfin-apiclient
+  (package
+    (name "python-jellyfin-apiclient")
+    (version "1.9.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "jellyfin-apiclient-python" version))
+       (sha256
+        (base32 "0r67cp9nizvn3cbslgi30zpd3mw4a6zal0ygik3jv5lni1xdkk5w"))))
+    (build-system pyproject-build-system)
+    (propagated-inputs (list python-certifi python-requests python-urllib3
+                             python-websocket-client))
+    (home-page "https://github.com/iwalton3/jellyfin-apiclient-python")
+    (synopsis "Python API client for Jellyfin")
+    (description "Python API client for Jellyfin")
+    (license license:gpl3)))
+
 (define-public python-parso
   (package
     (name "python-parso")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH v2 3/4] gnu: Add python-pystray.
  2023-11-12 17:23 ` [bug#67120] [PATCH v2 1/4] gnu: Add python-mpv-jsonipc Ian Eure
  2023-11-12 17:23   ` [bug#67120] [PATCH v2 2/4] gnu: Add python-jellyfin-apiclient Ian Eure
@ 2023-11-12 17:23   ` Ian Eure
  2023-11-12 17:23   ` [bug#67120] [PATCH v2 4/4] gnu: Add jellyfin-mpv-shim Ian Eure
  2 siblings, 0 replies; 42+ messages in thread
From: Ian Eure @ 2023-11-12 17:23 UTC (permalink / raw)
  To: 67120; +Cc: Ian Eure, Lars-Dominik Braun, Marius Bakke, Munyoki Kilyungi,
	jgart

* gnu/packages/python-xyz.scm (python-pystray): New variable.

Change-Id: Ia6ef6388b76db59640914b80ee756d98f5e3e5eb
---
 gnu/packages/python-xyz.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 9beebc5358..8c43be75c3 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -30439,6 +30439,32 @@ (define-public python-qdarkstyle
 Qt applications.")
     (license license:expat)))
 
+(define-public python-pystray
+  (package
+    (name "python-pystray")
+    (version "0.19.5")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/moses-palmer/pystray.git")
+             (commit "1907f8681d6d421517c63d94f425f9cdd74d0034")))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1vj6c8s7rbc7xc4bi5brx5629ls1ri9prcw9290v85hagilmp609"))))
+    (build-system python-build-system)
+    (arguments
+     (list
+      #:phases #~(modify-phases %standard-phases
+                   (delete 'check)
+                   (delete 'sanity-check))))
+    (native-inputs (list python-sphinx xorg-server-for-tests))
+    (propagated-inputs (list python-pillow python-six python-xlib))
+    (home-page "https://github.com/moses-palmer/pystray")
+    (synopsis "Create a system tray icon")
+    (description "This library allows you to create a system tray icon.")
+    (license license:lgpl3)))
+
 (define-public python-bitstring
   (package
     (name "python-bitstring")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH v2 4/4] gnu: Add jellyfin-mpv-shim.
  2023-11-12 17:23 ` [bug#67120] [PATCH v2 1/4] gnu: Add python-mpv-jsonipc Ian Eure
  2023-11-12 17:23   ` [bug#67120] [PATCH v2 2/4] gnu: Add python-jellyfin-apiclient Ian Eure
  2023-11-12 17:23   ` [bug#67120] [PATCH v2 3/4] gnu: Add python-pystray Ian Eure
@ 2023-11-12 17:23   ` Ian Eure
  2 siblings, 0 replies; 42+ messages in thread
From: Ian Eure @ 2023-11-12 17:23 UTC (permalink / raw)
  To: 67120; +Cc: Ian Eure

* gnu/packages/video.scm (jellyfin-mpv-shim): New variable.

Change-Id: I7c4aa48c96ab09b427d6f80f290f95f671ce41fd
---
 gnu/packages/video.scm | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 68581301a2..66468e3dba 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -66,6 +66,7 @@
 ;;; Copyright © 2023 Ott Joon <oj@vern.cc>
 ;;; Copyright © 2023 Dominik Delgado Steuter <dds@disroot.org>
 ;;; Copyright © 2023 Saku Laesvuori <saku@laesvuori.fi>
+;;; Copyright © 2023 Ian Eure <ian@retrospec.tv>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2406,6 +2407,46 @@ (define-public smplayer
 the last played position, etc.")
     (license license:gpl2+)))
 
+(define-public jellyfin-mpv-shim
+  (let ((desktop-base "jellyfin_mpv_shim/integration/")
+        (package-id "com.github.iwalton3.jellyfin-mpv-shim"))
+  (package
+    (name "python-jellyfin-mpv-shim")
+    (version "2.6.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "jellyfin-mpv-shim" version))
+       (sha256
+        (base32 "1cy2sfv84k5nw8bqy4aa7v0hdawp7gk5s7wq850xizqk0sz7cipp"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:tests? #f ;Disabled because they seem to boot the UI
+      #:phases #~(modify-phases %standard-phases
+                   (delete 'sanity-check) ;This also seems to boot the UI
+                   (add-after 'install 'install-desktop-file
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let* ((out (assoc-ref outputs "out"))
+                              (apps (string-append out "/share/applications")))
+                         (install-file
+                          (string-append desktop-base package-id ".appdata.xml")
+                          apps)
+                         (install-file
+                          (string-append desktop-base package-id ".desktop")
+                          apps) #t))))))
+    (native-inputs (list xorg-server-for-tests))
+    (propagated-inputs (list `(,python "tk")
+                             python-jellyfin-apiclient
+                             python-mpv
+                             python-mpv-jsonipc
+                             python-pystray
+                             python-requests))
+    (home-page "https://github.com/jellyfin/jellyfin-mpv-shim")
+    (synopsis "Cast media from Jellyfin Mobile and Web apps to MPV")
+    (description "Cast media from Jellyfin Mobile and Web apps to MPV.")
+    (license license:gpl2))))
+
 (define-public gallery-dl
   (package
     (name "gallery-dl")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH v2 0/4] Add jellyfin-mpv-shim and deps
  2023-11-12  4:13 [bug#67120] [PATCH 0/4] Add jellyfin-mpv-player and deps Ian Eure
                   ` (4 preceding siblings ...)
  2023-11-12 17:23 ` [bug#67120] [PATCH v2 1/4] gnu: Add python-mpv-jsonipc Ian Eure
@ 2023-11-30  1:54 ` Ian Eure
  2023-11-30  1:54   ` [bug#67120] [PATCH v2 1/4] gnu: Add python-mpv-jsonipc Ian Eure
                     ` (3 more replies)
  2024-02-17 17:20 ` [bug#67120] [PATCH v3 0/4] Add jellyfin-mpv-shim and deps Ian Eure
                   ` (7 subsequent siblings)
  13 siblings, 4 replies; 42+ messages in thread
From: Ian Eure @ 2023-11-30  1:54 UTC (permalink / raw)
  To: 67120; +Cc: Ian Eure

Changes made:

 - Rebased and addressed conflicts.
 - Fixed a build failure.
 - Renamed from python-jellyfin-mpv-shim to jellyfin-mpv-shim.  I think the python- prefix is only needed for stuff like libraries, an end-uesr application like this shouldn't need the name of the programming language it's written in to be in the package name.

retitle 67120 [PATCH 0/4] Add jellyfin-mpv-shim and deps

Ian Eure (4):
  gnu: Add python-mpv-jsonipc.
  gnu: Add python-jellyfin-apiclient.
  gnu: Add python-pystray.
  gnu: Add jellyfin-mpv-shim.

 gnu/packages/python-xyz.scm | 61 +++++++++++++++++++++++++++++++++++++
 gnu/packages/video.scm      | 41 +++++++++++++++++++++++++
 2 files changed, 102 insertions(+)


base-commit: bdbb9dc27a590b08651d058f06a42caa26e04abb
-- 
2.41.0





^ permalink raw reply	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH v2 1/4] gnu: Add python-mpv-jsonipc.
  2023-11-30  1:54 ` [bug#67120] [PATCH v2 0/4] Add jellyfin-mpv-shim and deps Ian Eure
@ 2023-11-30  1:54   ` Ian Eure
  2023-11-30  1:54   ` [bug#67120] [PATCH v2 2/4] gnu: Add python-jellyfin-apiclient Ian Eure
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 42+ messages in thread
From: Ian Eure @ 2023-11-30  1:54 UTC (permalink / raw)
  To: 67120; +Cc: Ian Eure, Lars-Dominik Braun, Marius Bakke, Munyoki Kilyungi,
	jgart

* gnu/packages/python-xyz.scm (python-mpv-jsonipc): New variable.

Change-Id: I7aa01f25d873faa2a7dd8aa6ea54a1a3ae91006f
---
 gnu/packages/python-xyz.scm | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 746ecccc5a..e1e27ea76b 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -146,6 +146,7 @@
 ;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2023 Attila Lendvai <attila@lendvai.name>
 ;;; Copyright © 2023 Troy Figiel <troy@troyfigiel.com>
+;;; Copyright © 2023 Ian Eure <ian@retrospec.tv>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -24687,6 +24688,22 @@ (define-public online-judge-tools
 submitting it.")
     (license license:expat)))
 
+(define-public python-mpv-jsonipc
+  (package
+    (name "python-mpv-jsonipc")
+    (version "1.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "python-mpv-jsonipc" version))
+       (sha256
+        (base32 "0ymdwrx544a6gn6wm9dixpgzbfrbpxvcj5ys7m41cgb4lvpvx691"))))
+    (build-system pyproject-build-system)
+    (home-page "https://github.com/iwalton3/python-mpv-jsonipc")
+    (synopsis "Python API to MPV using JSON IPC")
+    (description "Python API to MPV using JSON IPC")
+    (license license:asl2.0)))
+
 (define-public python-parso
   (package
     (name "python-parso")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH v2 2/4] gnu: Add python-jellyfin-apiclient.
  2023-11-30  1:54 ` [bug#67120] [PATCH v2 0/4] Add jellyfin-mpv-shim and deps Ian Eure
  2023-11-30  1:54   ` [bug#67120] [PATCH v2 1/4] gnu: Add python-mpv-jsonipc Ian Eure
@ 2023-11-30  1:54   ` Ian Eure
  2023-11-30  1:54   ` [bug#67120] [PATCH v2 3/4] gnu: Add python-pystray Ian Eure
  2023-11-30  1:54   ` [bug#67120] [PATCH v2 4/4] gnu: Add jellyfin-mpv-shim Ian Eure
  3 siblings, 0 replies; 42+ messages in thread
From: Ian Eure @ 2023-11-30  1:54 UTC (permalink / raw)
  To: 67120; +Cc: Ian Eure, Lars-Dominik Braun, Marius Bakke, Munyoki Kilyungi,
	jgart

* gnu/packages/python-xyz.scm (python-jellyfin-apiclient): New variable.

Change-Id: I9c2401a951fe6b980c449f7707c7275b5585ae10
---
 gnu/packages/python-xyz.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index e1e27ea76b..a3fea89e25 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -24704,6 +24704,24 @@ (define-public python-mpv-jsonipc
     (description "Python API to MPV using JSON IPC")
     (license license:asl2.0)))
 
+(define-public python-jellyfin-apiclient
+  (package
+    (name "python-jellyfin-apiclient")
+    (version "1.9.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "jellyfin-apiclient-python" version))
+       (sha256
+        (base32 "0r67cp9nizvn3cbslgi30zpd3mw4a6zal0ygik3jv5lni1xdkk5w"))))
+    (build-system pyproject-build-system)
+    (propagated-inputs (list python-certifi python-requests python-urllib3
+                             python-websocket-client))
+    (home-page "https://github.com/iwalton3/jellyfin-apiclient-python")
+    (synopsis "Python API client for Jellyfin")
+    (description "Python API client for Jellyfin")
+    (license license:gpl3)))
+
 (define-public python-parso
   (package
     (name "python-parso")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH v2 3/4] gnu: Add python-pystray.
  2023-11-30  1:54 ` [bug#67120] [PATCH v2 0/4] Add jellyfin-mpv-shim and deps Ian Eure
  2023-11-30  1:54   ` [bug#67120] [PATCH v2 1/4] gnu: Add python-mpv-jsonipc Ian Eure
  2023-11-30  1:54   ` [bug#67120] [PATCH v2 2/4] gnu: Add python-jellyfin-apiclient Ian Eure
@ 2023-11-30  1:54   ` Ian Eure
  2023-11-30  1:54   ` [bug#67120] [PATCH v2 4/4] gnu: Add jellyfin-mpv-shim Ian Eure
  3 siblings, 0 replies; 42+ messages in thread
From: Ian Eure @ 2023-11-30  1:54 UTC (permalink / raw)
  To: 67120; +Cc: Ian Eure, Lars-Dominik Braun, Marius Bakke, Munyoki Kilyungi,
	jgart

* gnu/packages/python-xyz.scm (python-pystray): New variable.

Change-Id: Ia6ef6388b76db59640914b80ee756d98f5e3e5eb
---
 gnu/packages/python-xyz.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index a3fea89e25..a16079c434 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -30474,6 +30474,32 @@ (define-public python-qdarkstyle
 Qt applications.")
     (license license:expat)))
 
+(define-public python-pystray
+  (package
+    (name "python-pystray")
+    (version "0.19.5")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/moses-palmer/pystray.git")
+             (commit "1907f8681d6d421517c63d94f425f9cdd74d0034")))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1vj6c8s7rbc7xc4bi5brx5629ls1ri9prcw9290v85hagilmp609"))))
+    (build-system python-build-system)
+    (arguments
+     (list
+      #:phases #~(modify-phases %standard-phases
+                   (delete 'check)
+                   (delete 'sanity-check))))
+    (native-inputs (list python-sphinx xorg-server-for-tests))
+    (propagated-inputs (list python-pillow python-six python-xlib))
+    (home-page "https://github.com/moses-palmer/pystray")
+    (synopsis "Create a system tray icon")
+    (description "This library allows you to create a system tray icon.")
+    (license license:lgpl3)))
+
 (define-public python-bitstring
   (package
     (name "python-bitstring")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH v2 4/4] gnu: Add jellyfin-mpv-shim.
  2023-11-30  1:54 ` [bug#67120] [PATCH v2 0/4] Add jellyfin-mpv-shim and deps Ian Eure
                     ` (2 preceding siblings ...)
  2023-11-30  1:54   ` [bug#67120] [PATCH v2 3/4] gnu: Add python-pystray Ian Eure
@ 2023-11-30  1:54   ` Ian Eure
  3 siblings, 0 replies; 42+ messages in thread
From: Ian Eure @ 2023-11-30  1:54 UTC (permalink / raw)
  To: 67120; +Cc: Ian Eure

* gnu/packages/video.scm (jellyfin-mpv-shim): New variable.

Change-Id: I7c4aa48c96ab09b427d6f80f290f95f671ce41fd
---
 gnu/packages/video.scm | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 2822cdf4bf..24a2b52af7 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -67,6 +67,7 @@
 ;;; Copyright © 2023 Dominik Delgado Steuter <dds@disroot.org>
 ;;; Copyright © 2023 Saku Laesvuori <saku@laesvuori.fi>
 ;;; Copyright © 2023 Jaeme Sifat <jaeme@runbox.com>
+;;; Copyright © 2023 Ian Eure <ian@retrospec.tv>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2481,6 +2482,46 @@ (define-public smplayer
 the last played position, etc.")
     (license license:gpl2+)))
 
+(define-public jellyfin-mpv-shim
+  (let ((desktop-base "jellyfin_mpv_shim/integration/")
+        (package-id "com.github.iwalton3.jellyfin-mpv-shim"))
+  (package
+    (name "jellyfin-mpv-shim")
+    (version "2.6.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "jellyfin-mpv-shim" version))
+       (sha256
+        (base32 "1cy2sfv84k5nw8bqy4aa7v0hdawp7gk5s7wq850xizqk0sz7cipp"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:tests? #f ;Disabled because they seem to boot the UI
+      #:phases #~(modify-phases %standard-phases
+                   (delete 'sanity-check) ;This also seems to boot the UI
+                   (add-after 'install 'install-desktop-file
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let* ((out (assoc-ref outputs "out"))
+                              (apps (string-append out "/share/applications")))
+                         (install-file
+                          (string-append #$desktop-base #$package-id ".appdata.xml")
+                          apps)
+                         (install-file
+                          (string-append #$desktop-base #$package-id ".desktop")
+                          apps) #t))))))
+    (native-inputs (list xorg-server-for-tests))
+    (propagated-inputs (list `(,python "tk")
+                             python-jellyfin-apiclient
+                             python-mpv
+                             python-mpv-jsonipc
+                             python-pystray
+                             python-requests))
+    (home-page "https://github.com/jellyfin/jellyfin-mpv-shim")
+    (synopsis "Cast media from Jellyfin Mobile and Web apps to MPV")
+    (description "Cast media from Jellyfin Mobile and Web apps to MPV.")
+    (license license:gpl2))))
+
 (define-public gallery-dl
   (package
     (name "gallery-dl")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH v3 0/4] Add jellyfin-mpv-shim and deps
  2023-11-12  4:13 [bug#67120] [PATCH 0/4] Add jellyfin-mpv-player and deps Ian Eure
                   ` (5 preceding siblings ...)
  2023-11-30  1:54 ` [bug#67120] [PATCH v2 0/4] Add jellyfin-mpv-shim and deps Ian Eure
@ 2024-02-17 17:20 ` Ian Eure
  2024-02-17 17:20   ` [bug#67120] [PATCH v3 1/4] gnu: Add python-mpv-jsonipc Ian Eure
                     ` (3 more replies)
  2024-02-17 17:49 ` [bug#67120] [PATCH v4 0/4] Add jellyfin-mpv-player and deps Ian Eure
                   ` (6 subsequent siblings)
  13 siblings, 4 replies; 42+ messages in thread
From: Ian Eure @ 2024-02-17 17:20 UTC (permalink / raw)
  To: 67120; +Cc: Ian Eure

Rebased on current master, since the last patch series no longer applies.

Also, pinging on this; I haven't heard anything since submitting it last November.

Ian Eure (4):
  gnu: Add python-mpv-jsonipc.
  gnu: Add python-jellyfin-apiclient.
  gnu: Add python-pystray.
  gnu: Add jellyfin-mpv-shim.

 gnu/packages/python-xyz.scm | 60 +++++++++++++++++++++++++++++++++++++
 gnu/packages/video.scm      | 40 +++++++++++++++++++++++++
 2 files changed, 100 insertions(+)


base-commit: 3cf199dbcf85a44fa8370e786e568fc3feb7067c
-- 
2.41.0





^ permalink raw reply	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH v3 1/4] gnu: Add python-mpv-jsonipc.
  2024-02-17 17:20 ` [bug#67120] [PATCH v3 0/4] Add jellyfin-mpv-shim and deps Ian Eure
@ 2024-02-17 17:20   ` Ian Eure
  2024-02-17 17:20   ` [bug#67120] [PATCH v3 2/4] gnu: Add python-jellyfin-apiclient Ian Eure
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 42+ messages in thread
From: Ian Eure @ 2024-02-17 17:20 UTC (permalink / raw)
  To: 67120
  Cc: Ian Eure, Lars-Dominik Braun, Marius Bakke, Munyoki Kilyungi,
	Sharlatan Hellseher, jgart

* gnu/packages/python-xyz.scm (python-mpv-jsonipc): New variable.

Change-Id: Iec7679213d9b9e8e5cbf01a30838e27e71704e54
---
 gnu/packages/python-xyz.scm | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 2dd8a12af5..ed80ee1d5e 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -25808,6 +25808,22 @@ (define-public online-judge-tools
 submitting it.")
     (license license:expat)))
 
+(define-public python-mpv-jsonipc
+  (package
+    (name "python-mpv-jsonipc")
+    (version "1.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "python-mpv-jsonipc" version))
+       (sha256
+        (base32 "0ymdwrx544a6gn6wm9dixpgzbfrbpxvcj5ys7m41cgb4lvpvx691"))))
+    (build-system pyproject-build-system)
+    (home-page "https://github.com/iwalton3/python-mpv-jsonipc")
+    (synopsis "Python API to MPV using JSON IPC")
+    (description "Python API to MPV using JSON IPC")
+    (license license:asl2.0)))
+
 (define-public python-parso
   (package
     (name "python-parso")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH v3 2/4] gnu: Add python-jellyfin-apiclient.
  2024-02-17 17:20 ` [bug#67120] [PATCH v3 0/4] Add jellyfin-mpv-shim and deps Ian Eure
  2024-02-17 17:20   ` [bug#67120] [PATCH v3 1/4] gnu: Add python-mpv-jsonipc Ian Eure
@ 2024-02-17 17:20   ` Ian Eure
  2024-02-17 17:20   ` [bug#67120] [PATCH v3 3/4] gnu: Add python-pystray Ian Eure
  2024-02-17 17:20   ` [bug#67120] [PATCH v3 4/4] gnu: Add jellyfin-mpv-shim Ian Eure
  3 siblings, 0 replies; 42+ messages in thread
From: Ian Eure @ 2024-02-17 17:20 UTC (permalink / raw)
  To: 67120
  Cc: Ian Eure, Lars-Dominik Braun, Marius Bakke, Munyoki Kilyungi,
	Sharlatan Hellseher, jgart

* gnu/packages/python-xyz.scm (python-jellyfin-apiclient): New variable.

Change-Id: If84546b14d380a3a10af63d4f41711125298487a
---
 gnu/packages/python-xyz.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index ed80ee1d5e..ba01a008bf 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -25824,6 +25824,24 @@ (define-public python-mpv-jsonipc
     (description "Python API to MPV using JSON IPC")
     (license license:asl2.0)))
 
+(define-public python-jellyfin-apiclient
+  (package
+    (name "python-jellyfin-apiclient")
+    (version "1.9.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "jellyfin-apiclient-python" version))
+       (sha256
+        (base32 "0r67cp9nizvn3cbslgi30zpd3mw4a6zal0ygik3jv5lni1xdkk5w"))))
+    (build-system pyproject-build-system)
+    (propagated-inputs (list python-certifi python-requests python-urllib3
+                             python-websocket-client))
+    (home-page "https://github.com/jellyfin/jellyfin-apiclient-python")
+    (synopsis "Python API client for Jellyfin")
+    (description "Python API client for Jellyfin")
+    (license license:gpl3)))
+
 (define-public python-parso
   (package
     (name "python-parso")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH v3 3/4] gnu: Add python-pystray.
  2024-02-17 17:20 ` [bug#67120] [PATCH v3 0/4] Add jellyfin-mpv-shim and deps Ian Eure
  2024-02-17 17:20   ` [bug#67120] [PATCH v3 1/4] gnu: Add python-mpv-jsonipc Ian Eure
  2024-02-17 17:20   ` [bug#67120] [PATCH v3 2/4] gnu: Add python-jellyfin-apiclient Ian Eure
@ 2024-02-17 17:20   ` Ian Eure
  2024-02-17 17:20   ` [bug#67120] [PATCH v3 4/4] gnu: Add jellyfin-mpv-shim Ian Eure
  3 siblings, 0 replies; 42+ messages in thread
From: Ian Eure @ 2024-02-17 17:20 UTC (permalink / raw)
  To: 67120
  Cc: Ian Eure, Lars-Dominik Braun, Marius Bakke, Munyoki Kilyungi,
	Sharlatan Hellseher, jgart

* gnu/packages/python-xyz.scm (python-pystray): New variable.

Change-Id: If10777c9ec91b549b9937b4825565223786a75cb
---
 gnu/packages/python-xyz.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index ba01a008bf..05c29049b8 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -31694,6 +31694,32 @@ (define-public python-qdarkstyle
 Qt applications.")
     (license license:expat)))
 
+(define-public python-pystray
+  (package
+    (name "python-pystray")
+    (version "0.19.5")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/moses-palmer/pystray")
+             (commit "1907f8681d6d421517c63d94f425f9cdd74d0034")))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1vj6c8s7rbc7xc4bi5brx5629ls1ri9prcw9290v85hagilmp609"))))
+    (build-system python-build-system)
+    (arguments
+     (list
+      #:phases #~(modify-phases %standard-phases
+                   (delete 'check)
+                   (delete 'sanity-check))))
+    (native-inputs (list python-sphinx xorg-server-for-tests))
+    (propagated-inputs (list python-pillow python-six python-xlib))
+    (home-page "https://github.com/moses-palmer/pystray")
+    (synopsis "Create a system tray icon")
+    (description "This library allows you to create a system tray icon.")
+    (license license:lgpl3)))
+
 (define-public python-bitstring
   (package
     (name "python-bitstring")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH v3 4/4] gnu: Add jellyfin-mpv-shim.
  2024-02-17 17:20 ` [bug#67120] [PATCH v3 0/4] Add jellyfin-mpv-shim and deps Ian Eure
                     ` (2 preceding siblings ...)
  2024-02-17 17:20   ` [bug#67120] [PATCH v3 3/4] gnu: Add python-pystray Ian Eure
@ 2024-02-17 17:20   ` Ian Eure
  3 siblings, 0 replies; 42+ messages in thread
From: Ian Eure @ 2024-02-17 17:20 UTC (permalink / raw)
  To: 67120; +Cc: Ian Eure

* gnu/packages/video.scm (jellyfin-mpv-shim): New variable.

Change-Id: Ie030dee36b1c2afc796f082fdebf909cbddd59da
---
 gnu/packages/video.scm | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 894543d3cc..c752198d1e 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -2751,6 +2751,46 @@ (define-public smplayer
 the last played position, etc.")
     (license license:gpl2+)))
 
+(define-public jellyfin-mpv-shim
+  (let ((desktop-base "jellyfin_mpv_shim/integration/")
+        (package-id "com.github.iwalton3.jellyfin-mpv-shim"))
+    (package
+      (name "jellyfin-mpv-shim")
+      (version "2.6.0")
+      (source
+       (origin
+         (method url-fetch)
+         (uri (pypi-uri "jellyfin-mpv-shim" version))
+         (sha256
+          (base32 "1cy2sfv84k5nw8bqy4aa7v0hdawp7gk5s7wq850xizqk0sz7cipp"))))
+      (build-system pyproject-build-system)
+      (arguments
+       (list
+        #:tests? #f ;Disabled because they seem to boot the UI
+        #:phases #~(modify-phases %standard-phases
+                     (delete 'sanity-check) ;This also seems to boot the UI
+                     (add-after 'install 'install-desktop-file
+                       (lambda* (#:key outputs #:allow-other-keys)
+                         (let* ((out (assoc-ref outputs "out"))
+                                (apps (string-append out "/share/applications")))
+                           (install-file (string-append desktop-base
+                                                        package-id
+                                                        ".appdata.xml") apps)
+                           (install-file (string-append desktop-base
+                                                        package-id ".desktop")
+                                         apps) #t))))))
+      (native-inputs (list xorg-server-for-tests))
+      (propagated-inputs (list `(,python "tk")
+                               python-jellyfin-apiclient
+                               python-mpv
+                               python-mpv-jsonipc
+                               python-pystray
+                               python-requests))
+      (home-page "https://github.com/jellyfin/jellyfin-mpv-shim")
+      (synopsis "Cast media from Jellyfin Mobile and Web apps to MPV")
+      (description "Cast media from Jellyfin Mobile and Web apps to MPV.")
+      (license license:gpl2))))
+
 (define-public gallery-dl
   (package
     (name "gallery-dl")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH v4 0/4] Add jellyfin-mpv-player and deps
  2023-11-12  4:13 [bug#67120] [PATCH 0/4] Add jellyfin-mpv-player and deps Ian Eure
                   ` (6 preceding siblings ...)
  2024-02-17 17:20 ` [bug#67120] [PATCH v3 0/4] Add jellyfin-mpv-shim and deps Ian Eure
@ 2024-02-17 17:49 ` Ian Eure
  2024-02-17 17:49   ` [bug#67120] [PATCH v4 1/4] gnu: Add python-mpv-jsonipc Ian Eure
                     ` (3 more replies)
  2024-02-17 19:02 ` [bug#67120] [PATCH v5 0/5] Add jellyfin-mpv-player and deps Ian Eure
                   ` (5 subsequent siblings)
  13 siblings, 4 replies; 42+ messages in thread
From: Ian Eure @ 2024-02-17 17:49 UTC (permalink / raw)
  To: 67120; +Cc: Ian Eure

Last patch series was broken, this corrects the build and solves some minor issues.

Ian Eure (4):
  gnu: Add python-mpv-jsonipc.
  gnu: Add python-jellyfin-apiclient.
  gnu: Add python-pystray.
  gnu: Add jellyfin-mpv-shim.

 gnu/packages/python-xyz.scm | 60 +++++++++++++++++++++++++++++++++++++
 gnu/packages/video.scm      | 44 +++++++++++++++++++++++++++
 2 files changed, 104 insertions(+)


base-commit: 3cf199dbcf85a44fa8370e786e568fc3feb7067c
-- 
2.41.0





^ permalink raw reply	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH v4 1/4] gnu: Add python-mpv-jsonipc.
  2024-02-17 17:49 ` [bug#67120] [PATCH v4 0/4] Add jellyfin-mpv-player and deps Ian Eure
@ 2024-02-17 17:49   ` Ian Eure
  2024-02-17 17:49   ` [bug#67120] [PATCH v4 2/4] gnu: Add python-jellyfin-apiclient Ian Eure
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 42+ messages in thread
From: Ian Eure @ 2024-02-17 17:49 UTC (permalink / raw)
  To: 67120
  Cc: Ian Eure, Lars-Dominik Braun, Marius Bakke, Munyoki Kilyungi,
	Sharlatan Hellseher, jgart

* gnu/packages/python-xyz.scm (python-mpv-jsonipc): New variable.

Change-Id: Iec7679213d9b9e8e5cbf01a30838e27e71704e54
---
 gnu/packages/python-xyz.scm | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 2dd8a12af5..ed80ee1d5e 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -25808,6 +25808,22 @@ (define-public online-judge-tools
 submitting it.")
     (license license:expat)))
 
+(define-public python-mpv-jsonipc
+  (package
+    (name "python-mpv-jsonipc")
+    (version "1.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "python-mpv-jsonipc" version))
+       (sha256
+        (base32 "0ymdwrx544a6gn6wm9dixpgzbfrbpxvcj5ys7m41cgb4lvpvx691"))))
+    (build-system pyproject-build-system)
+    (home-page "https://github.com/iwalton3/python-mpv-jsonipc")
+    (synopsis "Python API to MPV using JSON IPC")
+    (description "Python API to MPV using JSON IPC")
+    (license license:asl2.0)))
+
 (define-public python-parso
   (package
     (name "python-parso")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH v4 2/4] gnu: Add python-jellyfin-apiclient.
  2024-02-17 17:49 ` [bug#67120] [PATCH v4 0/4] Add jellyfin-mpv-player and deps Ian Eure
  2024-02-17 17:49   ` [bug#67120] [PATCH v4 1/4] gnu: Add python-mpv-jsonipc Ian Eure
@ 2024-02-17 17:49   ` Ian Eure
  2024-02-17 17:49   ` [bug#67120] [PATCH v4 3/4] gnu: Add python-pystray Ian Eure
  2024-02-17 17:49   ` [bug#67120] [PATCH v4 4/4] gnu: Add jellyfin-mpv-shim Ian Eure
  3 siblings, 0 replies; 42+ messages in thread
From: Ian Eure @ 2024-02-17 17:49 UTC (permalink / raw)
  To: 67120
  Cc: Ian Eure, Lars-Dominik Braun, Marius Bakke, Munyoki Kilyungi,
	Sharlatan Hellseher, jgart

* gnu/packages/python-xyz.scm (python-jellyfin-apiclient): New variable.

Change-Id: If84546b14d380a3a10af63d4f41711125298487a
---
 gnu/packages/python-xyz.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index ed80ee1d5e..ba01a008bf 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -25824,6 +25824,24 @@ (define-public python-mpv-jsonipc
     (description "Python API to MPV using JSON IPC")
     (license license:asl2.0)))
 
+(define-public python-jellyfin-apiclient
+  (package
+    (name "python-jellyfin-apiclient")
+    (version "1.9.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "jellyfin-apiclient-python" version))
+       (sha256
+        (base32 "0r67cp9nizvn3cbslgi30zpd3mw4a6zal0ygik3jv5lni1xdkk5w"))))
+    (build-system pyproject-build-system)
+    (propagated-inputs (list python-certifi python-requests python-urllib3
+                             python-websocket-client))
+    (home-page "https://github.com/jellyfin/jellyfin-apiclient-python")
+    (synopsis "Python API client for Jellyfin")
+    (description "Python API client for Jellyfin")
+    (license license:gpl3)))
+
 (define-public python-parso
   (package
     (name "python-parso")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH v4 3/4] gnu: Add python-pystray.
  2024-02-17 17:49 ` [bug#67120] [PATCH v4 0/4] Add jellyfin-mpv-player and deps Ian Eure
  2024-02-17 17:49   ` [bug#67120] [PATCH v4 1/4] gnu: Add python-mpv-jsonipc Ian Eure
  2024-02-17 17:49   ` [bug#67120] [PATCH v4 2/4] gnu: Add python-jellyfin-apiclient Ian Eure
@ 2024-02-17 17:49   ` Ian Eure
  2024-02-17 17:49   ` [bug#67120] [PATCH v4 4/4] gnu: Add jellyfin-mpv-shim Ian Eure
  3 siblings, 0 replies; 42+ messages in thread
From: Ian Eure @ 2024-02-17 17:49 UTC (permalink / raw)
  To: 67120
  Cc: Ian Eure, Lars-Dominik Braun, Marius Bakke, Munyoki Kilyungi,
	Sharlatan Hellseher, jgart

* gnu/packages/python-xyz.scm (python-pystray): New variable.

Change-Id: If10777c9ec91b549b9937b4825565223786a75cb
---
 gnu/packages/python-xyz.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index ba01a008bf..05c29049b8 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -31694,6 +31694,32 @@ (define-public python-qdarkstyle
 Qt applications.")
     (license license:expat)))
 
+(define-public python-pystray
+  (package
+    (name "python-pystray")
+    (version "0.19.5")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/moses-palmer/pystray")
+             (commit "1907f8681d6d421517c63d94f425f9cdd74d0034")))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1vj6c8s7rbc7xc4bi5brx5629ls1ri9prcw9290v85hagilmp609"))))
+    (build-system python-build-system)
+    (arguments
+     (list
+      #:phases #~(modify-phases %standard-phases
+                   (delete 'check)
+                   (delete 'sanity-check))))
+    (native-inputs (list python-sphinx xorg-server-for-tests))
+    (propagated-inputs (list python-pillow python-six python-xlib))
+    (home-page "https://github.com/moses-palmer/pystray")
+    (synopsis "Create a system tray icon")
+    (description "This library allows you to create a system tray icon.")
+    (license license:lgpl3)))
+
 (define-public python-bitstring
   (package
     (name "python-bitstring")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH v4 4/4] gnu: Add jellyfin-mpv-shim.
  2024-02-17 17:49 ` [bug#67120] [PATCH v4 0/4] Add jellyfin-mpv-player and deps Ian Eure
                     ` (2 preceding siblings ...)
  2024-02-17 17:49   ` [bug#67120] [PATCH v4 3/4] gnu: Add python-pystray Ian Eure
@ 2024-02-17 17:49   ` Ian Eure
  3 siblings, 0 replies; 42+ messages in thread
From: Ian Eure @ 2024-02-17 17:49 UTC (permalink / raw)
  To: 67120; +Cc: Ian Eure

* gnu/packages/video.scm (jellyfin-mpv-shim): New variable.

Change-Id: Ie030dee36b1c2afc796f082fdebf909cbddd59da
---
 gnu/packages/video.scm | 44 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 894543d3cc..442500e24d 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -2751,6 +2751,50 @@ (define-public smplayer
 the last played position, etc.")
     (license license:gpl2+)))
 
+(define-public jellyfin-mpv-shim
+  (package
+    (name "jellyfin-mpv-shim")
+    (version "2.6.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "jellyfin-mpv-shim" version))
+       (sha256
+        (base32 "1cy2sfv84k5nw8bqy4aa7v0hdawp7gk5s7wq850xizqk0sz7cipp"))))
+    (build-system python-build-system)
+    (arguments
+     (list
+      #:tests? #f ;There are no tests, but this tries to run the GUI.
+      #:phases #~(modify-phases %standard-phases
+                   (delete 'sanity-check) ;This tries to run the GUI.
+                   (add-after 'install 'install-desktop-file
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let* ((out (assoc-ref outputs "out"))
+                              (apps (string-append out "/share/applications"))
+                              (desktop-base "jellyfin_mpv_shim/integration/")
+                              (package-id
+                               "com.github.iwalton3.jellyfin-mpv-shim"))
+                         (for-each (lambda (size)
+                                     (install-file (format #f
+                                                    "~ajellyfin-~a.png"
+                                                    desktop-base size) apps))
+                                   '(256 128 64 48 32 16))
+                         (install-file (string-append desktop-base package-id
+                                                      ".appdata.xml") apps)
+                         (install-file (string-append desktop-base package-id
+                                                      ".desktop") apps) #t))))))
+    (native-inputs (list xorg-server-for-tests))
+    (propagated-inputs (list `(,python "tk")
+                             python-jellyfin-apiclient
+                             python-mpv
+                             python-mpv-jsonipc
+                             python-pystray
+                             python-requests))
+    (home-page "https://github.com/jellyfin/jellyfin-mpv-shim")
+    (synopsis "Cast media from Jellyfin Mobile and Web apps to MPV")
+    (description "Cast media from Jellyfin Mobile and Web apps to MPV.")
+    (license license:gpl2)))
+
 (define-public gallery-dl
   (package
     (name "gallery-dl")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH v5 0/5] Add jellyfin-mpv-player and deps
  2023-11-12  4:13 [bug#67120] [PATCH 0/4] Add jellyfin-mpv-player and deps Ian Eure
                   ` (7 preceding siblings ...)
  2024-02-17 17:49 ` [bug#67120] [PATCH v4 0/4] Add jellyfin-mpv-player and deps Ian Eure
@ 2024-02-17 19:02 ` Ian Eure
  2024-02-17 19:02   ` [bug#67120] [PATCH v5 1/5] gnu: Add python-mpv-jsonipc Ian Eure
                     ` (4 more replies)
  2024-02-21 20:42 ` [bug#67120] [PATCH 0/4] Add jellyfin-mpv-player and deps Sharlatan Hellseher
                   ` (4 subsequent siblings)
  13 siblings, 5 replies; 42+ messages in thread
From: Ian Eure @ 2024-02-17 19:02 UTC (permalink / raw)
  To: 67120; +Cc: Ian Eure

Sorry for the thrashing on this.  Realized I'd written a home service to launch this, but neglected to include that in the patch series.  Added it, and update the docs.

Ian Eure (5):
  gnu: Add python-mpv-jsonipc.
  gnu: Add python-jellyfin-apiclient.
  gnu: Add python-pystray.
  gnu: Add jellyfin-mpv-shim.
  gnu: Add home-jellyfin-mpv-shim-service-type.

 doc/guix.texi               | 17 +++++++++++
 gnu/home/services/media.scm | 35 ++++++++++++++++++++++
 gnu/packages/python-xyz.scm | 60 +++++++++++++++++++++++++++++++++++++
 gnu/packages/video.scm      | 44 +++++++++++++++++++++++++++
 4 files changed, 156 insertions(+)


base-commit: 3cf199dbcf85a44fa8370e786e568fc3feb7067c
-- 
2.41.0





^ permalink raw reply	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH v5 1/5] gnu: Add python-mpv-jsonipc.
  2024-02-17 19:02 ` [bug#67120] [PATCH v5 0/5] Add jellyfin-mpv-player and deps Ian Eure
@ 2024-02-17 19:02   ` Ian Eure
  2024-02-17 19:02   ` [bug#67120] [PATCH v5 2/5] gnu: Add python-jellyfin-apiclient Ian Eure
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 42+ messages in thread
From: Ian Eure @ 2024-02-17 19:02 UTC (permalink / raw)
  To: 67120
  Cc: Ian Eure, Lars-Dominik Braun, Marius Bakke, Munyoki Kilyungi,
	Sharlatan Hellseher, jgart

* gnu/packages/python-xyz.scm (python-mpv-jsonipc): New variable.

Change-Id: Iec7679213d9b9e8e5cbf01a30838e27e71704e54
---
 gnu/packages/python-xyz.scm | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 2dd8a12af5..ed80ee1d5e 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -25808,6 +25808,22 @@ (define-public online-judge-tools
 submitting it.")
     (license license:expat)))
 
+(define-public python-mpv-jsonipc
+  (package
+    (name "python-mpv-jsonipc")
+    (version "1.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "python-mpv-jsonipc" version))
+       (sha256
+        (base32 "0ymdwrx544a6gn6wm9dixpgzbfrbpxvcj5ys7m41cgb4lvpvx691"))))
+    (build-system pyproject-build-system)
+    (home-page "https://github.com/iwalton3/python-mpv-jsonipc")
+    (synopsis "Python API to MPV using JSON IPC")
+    (description "Python API to MPV using JSON IPC")
+    (license license:asl2.0)))
+
 (define-public python-parso
   (package
     (name "python-parso")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH v5 2/5] gnu: Add python-jellyfin-apiclient.
  2024-02-17 19:02 ` [bug#67120] [PATCH v5 0/5] Add jellyfin-mpv-player and deps Ian Eure
  2024-02-17 19:02   ` [bug#67120] [PATCH v5 1/5] gnu: Add python-mpv-jsonipc Ian Eure
@ 2024-02-17 19:02   ` Ian Eure
  2024-02-17 19:02   ` [bug#67120] [PATCH v5 3/5] gnu: Add python-pystray Ian Eure
                     ` (2 subsequent siblings)
  4 siblings, 0 replies; 42+ messages in thread
From: Ian Eure @ 2024-02-17 19:02 UTC (permalink / raw)
  To: 67120
  Cc: Ian Eure, Lars-Dominik Braun, Marius Bakke, Munyoki Kilyungi,
	Sharlatan Hellseher, jgart

* gnu/packages/python-xyz.scm (python-jellyfin-apiclient): New variable.

Change-Id: If84546b14d380a3a10af63d4f41711125298487a
---
 gnu/packages/python-xyz.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index ed80ee1d5e..ba01a008bf 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -25824,6 +25824,24 @@ (define-public python-mpv-jsonipc
     (description "Python API to MPV using JSON IPC")
     (license license:asl2.0)))
 
+(define-public python-jellyfin-apiclient
+  (package
+    (name "python-jellyfin-apiclient")
+    (version "1.9.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "jellyfin-apiclient-python" version))
+       (sha256
+        (base32 "0r67cp9nizvn3cbslgi30zpd3mw4a6zal0ygik3jv5lni1xdkk5w"))))
+    (build-system pyproject-build-system)
+    (propagated-inputs (list python-certifi python-requests python-urllib3
+                             python-websocket-client))
+    (home-page "https://github.com/jellyfin/jellyfin-apiclient-python")
+    (synopsis "Python API client for Jellyfin")
+    (description "Python API client for Jellyfin")
+    (license license:gpl3)))
+
 (define-public python-parso
   (package
     (name "python-parso")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH v5 3/5] gnu: Add python-pystray.
  2024-02-17 19:02 ` [bug#67120] [PATCH v5 0/5] Add jellyfin-mpv-player and deps Ian Eure
  2024-02-17 19:02   ` [bug#67120] [PATCH v5 1/5] gnu: Add python-mpv-jsonipc Ian Eure
  2024-02-17 19:02   ` [bug#67120] [PATCH v5 2/5] gnu: Add python-jellyfin-apiclient Ian Eure
@ 2024-02-17 19:02   ` Ian Eure
  2024-02-17 19:02   ` [bug#67120] [PATCH v5 4/5] gnu: Add jellyfin-mpv-shim Ian Eure
  2024-02-17 19:02   ` [bug#67120] [PATCH v5 5/5] gnu: Add home-jellyfin-mpv-shim-service-type Ian Eure
  4 siblings, 0 replies; 42+ messages in thread
From: Ian Eure @ 2024-02-17 19:02 UTC (permalink / raw)
  To: 67120
  Cc: Ian Eure, Lars-Dominik Braun, Marius Bakke, Munyoki Kilyungi,
	Sharlatan Hellseher, jgart

* gnu/packages/python-xyz.scm (python-pystray): New variable.

Change-Id: If10777c9ec91b549b9937b4825565223786a75cb
---
 gnu/packages/python-xyz.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index ba01a008bf..05c29049b8 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -31694,6 +31694,32 @@ (define-public python-qdarkstyle
 Qt applications.")
     (license license:expat)))
 
+(define-public python-pystray
+  (package
+    (name "python-pystray")
+    (version "0.19.5")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/moses-palmer/pystray")
+             (commit "1907f8681d6d421517c63d94f425f9cdd74d0034")))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1vj6c8s7rbc7xc4bi5brx5629ls1ri9prcw9290v85hagilmp609"))))
+    (build-system python-build-system)
+    (arguments
+     (list
+      #:phases #~(modify-phases %standard-phases
+                   (delete 'check)
+                   (delete 'sanity-check))))
+    (native-inputs (list python-sphinx xorg-server-for-tests))
+    (propagated-inputs (list python-pillow python-six python-xlib))
+    (home-page "https://github.com/moses-palmer/pystray")
+    (synopsis "Create a system tray icon")
+    (description "This library allows you to create a system tray icon.")
+    (license license:lgpl3)))
+
 (define-public python-bitstring
   (package
     (name "python-bitstring")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH v5 4/5] gnu: Add jellyfin-mpv-shim.
  2024-02-17 19:02 ` [bug#67120] [PATCH v5 0/5] Add jellyfin-mpv-player and deps Ian Eure
                     ` (2 preceding siblings ...)
  2024-02-17 19:02   ` [bug#67120] [PATCH v5 3/5] gnu: Add python-pystray Ian Eure
@ 2024-02-17 19:02   ` Ian Eure
  2024-02-17 19:02   ` [bug#67120] [PATCH v5 5/5] gnu: Add home-jellyfin-mpv-shim-service-type Ian Eure
  4 siblings, 0 replies; 42+ messages in thread
From: Ian Eure @ 2024-02-17 19:02 UTC (permalink / raw)
  To: 67120; +Cc: Ian Eure

* gnu/packages/video.scm (jellyfin-mpv-shim): New variable.

Change-Id: Ie030dee36b1c2afc796f082fdebf909cbddd59da
---
 gnu/packages/video.scm | 44 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 894543d3cc..442500e24d 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -2751,6 +2751,50 @@ (define-public smplayer
 the last played position, etc.")
     (license license:gpl2+)))
 
+(define-public jellyfin-mpv-shim
+  (package
+    (name "jellyfin-mpv-shim")
+    (version "2.6.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "jellyfin-mpv-shim" version))
+       (sha256
+        (base32 "1cy2sfv84k5nw8bqy4aa7v0hdawp7gk5s7wq850xizqk0sz7cipp"))))
+    (build-system python-build-system)
+    (arguments
+     (list
+      #:tests? #f ;There are no tests, but this tries to run the GUI.
+      #:phases #~(modify-phases %standard-phases
+                   (delete 'sanity-check) ;This tries to run the GUI.
+                   (add-after 'install 'install-desktop-file
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let* ((out (assoc-ref outputs "out"))
+                              (apps (string-append out "/share/applications"))
+                              (desktop-base "jellyfin_mpv_shim/integration/")
+                              (package-id
+                               "com.github.iwalton3.jellyfin-mpv-shim"))
+                         (for-each (lambda (size)
+                                     (install-file (format #f
+                                                    "~ajellyfin-~a.png"
+                                                    desktop-base size) apps))
+                                   '(256 128 64 48 32 16))
+                         (install-file (string-append desktop-base package-id
+                                                      ".appdata.xml") apps)
+                         (install-file (string-append desktop-base package-id
+                                                      ".desktop") apps) #t))))))
+    (native-inputs (list xorg-server-for-tests))
+    (propagated-inputs (list `(,python "tk")
+                             python-jellyfin-apiclient
+                             python-mpv
+                             python-mpv-jsonipc
+                             python-pystray
+                             python-requests))
+    (home-page "https://github.com/jellyfin/jellyfin-mpv-shim")
+    (synopsis "Cast media from Jellyfin Mobile and Web apps to MPV")
+    (description "Cast media from Jellyfin Mobile and Web apps to MPV.")
+    (license license:gpl2)))
+
 (define-public gallery-dl
   (package
     (name "gallery-dl")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH v5 5/5] gnu: Add home-jellyfin-mpv-shim-service-type.
  2024-02-17 19:02 ` [bug#67120] [PATCH v5 0/5] Add jellyfin-mpv-player and deps Ian Eure
                     ` (3 preceding siblings ...)
  2024-02-17 19:02   ` [bug#67120] [PATCH v5 4/5] gnu: Add jellyfin-mpv-shim Ian Eure
@ 2024-02-17 19:02   ` Ian Eure
  4 siblings, 0 replies; 42+ messages in thread
From: Ian Eure @ 2024-02-17 19:02 UTC (permalink / raw)
  To: 67120; +Cc: Ian Eure

* gnu/home/services/media.scm (home-jellyfin-mpv-shim-service-type): New variable.
* doc/guix.texi (Jellyfin Services): New section.
* doc/guix.texi (Kodi Services): Add subheading.

Change-Id: I037ab0602214fdaa1b032be51ff98ecf6b7ee16c
---
 doc/guix.texi               | 17 +++++++++++++++++
 gnu/home/services/media.scm | 35 +++++++++++++++++++++++++++++++++++
 2 files changed, 52 insertions(+)

diff --git a/doc/guix.texi b/doc/guix.texi
index 04119a5955..58981f96d5 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -46042,6 +46042,8 @@ Media Home Services
 @subsection Media Home Services
 
 @cindex kodi
+@subsubheading Kodi Services
+
 The @uref{https://kodi.tv, Kodi media center} can be run as a daemon on
 a media server.  With the @code{(gnu home services kodi)} service, you
 can configure Kodi to run upon login.
@@ -46074,6 +46076,21 @@ Media Home Services
 @end table
 @end deftp
 
+@cindex jellyfin
+@subsubheading Jellyfin Services
+
+The @code{home-jellyfin-mpv-shim-service-type} in the @code{(gnu home services media)} module runs a cast client for the @uref{https://jellyfin.org/, Jellyfin} media system.
+
+To enable, add this to your home services:
+
+@lisp
+(service home-jellyfin-mpv-shim-service-type #f)
+@end lisp
+
+@defvar home-jellyfin-mpv-shim-service-type
+The type of the Jellyfin MPV Shim service.
+@end defvar
+
 @node Networking Home Services
 @subsection Networking Home Services
 
diff --git a/gnu/home/services/media.scm b/gnu/home/services/media.scm
index c6454dfe15..219bb97487 100644
--- a/gnu/home/services/media.scm
+++ b/gnu/home/services/media.scm
@@ -19,8 +19,10 @@
 (define-module (gnu home services media)
   #:use-module (srfi srfi-26)
   #:use-module (gnu home services)
+  #:use-module (gnu home services desktop)
   #:use-module (gnu home services shepherd)
   #:use-module (gnu packages kodi)
+  #:use-module (gnu packages video)
   #:use-module (gnu services configuration)
   #:use-module (gnu services shepherd)
   #:use-module (guix records)
@@ -66,3 +68,36 @@ (define home-kodi-service-type
    (description
     "Install and configure the Kodi media center so that it runs as a Shepherd
 service.")))
+
+(define (jellyfin-mpv-shim-shepherd-service _ignore)
+  (list (shepherd-service
+         (documentation "Jellyfin MPV Shim.")
+         (provision '(jellyfin-mpv-shim jellyfin-client))
+
+         ;; Depend on 'x11-display', which sets 'DISPLAY' if an X11 server is
+         ;; available, and fails to start otherwise.
+         (requirement '(x11-display))
+
+         (modules '((srfi srfi-1)
+                    (srfi srfi-26)))
+         (start #~(lambda _
+                    (fork+exec-command
+                     (list #$(file-append jellyfin-mpv-shim "/bin/jellyfin-mpv-shim"))
+
+                     ;; Inherit the 'DISPLAY' variable set by 'x11-display'.
+                     #:environment-variables
+                     (cons (string-append "DISPLAY=" (getenv "DISPLAY"))
+                           (remove (cut string-prefix? "DISPLAY=" <>)
+                                   (default-environment-variables))))))
+         (stop #~(make-kill-destructor)))))
+
+(define-public home-jellyfin-mpv-shim-service-type
+  (service-type
+   (name 'home-jellyfin-mpv-shim)
+   (extensions (list (service-extension home-shepherd-service-type
+                                        jellyfin-mpv-shim-shepherd-service)
+                     ;; Ensure 'home-x11-service-type' is instantiated so we
+                     ;; can depend on the Shepherd 'x11-display' service.
+                     (service-extension home-x11-service-type
+                                        (const #t))))
+   (description "Run Jellyfin MPV Shim.")))
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH 0/4] Add jellyfin-mpv-player and deps
  2023-11-12  4:13 [bug#67120] [PATCH 0/4] Add jellyfin-mpv-player and deps Ian Eure
                   ` (8 preceding siblings ...)
  2024-02-17 19:02 ` [bug#67120] [PATCH v5 0/5] Add jellyfin-mpv-player and deps Ian Eure
@ 2024-02-21 20:42 ` Sharlatan Hellseher
  2024-02-25 22:03   ` Ian Eure
  2024-02-25 22:20 ` [bug#67120] [PATCH v6 0/5] " Ian Eure
                   ` (3 subsequent siblings)
  13 siblings, 1 reply; 42+ messages in thread
From: Sharlatan Hellseher @ 2024-02-21 20:42 UTC (permalink / raw)
  To: 67120; +Cc: Ian Eure

[-- Attachment #1: Type: text/plain, Size: 1757 bytes --]


Hi Ian,

QA looks green ^.-

I've noticed some minor picks in v5 you sent.

--8<---------------cut here---------------start------------->8---
+(define-public jellyfin-mpv-shim
...
+    (license license:gpl2)))
--8<---------------cut here---------------end--------------->8---
Nix listes 5 licenses in the package
<https://github.com/NixOS/nixpkgs/blob/nixos-23.11/pkgs/applications/video/jellyfin-mpv-shim/default.nix#L109>
may you double check if it's still valid.

--8<---------------cut here---------------start------------->8---
+(define-public python-mpv-jsonipc
...
+    (synopsis "Python API to MPV using JSON IPC")
+    (description "Python API to MPV using JSON IPC")
--8<---------------cut here---------------end--------------->8---
The description of the package needs to be longer than synopsis and
needs to include more info. No full stop after end of the sentence.

--8<---------------cut here---------------start------------->8---
+(define-public python-jellyfin-apiclient
...
+    (synopsis "Python API client for Jellyfin")
+    (description "Python API client for Jellyfin")
--8<---------------cut here---------------end--------------->8---
Same here.

--8<---------------cut here---------------start------------->8---
+(define-public python-pystray
...
+    (arguments
+     (list
+      #:phases #~(modify-phases %standard-phases
+                   (delete 'check)
+                   (delete 'sanity-check))))
--8<---------------cut here---------------end--------------->8---
Please use #:tests? flag and place some comments why it's disabled (no
tests, require network, all broken etc.). Does Sanity check fail due to
incompatible versions, if so consider add relax-requirement phase (see
code examples in python-xyz).

Thanks,
Oleg

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH 0/4] Add jellyfin-mpv-player and deps
  2024-02-21 20:42 ` [bug#67120] [PATCH 0/4] Add jellyfin-mpv-player and deps Sharlatan Hellseher
@ 2024-02-25 22:03   ` Ian Eure
  2024-03-10  5:15     ` Ian Eure
  0 siblings, 1 reply; 42+ messages in thread
From: Ian Eure @ 2024-02-25 22:03 UTC (permalink / raw)
  To: Sharlatan Hellseher; +Cc: 67120

Hi Sharlatan,

Sharlatan Hellseher <sharlatanus@gmail.com> writes:

> [[PGP Signed Part:Undecided]]
>
> Hi Ian,
>
> QA looks green ^.-
>
> I've noticed some minor picks in v5 you sent.
>

Thank you for the feedback, I sent an updated patch series.

I had to keep the sanity-check phase of jellyfin-mpv-shim removed, 
because the program is ill-behaved and tries to do stuff at module 
import time, which breaks the build.

Thanks,

  — Ian




^ permalink raw reply	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH v6 0/5] Add jellyfin-mpv-player and deps
  2023-11-12  4:13 [bug#67120] [PATCH 0/4] Add jellyfin-mpv-player and deps Ian Eure
                   ` (9 preceding siblings ...)
  2024-02-21 20:42 ` [bug#67120] [PATCH 0/4] Add jellyfin-mpv-player and deps Sharlatan Hellseher
@ 2024-02-25 22:20 ` Ian Eure
  2024-02-25 22:20   ` [bug#67120] [PATCH v6 1/5] gnu: Add python-mpv-jsonipc Ian Eure
                     ` (4 more replies)
  2024-03-07 19:32 ` [bug#67120] Progress Andreas Enge
                   ` (2 subsequent siblings)
  13 siblings, 5 replies; 42+ messages in thread
From: Ian Eure @ 2024-02-25 22:20 UTC (permalink / raw)
  To: 67120; +Cc: Ian Eure


- Corrects package description/synopsis issues.
- Explain why tests are disabled.
- Add comment explaining why sanity-check phase of jellyfin-mpv-shim is disabled.
- Fix sanity-check phase of python-pystray.
- Change jellyfin-mpv-shim propagated-inputs to inputs.
- Correct jellyfin-mpv-shim inputs.
- Only start the service if the shim is configured.  Document this.

Ian Eure (5):
  gnu: Add python-mpv-jsonipc.
  gnu: Add python-jellyfin-apiclient.
  gnu: Add python-pystray.
  gnu: Add jellyfin-mpv-shim.
  gnu: Add home-jellyfin-mpv-shim-service-type.

 doc/guix.texi               | 19 ++++++++++
 gnu/home/services/media.scm | 42 +++++++++++++++++++++
 gnu/packages/python-xyz.scm | 73 ++++++++++++++++++++++++++++++++++++
 gnu/packages/video.scm      | 75 +++++++++++++++++++++++++++++++++++++
 4 files changed, 209 insertions(+)


base-commit: b25b94335a3ee8d68d2145da8e5ea0325ecea451
-- 
2.41.0





^ permalink raw reply	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH v6 1/5] gnu: Add python-mpv-jsonipc.
  2024-02-25 22:20 ` [bug#67120] [PATCH v6 0/5] " Ian Eure
@ 2024-02-25 22:20   ` Ian Eure
  2024-02-25 22:20   ` [bug#67120] [PATCH v6 2/5] gnu: Add python-jellyfin-apiclient Ian Eure
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 42+ messages in thread
From: Ian Eure @ 2024-02-25 22:20 UTC (permalink / raw)
  To: 67120
  Cc: Ian Eure, Lars-Dominik Braun, Marius Bakke, Munyoki Kilyungi,
	Sharlatan Hellseher, jgart

* gnu/packages/python-xyz.scm (python-mpv-jsonipc): New variable.

Change-Id: Iec7679213d9b9e8e5cbf01a30838e27e71704e54
---
 gnu/packages/python-xyz.scm | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index a051f5a8db..b6001416a6 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -25808,6 +25808,23 @@ (define-public online-judge-tools
 submitting it.")
     (license license:expat)))
 
+(define-public python-mpv-jsonipc
+  (package
+    (name "python-mpv-jsonipc")
+    (version "1.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "python-mpv-jsonipc" version))
+       (sha256
+        (base32 "0ymdwrx544a6gn6wm9dixpgzbfrbpxvcj5ys7m41cgb4lvpvx691"))))
+    (build-system pyproject-build-system)
+    (home-page "https://github.com/iwalton3/python-mpv-jsonipc")
+    (synopsis "Python API to control MPV using JSON IPC")
+    (description "python-mpv-jsonipc implements an interface similar to
+python-mpv, but it uses the JSON IPC protocol instead of the C API.")
+    (license license:asl2.0)))
+
 (define-public python-parso
   (package
     (name "python-parso")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH v6 2/5] gnu: Add python-jellyfin-apiclient.
  2024-02-25 22:20 ` [bug#67120] [PATCH v6 0/5] " Ian Eure
  2024-02-25 22:20   ` [bug#67120] [PATCH v6 1/5] gnu: Add python-mpv-jsonipc Ian Eure
@ 2024-02-25 22:20   ` Ian Eure
  2024-02-25 22:20   ` [bug#67120] [PATCH v6 3/5] gnu: Add python-pystray Ian Eure
                     ` (2 subsequent siblings)
  4 siblings, 0 replies; 42+ messages in thread
From: Ian Eure @ 2024-02-25 22:20 UTC (permalink / raw)
  To: 67120
  Cc: Ian Eure, Lars-Dominik Braun, Marius Bakke, Munyoki Kilyungi,
	Sharlatan Hellseher, jgart

* gnu/packages/python-xyz.scm (python-jellyfin-apiclient): New variable.

Change-Id: If84546b14d380a3a10af63d4f41711125298487a
---
 gnu/packages/python-xyz.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index b6001416a6..1ed1f0e135 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -25825,6 +25825,26 @@ (define-public python-mpv-jsonipc
 python-mpv, but it uses the JSON IPC protocol instead of the C API.")
     (license license:asl2.0)))
 
+(define-public python-jellyfin-apiclient
+  (package
+    (name "python-jellyfin-apiclient")
+    (version "1.9.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "jellyfin-apiclient-python" version))
+       (sha256
+        (base32 "0r67cp9nizvn3cbslgi30zpd3mw4a6zal0ygik3jv5lni1xdkk5w"))))
+    (build-system pyproject-build-system)
+    (propagated-inputs (list python-certifi python-requests python-urllib3
+                             python-websocket-client))
+    (home-page "https://github.com/jellyfin/jellyfin-apiclient-python")
+    (synopsis "Python API client for Jellyfin")
+    (description "python-jellyfin-apiclient allows use of the Jellyfin API
+from Python.  It was extracted from the Jellyfin Kodi plugin so other users
+may use the Jellyfin API more easily.")
+    (license license:gpl3)))
+
 (define-public python-parso
   (package
     (name "python-parso")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH v6 3/5] gnu: Add python-pystray.
  2024-02-25 22:20 ` [bug#67120] [PATCH v6 0/5] " Ian Eure
  2024-02-25 22:20   ` [bug#67120] [PATCH v6 1/5] gnu: Add python-mpv-jsonipc Ian Eure
  2024-02-25 22:20   ` [bug#67120] [PATCH v6 2/5] gnu: Add python-jellyfin-apiclient Ian Eure
@ 2024-02-25 22:20   ` Ian Eure
  2024-02-25 22:20   ` [bug#67120] [PATCH v6 4/5] gnu: Add jellyfin-mpv-shim Ian Eure
  2024-02-25 22:20   ` [bug#67120] [PATCH v6 5/5] gnu: Add home-jellyfin-mpv-shim-service-type Ian Eure
  4 siblings, 0 replies; 42+ messages in thread
From: Ian Eure @ 2024-02-25 22:20 UTC (permalink / raw)
  To: 67120
  Cc: Ian Eure, Lars-Dominik Braun, Marius Bakke, Munyoki Kilyungi,
	Sharlatan Hellseher, jgart

* gnu/packages/python-xyz.scm (python-pystray): New variable.

Change-Id: If10777c9ec91b549b9937b4825565223786a75cb
---
 gnu/packages/python-xyz.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 1ed1f0e135..36442f0870 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -31728,6 +31728,42 @@ (define-public python-qdarkstyle
 Qt applications.")
     (license license:expat)))
 
+(define-public python-pystray
+  (package
+    (name "python-pystray")
+    (version "0.19.5")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/moses-palmer/pystray")
+             (commit "1907f8681d6d421517c63d94f425f9cdd74d0034")))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1vj6c8s7rbc7xc4bi5brx5629ls1ri9prcw9290v85hagilmp609"))))
+    (build-system python-build-system)
+    (arguments
+     (list
+      ;; The test suite requires user interaction, there are no automated
+      ;; tests.
+      #:tests? #false
+      #:phases #~(modify-phases %standard-phases
+                   (add-before 'sanity-check 'use-dummy-backend
+                     (lambda _
+                       ;; Without setting this, pystray tries to connect to
+                       ;; X11 on import.
+                       (setenv "PYSTRAY_BACKEND" "dummy"))))))
+    (native-inputs (list python-sphinx))
+    (propagated-inputs (list python-pillow python-six python-xlib))
+    (home-page "https://github.com/moses-palmer/pystray")
+    (synopsis "Create a system tray icon")
+    (description "This library allows you to create a system tray icon.
+
+It allows specifying an icon, a title and a callback for when the icon is
+activated. The icon and title can be changed after the icon has been created,
+and the visibility of the icon can be toggled.")
+    (license license:lgpl3)))
+
 (define-public python-bitstring
   (package
     (name "python-bitstring")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH v6 4/5] gnu: Add jellyfin-mpv-shim.
  2024-02-25 22:20 ` [bug#67120] [PATCH v6 0/5] " Ian Eure
                     ` (2 preceding siblings ...)
  2024-02-25 22:20   ` [bug#67120] [PATCH v6 3/5] gnu: Add python-pystray Ian Eure
@ 2024-02-25 22:20   ` Ian Eure
  2024-02-25 22:20   ` [bug#67120] [PATCH v6 5/5] gnu: Add home-jellyfin-mpv-shim-service-type Ian Eure
  4 siblings, 0 replies; 42+ messages in thread
From: Ian Eure @ 2024-02-25 22:20 UTC (permalink / raw)
  To: 67120; +Cc: Ian Eure

* gnu/packages/video.scm (jellyfin-mpv-shim): New variable.

Change-Id: Ie030dee36b1c2afc796f082fdebf909cbddd59da
---
 gnu/packages/video.scm | 75 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 75 insertions(+)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 894543d3cc..efb016298b 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -162,6 +162,7 @@ (define-module (gnu packages video)
   #:use-module (gnu packages man)
   #:use-module (gnu packages markup)
   #:use-module (gnu packages maths)
+  #:use-module (gnu packages messaging)
   #:use-module (gnu packages music)
   #:use-module (gnu packages mp3)
   #:use-module (gnu packages multiprecision)
@@ -2751,6 +2752,80 @@ (define-public smplayer
 the last played position, etc.")
     (license license:gpl2+)))
 
+(define-public jellyfin-mpv-shim
+  (package
+    (name "jellyfin-mpv-shim")
+    (version "2.6.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "jellyfin-mpv-shim" version))
+       (sha256
+        (base32 "1cy2sfv84k5nw8bqy4aa7v0hdawp7gk5s7wq850xizqk0sz7cipp"))))
+    (build-system python-build-system)
+    (arguments
+     (list
+      ;; There's no test suite, but the code is ill-behaved and tries to open
+      ;; network connections at module import time, which makes `python
+      ;; setup.py test' fail.
+      #:tests? #f
+      #:phases #~(modify-phases %standard-phases
+                   ;; sanity-check loads console_scripts endpoints, which
+                   ;; launches the program, which makes the build hang.
+                   ;; disable it.
+                   (delete 'sanity-check)
+                   (add-after 'unpack 'disable-updates
+                     (lambda _
+                       (substitute* "jellyfin_mpv_shim/conf.py"
+                         (("check_updates: bool = True")
+                          "check_updates: bool = False")
+                         (("notify_updates: bool = True")
+                          "notify_updates: bool = False"))))
+                   (add-after 'install 'install-desktop-file
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let* ((out (assoc-ref outputs "out"))
+                              (apps (string-append out "/share/applications"))
+                              (desktop-base "jellyfin_mpv_shim/integration/")
+                              (package-id
+                               "com.github.iwalton3.jellyfin-mpv-shim"))
+                         (for-each (lambda (size)
+                                     (install-file (format #f
+                                                           "~ajellyfin-~a.png"
+                                                           desktop-base size) apps))
+                                   '(256 128 64 48 32 16))
+                         (install-file (string-append desktop-base package-id
+                                                      ".appdata.xml") apps)
+                         (install-file (string-append desktop-base package-id
+                                                      ".desktop") apps) #t))))))
+    (inputs (list `(,python "tk")
+                  python-jellyfin-apiclient
+                  python-jinja2
+                  python-mpv
+                  python-mpv-jsonipc
+                  python-pypresence
+                  python-pystray
+                  python-requests))
+    (home-page "https://github.com/jellyfin/jellyfin-mpv-shim")
+    (synopsis "Cast media from Jellyfin Mobile and Web apps to MPV")
+    (description "Jellyfin MPV Shim is a cross-platform cast client for
+Jellyfin.  It has support for all your advanced media files without
+transcoding, as well as tons of features which set it apart from other
+multimedia clients.")
+    (license (list
+              ;; jellyfin-mpv-shim
+              license:gpl3
+
+              ;; jellyfin-mpv-shim, and Anime4K, FSRCNNX, NVIDIA Image
+              ;; Scaling, AMD FidelityFX Super Resolution, AMD
+              ;; FidelityFX Contrast Adaptive Sharpening shaders.
+              license:expat
+
+              ;; Static Grain shader.
+              license:public-domain
+
+              ;; KrigBilatera, SSimDownscaler, and NNEDI3 shaders.
+              license:lgpl3+))))
+
 (define-public gallery-dl
   (package
     (name "gallery-dl")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH v6 5/5] gnu: Add home-jellyfin-mpv-shim-service-type.
  2024-02-25 22:20 ` [bug#67120] [PATCH v6 0/5] " Ian Eure
                     ` (3 preceding siblings ...)
  2024-02-25 22:20   ` [bug#67120] [PATCH v6 4/5] gnu: Add jellyfin-mpv-shim Ian Eure
@ 2024-02-25 22:20   ` Ian Eure
  4 siblings, 0 replies; 42+ messages in thread
From: Ian Eure @ 2024-02-25 22:20 UTC (permalink / raw)
  To: 67120; +Cc: Ian Eure

* gnu/home/services/media.scm (home-jellyfin-mpv-shim-service-type): New variable.
* doc/guix.texi (Jellyfin Services): New section.
* doc/guix.texi (Kodi Services): Add subheading.

Change-Id: I037ab0602214fdaa1b032be51ff98ecf6b7ee16c
---
 doc/guix.texi               | 19 +++++++++++++++++
 gnu/home/services/media.scm | 42 +++++++++++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+)

diff --git a/doc/guix.texi b/doc/guix.texi
index 671cdab6f8..f4d64f9df7 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -46103,6 +46103,8 @@ Media Home Services
 @subsection Media Home Services
 
 @cindex kodi
+@subsubheading Kodi Services
+
 The @uref{https://kodi.tv, Kodi media center} can be run as a daemon on
 a media server.  With the @code{(gnu home services kodi)} service, you
 can configure Kodi to run upon login.
@@ -46135,6 +46137,23 @@ Media Home Services
 @end table
 @end deftp
 
+@cindex jellyfin
+@subsubheading Jellyfin Services
+
+The @code{home-jellyfin-mpv-shim-service-type} in the @code{(gnu home services media)} module runs a cast client for the @uref{https://jellyfin.org/, Jellyfin} media system.
+
+To enable, add this to your home services:
+
+@lisp
+(service home-jellyfin-mpv-shim-service-type #f)
+@end lisp
+
+The service only starts if @code{jellyfin-mpv-shim} has been configured with a remote server and credentials.  This must be done manually, by launching @code{jellyfin-mpv-shim}.  After configuring the server, the service will start automatically when you log in.
+
+@defvar home-jellyfin-mpv-shim-service-type
+The type of the Jellyfin MPV Shim service.
+@end defvar
+
 @node Networking Home Services
 @subsection Networking Home Services
 
diff --git a/gnu/home/services/media.scm b/gnu/home/services/media.scm
index c6454dfe15..a7fcf75b06 100644
--- a/gnu/home/services/media.scm
+++ b/gnu/home/services/media.scm
@@ -19,8 +19,10 @@
 (define-module (gnu home services media)
   #:use-module (srfi srfi-26)
   #:use-module (gnu home services)
+  #:use-module (gnu home services desktop)
   #:use-module (gnu home services shepherd)
   #:use-module (gnu packages kodi)
+  #:use-module (gnu packages video)
   #:use-module (gnu services configuration)
   #:use-module (gnu services shepherd)
   #:use-module (guix records)
@@ -66,3 +68,43 @@ (define home-kodi-service-type
    (description
     "Install and configure the Kodi media center so that it runs as a Shepherd
 service.")))
+
+(define (jellyfin-mpv-shim-shepherd-service _ignore)
+  (list (shepherd-service
+         (documentation "Jellyfin MPV Shim.")
+         (provision '(jellyfin-mpv-shim jellyfin-client))
+
+         ;; Depend on 'x11-display', which sets 'DISPLAY' if an X11 server is
+         ;; available, and fails to start otherwise.
+         (requirement '(x11-display))
+
+         (modules '((srfi srfi-1)
+                    (srfi srfi-26)
+                    (srfi srfi-98)))
+         (start #~(lambda _
+                    ;; Only start if a server has been configured.
+                    (if (file-exists?
+                         (string-append
+                          (get-environment-variable "XDG_CONFIG_HOME")
+                          "/jellyfin-mpv-shim/cred.json"))
+                        (fork+exec-command
+                         (list #$(file-append jellyfin-mpv-shim "/bin/jellyfin-mpv-shim"))
+
+                         ;; Inherit the 'DISPLAY' variable set by 'x11-display'.
+                         #:environment-variables
+                         (cons (string-append "DISPLAY=" (getenv "DISPLAY"))
+                               (remove (cut string-prefix? "DISPLAY=" <>)
+                                       (default-environment-variables))))
+                        #f)))
+         (stop #~(make-kill-destructor)))))
+
+(define-public home-jellyfin-mpv-shim-service-type
+  (service-type
+   (name 'home-jellyfin-mpv-shim)
+   (extensions (list (service-extension home-shepherd-service-type
+                                        jellyfin-mpv-shim-shepherd-service)
+                     ;; Ensure 'home-x11-service-type' is instantiated so we
+                     ;; can depend on the Shepherd 'x11-display' service.
+                     (service-extension home-x11-service-type
+                                        (const #t))))
+   (description "Run Jellyfin MPV Shim.")))
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [bug#67120] Progress
  2023-11-12  4:13 [bug#67120] [PATCH 0/4] Add jellyfin-mpv-player and deps Ian Eure
                   ` (10 preceding siblings ...)
  2024-02-25 22:20 ` [bug#67120] [PATCH v6 0/5] " Ian Eure
@ 2024-03-07 19:32 ` Andreas Enge
  2024-03-08 11:57 ` Andreas Enge
  2024-03-08 12:10 ` [bug#67120] Done Andreas Enge
  13 siblings, 0 replies; 42+ messages in thread
From: Andreas Enge @ 2024-03-07 19:32 UTC (permalink / raw)
  To: 67120

Hello,

during the online patch hacking session I just had time to apply the first
two patches. I have added a copyright line for you. And I changed the
license of the second one to gpl3+; unless specified otherwise, gpl always
carries forward.

Thanks!

Andreas





^ permalink raw reply	[flat|nested] 42+ messages in thread

* [bug#67120] Progress
  2023-11-12  4:13 [bug#67120] [PATCH 0/4] Add jellyfin-mpv-player and deps Ian Eure
                   ` (11 preceding siblings ...)
  2024-03-07 19:32 ` [bug#67120] Progress Andreas Enge
@ 2024-03-08 11:57 ` Andreas Enge
  2024-03-08 12:10 ` [bug#67120] Done Andreas Enge
  13 siblings, 0 replies; 42+ messages in thread
From: Andreas Enge @ 2024-03-08 11:57 UTC (permalink / raw)
  To: 67120

3/5 pushed, after modifying the license to lgpl3+, see here:
   https://github.com/moses-palmer/pystray/blob/master/lib/pystray/__init__.py

Andreas





^ permalink raw reply	[flat|nested] 42+ messages in thread

* [bug#67120] Done
  2023-11-12  4:13 [bug#67120] [PATCH 0/4] Add jellyfin-mpv-player and deps Ian Eure
                   ` (12 preceding siblings ...)
  2024-03-08 11:57 ` Andreas Enge
@ 2024-03-08 12:10 ` Andreas Enge
  13 siblings, 0 replies; 42+ messages in thread
From: Andreas Enge @ 2024-03-08 12:10 UTC (permalink / raw)
  To: 67120

Hello,

I also pushed 4/5, after removing a trailing #t in a phase and some
reformatting to make the lines shorter. Thanks for the detailed license
list!

I am not familiar enough with services to have a look at the last patch,
and will leave this to someone else. Since this issue has become quite
long with its 6 versions of patches, you may wish to close this bug and
then resubmit only the service part separately to make it look less
overwhelming for the service person.

Andreas





^ permalink raw reply	[flat|nested] 42+ messages in thread

* [bug#67120] [PATCH 0/4] Add jellyfin-mpv-player and deps
  2024-02-25 22:03   ` Ian Eure
@ 2024-03-10  5:15     ` Ian Eure
  0 siblings, 0 replies; 42+ messages in thread
From: Ian Eure @ 2024-03-10  5:15 UTC (permalink / raw)
  To: 67120, Andreas Enge, control

close 67120
thanks

Hi Andreas,

Thank you for the review and commits!  Looks like I missed your 
messages because I’m not subscribed to bug-guix and didn’t get 
cc’d.  I like your advice, I’ll get a new bug opened.

Ian Eure <ian@retrospec.tv> writes:

> Hi Sharlatan,
>
> Sharlatan Hellseher <sharlatanus@gmail.com> writes:
>
>> [[PGP Signed Part:Undecided]]
>>
>> Hi Ian,
>>
>> QA looks green ^.-
>>
>> I've noticed some minor picks in v5 you sent.
>>
>
> Thank you for the feedback, I sent an updated patch series.
>
> I had to keep the sanity-check phase of jellyfin-mpv-shim 
> removed,
> because the program is ill-behaved and tries to do stuff at 
> module
> import time, which breaks the build.
>
> Thanks,
>
>  — Ian
>




^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2024-03-10  5:19 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-12  4:13 [bug#67120] [PATCH 0/4] Add jellyfin-mpv-player and deps Ian Eure
2023-11-12  4:16 ` [bug#67120] [PATCH 1/4] gnu: Add python-mpv-jsonipc Ian Eure
2023-11-12  4:16 ` [bug#67120] [PATCH 2/4] gnu: Add python-jellyfin-apiclient Ian Eure
2023-11-12  4:16 ` [bug#67120] [PATCH 3/4] gnu: Add python-pystray Ian Eure
2023-11-12  4:16 ` [bug#67120] [PATCH 4/4] gnu: Add jellyfin-mpv-shim Ian Eure
2023-11-12 17:23 ` [bug#67120] [PATCH v2 1/4] gnu: Add python-mpv-jsonipc Ian Eure
2023-11-12 17:23   ` [bug#67120] [PATCH v2 2/4] gnu: Add python-jellyfin-apiclient Ian Eure
2023-11-12 17:23   ` [bug#67120] [PATCH v2 3/4] gnu: Add python-pystray Ian Eure
2023-11-12 17:23   ` [bug#67120] [PATCH v2 4/4] gnu: Add jellyfin-mpv-shim Ian Eure
2023-11-30  1:54 ` [bug#67120] [PATCH v2 0/4] Add jellyfin-mpv-shim and deps Ian Eure
2023-11-30  1:54   ` [bug#67120] [PATCH v2 1/4] gnu: Add python-mpv-jsonipc Ian Eure
2023-11-30  1:54   ` [bug#67120] [PATCH v2 2/4] gnu: Add python-jellyfin-apiclient Ian Eure
2023-11-30  1:54   ` [bug#67120] [PATCH v2 3/4] gnu: Add python-pystray Ian Eure
2023-11-30  1:54   ` [bug#67120] [PATCH v2 4/4] gnu: Add jellyfin-mpv-shim Ian Eure
2024-02-17 17:20 ` [bug#67120] [PATCH v3 0/4] Add jellyfin-mpv-shim and deps Ian Eure
2024-02-17 17:20   ` [bug#67120] [PATCH v3 1/4] gnu: Add python-mpv-jsonipc Ian Eure
2024-02-17 17:20   ` [bug#67120] [PATCH v3 2/4] gnu: Add python-jellyfin-apiclient Ian Eure
2024-02-17 17:20   ` [bug#67120] [PATCH v3 3/4] gnu: Add python-pystray Ian Eure
2024-02-17 17:20   ` [bug#67120] [PATCH v3 4/4] gnu: Add jellyfin-mpv-shim Ian Eure
2024-02-17 17:49 ` [bug#67120] [PATCH v4 0/4] Add jellyfin-mpv-player and deps Ian Eure
2024-02-17 17:49   ` [bug#67120] [PATCH v4 1/4] gnu: Add python-mpv-jsonipc Ian Eure
2024-02-17 17:49   ` [bug#67120] [PATCH v4 2/4] gnu: Add python-jellyfin-apiclient Ian Eure
2024-02-17 17:49   ` [bug#67120] [PATCH v4 3/4] gnu: Add python-pystray Ian Eure
2024-02-17 17:49   ` [bug#67120] [PATCH v4 4/4] gnu: Add jellyfin-mpv-shim Ian Eure
2024-02-17 19:02 ` [bug#67120] [PATCH v5 0/5] Add jellyfin-mpv-player and deps Ian Eure
2024-02-17 19:02   ` [bug#67120] [PATCH v5 1/5] gnu: Add python-mpv-jsonipc Ian Eure
2024-02-17 19:02   ` [bug#67120] [PATCH v5 2/5] gnu: Add python-jellyfin-apiclient Ian Eure
2024-02-17 19:02   ` [bug#67120] [PATCH v5 3/5] gnu: Add python-pystray Ian Eure
2024-02-17 19:02   ` [bug#67120] [PATCH v5 4/5] gnu: Add jellyfin-mpv-shim Ian Eure
2024-02-17 19:02   ` [bug#67120] [PATCH v5 5/5] gnu: Add home-jellyfin-mpv-shim-service-type Ian Eure
2024-02-21 20:42 ` [bug#67120] [PATCH 0/4] Add jellyfin-mpv-player and deps Sharlatan Hellseher
2024-02-25 22:03   ` Ian Eure
2024-03-10  5:15     ` Ian Eure
2024-02-25 22:20 ` [bug#67120] [PATCH v6 0/5] " Ian Eure
2024-02-25 22:20   ` [bug#67120] [PATCH v6 1/5] gnu: Add python-mpv-jsonipc Ian Eure
2024-02-25 22:20   ` [bug#67120] [PATCH v6 2/5] gnu: Add python-jellyfin-apiclient Ian Eure
2024-02-25 22:20   ` [bug#67120] [PATCH v6 3/5] gnu: Add python-pystray Ian Eure
2024-02-25 22:20   ` [bug#67120] [PATCH v6 4/5] gnu: Add jellyfin-mpv-shim Ian Eure
2024-02-25 22:20   ` [bug#67120] [PATCH v6 5/5] gnu: Add home-jellyfin-mpv-shim-service-type Ian Eure
2024-03-07 19:32 ` [bug#67120] Progress Andreas Enge
2024-03-08 11:57 ` Andreas Enge
2024-03-08 12:10 ` [bug#67120] Done Andreas Enge

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).