From da9297c8fd0bd42344e866fe18c5b77f93829671 Mon Sep 17 00:00:00 2001 From: Marvin Preuss Date: Fri, 10 Jul 2026 12:56:44 +0200 Subject: [PATCH] mediaelch: backport TMDb duplicate include_adult search fix MediaElch 2.12.0 appends the include_adult query parameter twice to TMDb movie search URLs (once via getMovieSearchUrl's third argument, once via the UrlParameterMap in TmdbMovieSearchJob::doStart). TMDb rejects the duplicate parameter with HTTP 400, surfacing as "Network Error: Could not load the requested resource" on every movie name search. Backport upstream fix (Komet/MediaElch PR #1995, commit f68419e), which removes the redundant UrlParameterMap entry. Pending a MediaElch release > 2.12.0; remove this patch once that ships. Upstream issue: https://github.com/Komet/MediaElch/issues/1992 Upstream PR: https://github.com/Komet/MediaElch/pull/1995 Assisted-by: pi coding agent (zai-org/glm-5.2) --- pkgs/by-name/me/mediaelch/package.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/by-name/me/mediaelch/package.nix b/pkgs/by-name/me/mediaelch/package.nix index 29adab944c09..e9e30dc6f788 100644 --- a/pkgs/by-name/me/mediaelch/package.nix +++ b/pkgs/by-name/me/mediaelch/package.nix @@ -38,6 +38,15 @@ stdenv.mkDerivation (finalAttrs: { url = "https://github.com/Komet/MediaElch/commit/dbea12fbf2c1fe603819392aa2a181cffa168548.patch"; hash = "sha256-Lv6rvjKbRNr5XrdZhPyw4S4RRCOnfAGhWgcSLo0gqS8="; }) + + # fix from: https://github.com/Komet/MediaElch/pull/1995 + # TMDb rejects a duplicate include_adult query param with HTTP 400 (issue #1992). + # Remove once MediaElch > 2.12.0 is released. + (fetchpatch { + name = "fix-tmdb-duplicate-include-adult.patch"; + url = "https://github.com/Komet/MediaElch/commit/f68419e746455d3c7eb6d95a4a1da7a6f7a5c505.patch"; + hash = "sha256-u+ScJDFX2IIpjXV58MCp1uJGx9QU+7cbq+e1qZPMWns="; + }) ]; nativeBuildInputs = [