jellyfin-media-player: fix broken UI (#363612)

This commit is contained in:
misuzu
2024-12-31 16:23:34 +02:00
committed by GitHub
2 changed files with 48 additions and 2 deletions
@@ -21,6 +21,7 @@
, qtwebchannel
, qtwebengine
, qtx11extras
, jellyfin-web
, withDbus ? stdenv.hostPlatform.isLinux
}:
@@ -36,6 +37,8 @@ mkDerivation rec {
};
patches = [
# fix the location of the jellyfin-web path
./fix-web-path.patch
# disable update notifications since the end user can't simply download the release artifacts to update
./disable-update-notifications.patch
];
@@ -74,7 +77,12 @@ mkDerivation rec {
"-DLINUX_X11POWER=ON"
];
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
preConfigure = ''
# link the jellyfin-web files to be copied by cmake (see fix-web-path.patch)
ln -s ${jellyfin-web}/share/jellyfin-web .
'';
postInstall = lib.optionalString stdenv.isDarwin ''
mkdir -p $out/bin $out/Applications
mv "$out/Jellyfin Media Player.app" $out/Applications
ln -s "$out/Applications/Jellyfin Media Player.app/Contents/MacOS/Jellyfin Media Player" $out/bin/jellyfinmediaplayer
@@ -85,7 +93,7 @@ mkDerivation rec {
description = "Jellyfin Desktop Client based on Plex Media Player";
license = with licenses; [ gpl2Only mit ];
platforms = [ "aarch64-linux" "x86_64-linux" "aarch64-darwin" "x86_64-darwin" ];
maintainers = with maintainers; [ jojosch kranzes ];
maintainers = with maintainers; [ jojosch kranzes paumr ];
mainProgram = "jellyfinmediaplayer";
};
}
@@ -0,0 +1,38 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9df49da..be1c479 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -106,7 +106,8 @@ endif()
set(RESOURCE_ROOT .)
if(APPLE)
set(RESOURCE_ROOT Resources)
- add_resources(TARGET ${MAIN_TARGET} SOURCES ${CMAKE_SOURCE_DIR}/native/ DEST ${RESOURCE_ROOT}/web-client/extension)
+ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../../jellyfin-web/ DESTINATION ${RESOURCE_ROOT}/web-client/desktop)
+ install(DIRECTORY ${CMAKE_SOURCE_DIR}/native/ DESTINATION ${RESOURCE_ROOT}/web-client/extension)
endif()
if(NOT APPLE)
@@ -119,6 +120,7 @@ if(NOT APPLE)
install(FILES ${loc}/qtwebengine_devtools_resources.pak DESTINATION resources)
endif()
endforeach()
+ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../../jellyfin-web/ DESTINATION ${INSTALL_RESOURCE_DIR}/web-client/desktop)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/native/ DESTINATION ${INSTALL_RESOURCE_DIR}/web-client/extension)
endif()
diff --git a/src/settings/SettingsComponent.cpp b/src/settings/SettingsComponent.cpp
index c398523..7023948 100644
--- a/src/settings/SettingsComponent.cpp
+++ b/src/settings/SettingsComponent.cpp
@@ -748,7 +748,7 @@ QString SettingsComponent::getWebClientUrl(bool desktop)
if (url == "bundled")
{
- auto path = Paths::webExtensionPath() + "find-webclient.html";
+ auto path = Paths::webClientPath("desktop");
url = "file:///" + path;
}
--
2.36.0