From b4cb0f775bb2ff43811d3e7331f825f43e8ebacf Mon Sep 17 00:00:00 2001 From: Adam0 Date: Sun, 27 Sep 2026 08:43:58 +0200 Subject: [PATCH] Fix Jellyfin widget auth for Jellyfin 10.12 --- config/statistics.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/statistics.yml b/config/statistics.yml index edf417b..22d3653 100644 --- a/config/statistics.yml +++ b/config/statistics.yml @@ -15,10 +15,10 @@ {{- if or (eq $url "") (eq $key "") -}}

Error: The URL or API key was not configured in the widget options.

{{- else -}} - {{- $requestUrl := printf "%s/emby/Items/Counts?api_key=%s" $url $key -}} - {{- $jellyfinData := newRequest $requestUrl | getResponse -}} - {{- $audiobooksUrl := printf "%s/emby/Items?IncludeItemTypes=AudioBook&Recursive=true&Limit=0&EnableTotalRecordCount=true&api_key=%s" $url $key -}} - {{- $audiobooksData := newRequest $audiobooksUrl | getResponse -}} + {{- $countsUrl := printf "%s/emby/Items/Counts" $url -}} + {{- $jellyfinData := newRequest $countsUrl | withHeader "X-Api-Key" $key | getResponse -}} + {{- $audiobooksUrl := printf "%s/emby/Items?IncludeItemTypes=AudioBook&Recursive=true&Limit=0&EnableTotalRecordCount=true" $url -}} + {{- $audiobooksData := newRequest $audiobooksUrl | withHeader "X-Api-Key" $key | getResponse -}} {{- if and (eq $jellyfinData.Response.StatusCode 200) (eq $audiobooksData.Response.StatusCode 200) -}}
-- 2.51.2