nicknsy / jellyscrub

Smooth mouse-over video scrubbing previews for Jellyfin.
MIT License
660 stars 25 forks source link

Jellyscrub not injecting on Jellyfin Server Flatpak #119

Open BrycensRanch opened 10 months ago

BrycensRanch commented 10 months ago

as the the title states...

Here's Jellyscrub booting up:

[2023-08-26 13:09:51.449 -04:00] [INF] [1] Nick.Plugin.Jellyscrub.JellyscrubPlugin: Attempting to inject trickplay script code in "/app/bin/jellyfin-web/index.html"
[2023-08-26 13:09:51.454 -04:00] [ERR] [1] Nick.Plugin.Jellyscrub.JellyscrubPlugin: Encountered exception while writing to "/app/bin/jellyfin-web/index.html": "System.UnauthorizedAccessException: Access to the path '/app/bin/jellyfin-web/index.html' is denied.
 ---> System.IO.IOException: Permission denied
   --- End of inner exception stack trace ---
   at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
   at System.IO.StreamWriter.ValidateArgsAndOpenPath(String path, Boolean append, Encoding encoding, Int32 bufferSize)
   at System.IO.File.WriteAllText(String path, String contents)
   at Nick.Plugin.Jellyscrub.JellyscrubPlugin..ctor(IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer, ILogger`1 logger, IServerConfigurationManager configurationManager)"
[2023-08-26 13:09:51.454 -04:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "Jellyscrub" "1.1.1.0"
BrycensRanch commented 10 months ago

Btw for reference, it's guessing where the Jellyfin server's files are. I can't point it to the correct folder either, because there is no configuration option.

nicknsy commented 10 months ago

It's not guessing where the web path is, it uses the web path that is set when Jellyfin is launched. If you are hosting the Jellyfin web files using an external web server (e.g. nginx or Apache) then you must manually copy and paste the script tag into the index file as described in the README.

If you are using the internal Jellyfin server to host the web files then the path should be correct, and you should change the ownership of /app/bin/jellyfin-web/index.html to match the user running the Jellyfin process.