mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-26 10:44:50 +03:00
Linux fixes:
-Copy PropertyChanged.Fody.dll to Tools/Fody in MediaBrowser.Model.csproj -Check if root for WebSocketServer.FlashAccessPolicyEnabled (port < 1024) -Check resolution value !=0 before SetResolution -Catch _userManager.RefreshUsersMetadata exception when running MB3 for the first time -Fix _appHost.Init() missing argument -FFmpeg: set default and execute permission(766) to ffmpeg and ffprobe -FFmpeg: Detect the OS type and download the correct version -Rename MediaBrowser.WebDashboard/dashboard-ui/scripts/Itemdetailpage.js to itemdetailpage.js
This commit is contained in:
@@ -4,6 +4,9 @@ using MediaBrowser.Common.Net;
|
||||
using MediaBrowser.Model.Logging;
|
||||
using System;
|
||||
using System.Net;
|
||||
#if __MonoCS__
|
||||
using Mono.Unix.Native;
|
||||
#endif
|
||||
|
||||
namespace MediaBrowser.Server.Implementations.WebSocket
|
||||
{
|
||||
@@ -66,6 +69,20 @@ namespace MediaBrowser.Server.Implementations.WebSocket
|
||||
TimeOut = TimeSpan.FromHours(24)
|
||||
};
|
||||
|
||||
#if __MonoCS__
|
||||
//Linux: port below 1024 require root or cap_net_bind_service
|
||||
if (Environment.OSVersion.Platform == PlatformID.Unix || Environment.OSVersion.Platform == PlatformID.MacOSX)
|
||||
{
|
||||
if (Syscall.getuid() == 0)
|
||||
{
|
||||
WebSocketServer.FlashAccessPolicyEnabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
WebSocketServer.FlashAccessPolicyEnabled = false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
WebSocketServer.Start();
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
Reference in New Issue
Block a user