Merge pull request #327094 from minijackson/kodiPackages-jellyfin-1.0.4

kodiPackages.jellyfin: 1.0.3 -> 1.0.4
This commit is contained in:
Aaron Andersen 2024-07-15 16:04:17 -04:00 committed by GitHub
commit d35e2a3aea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 33 additions and 11 deletions

View File

@ -1,28 +1,35 @@
{ lib, addonDir, buildKodiAddon, fetchFromGitHub, kodi, requests, dateutil, six, kodi-six, signals, websocket }:
{
lib,
addonDir,
buildKodiAddon,
fetchFromGitHub,
kodi,
requests,
dateutil,
six,
kodi-six,
signals,
websocket,
}:
let
python = kodi.pythonPackages.python.withPackages (p: with p; [ pyyaml ]);
in
buildKodiAddon rec {
pname = "jellyfin";
namespace = "plugin.video.jellyfin";
version = "1.0.3";
version = "1.0.4";
src = fetchFromGitHub {
owner = "jellyfin";
repo = "jellyfin-kodi";
rev = "v${version}";
sha256 = "sha256-Uyo8GClJU2/gdk4PeFNnoyvxOhooaxeXN3Wc5YGuCiM=";
sha256 = "sha256-N5ZNGeLf3P4p3RQimSaZteddKjqXE274mWpo7W9xqPs=";
};
nativeBuildInputs = [
python
];
nativeBuildInputs = [ python ];
prePatch = ''
# ZIP does not support timestamps before 1980 - https://bugs.python.org/issue34097
substituteInPlace build.py \
--replace "with zipfile.ZipFile('{}/{}'.format(target, archive_name), 'w') as z:" "with zipfile.ZipFile('{}/{}'.format(target, archive_name), 'w', strict_timestamps=False) as z:"
'';
# ZIP does not support timestamps before 1980 - https://bugs.python.org/issue34097
patches = [ ./no-strict-zip-timestamp.patch ];
buildPhase = ''
${python}/bin/python3 build.py --version=py3

View File

@ -0,0 +1,15 @@
diff --git a/build.py b/build.py
index 148441f3..2aa0f1ea 100755
--- a/build.py
+++ b/build.py
@@ -69,7 +69,9 @@ def zip_files(py_version: str, source: str, target: str, dev: bool) -> None:
"""
archive_name = "plugin.video.jellyfin+{}.zip".format(py_version)
- with zipfile.ZipFile("{}/{}".format(target, archive_name), "w") as z:
+ with zipfile.ZipFile(
+ "{}/{}".format(target, archive_name), "w", strict_timestamps=False
+ ) as z:
for root, dirs, files in os.walk(args.source):
for filename in filter(file_filter, files):
file_path = os.path.join(root, filename)