nicknsy / jellyscrub

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

[Enhancement] Friendly error show up on plugin UI #24

Open davidngrc opened 2 years ago

davidngrc commented 2 years ago

After I install the Jellyscrub. I see the bif is created, but I just can't see them on the web UI. so I did some search on the log, and it shows this

[2022-08-06 16:36:40.533 +00:00] [ERR] Encountered exception while writing to "/usr/share/jellyfin/web/index.html": "System.UnauthorizedAccessException: Access to the path '/usr/share/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, Func2 errorRewriter) at Interop.CheckIo(Error error, String path, Boolean isDirectory, Func2 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, ILogger1 logger)" [2022-08-06 16:36:40.533 +00:00] [INF] Loaded plugin: "Jellyscrub" "1.0.0.4" `

I think it might be more friendly if this kind of error is show up in the plugin UI, so people know there is an error right away, no need to dig deep into the logs.