mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-23 10:34:43 +01:00
move loopback util
This commit is contained in:
@@ -107,7 +107,7 @@ using Emby.Server.Implementations.Playlists;
|
||||
using Emby.Server.Implementations;
|
||||
using Emby.Server.Implementations.ServerManager;
|
||||
using Emby.Server.Implementations.Session;
|
||||
using Emby.Server.Implementations.Social;
|
||||
using Emby.Server.Implementations.Windows;
|
||||
using Emby.Server.Implementations.TV;
|
||||
using Emby.Server.Implementations.Updates;
|
||||
using MediaBrowser.Model.Activity;
|
||||
@@ -796,17 +796,25 @@ namespace Emby.Server.Core
|
||||
info.FFMpegFilename = "ffmpeg";
|
||||
info.FFProbeFilename = "ffprobe";
|
||||
info.ArchiveType = "7z";
|
||||
info.Version = "20160215";
|
||||
info.Version = "20170308";
|
||||
info.DownloadUrls = GetLinuxDownloadUrls();
|
||||
}
|
||||
else if (EnvironmentInfo.OperatingSystem == MediaBrowser.Model.System.OperatingSystem.Windows)
|
||||
{
|
||||
info.FFMpegFilename = "ffmpeg.exe";
|
||||
info.FFProbeFilename = "ffprobe.exe";
|
||||
info.Version = "20160410";
|
||||
info.Version = "20170308";
|
||||
info.ArchiveType = "7z";
|
||||
info.DownloadUrls = GetWindowsDownloadUrls();
|
||||
}
|
||||
else if (EnvironmentInfo.OperatingSystem == MediaBrowser.Model.System.OperatingSystem.OSX)
|
||||
{
|
||||
info.FFMpegFilename = "ffmpeg";
|
||||
info.FFProbeFilename = "ffprobe";
|
||||
info.ArchiveType = "7z";
|
||||
info.Version = "20170308";
|
||||
info.DownloadUrls = GetMacDownloadUrls();
|
||||
}
|
||||
else
|
||||
{
|
||||
// No version available - user requirement
|
||||
@@ -816,6 +824,20 @@ namespace Emby.Server.Core
|
||||
return info;
|
||||
}
|
||||
|
||||
private string[] GetMacDownloadUrls()
|
||||
{
|
||||
switch (EnvironmentInfo.SystemArchitecture)
|
||||
{
|
||||
case Architecture.X64:
|
||||
return new[]
|
||||
{
|
||||
"https://embydata.com/downloads/ffmpeg/osx/ffmpeg-x64-20170308.7z"
|
||||
};
|
||||
}
|
||||
|
||||
return new string[] { };
|
||||
}
|
||||
|
||||
private string[] GetWindowsDownloadUrls()
|
||||
{
|
||||
switch (EnvironmentInfo.SystemArchitecture)
|
||||
@@ -823,12 +845,12 @@ namespace Emby.Server.Core
|
||||
case Architecture.X64:
|
||||
return new[]
|
||||
{
|
||||
"https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/windows/ffmpeg-20160410-win64.7z"
|
||||
"https://embydata.com/downloads/ffmpeg/windows/ffmpeg-20170308-win64.7z"
|
||||
};
|
||||
case Architecture.X86:
|
||||
return new[]
|
||||
{
|
||||
"https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/windows/ffmpeg-20160410-win32.7z"
|
||||
"https://embydata.com/downloads/ffmpeg/windows/ffmpeg-20170308-win32.7z"
|
||||
};
|
||||
}
|
||||
|
||||
@@ -842,12 +864,12 @@ namespace Emby.Server.Core
|
||||
case Architecture.X64:
|
||||
return new[]
|
||||
{
|
||||
"https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/linux/ffmpeg-git-20160215-64bit-static.7z"
|
||||
"https://embydata.com/downloads/ffmpeg/linux/ffmpeg-git-20170301-64bit-static.7z"
|
||||
};
|
||||
case Architecture.X86:
|
||||
return new[]
|
||||
{
|
||||
"https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/linux/ffmpeg-git-20160215-32bit-static.7z"
|
||||
"https://embydata.com/downloads/ffmpeg/linux/ffmpeg-git-20170301-32bit-static.7z"
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1716,12 +1738,10 @@ namespace Emby.Server.Core
|
||||
|
||||
public void EnableLoopback(string appName)
|
||||
{
|
||||
EnableLoopbackInternal(appName);
|
||||
}
|
||||
|
||||
protected virtual void EnableLoopbackInternal(string appName)
|
||||
{
|
||||
|
||||
if (EnvironmentInfo.OperatingSystem == MediaBrowser.Model.System.OperatingSystem.Windows)
|
||||
{
|
||||
LoopUtil.Run(appName);
|
||||
}
|
||||
}
|
||||
|
||||
private void RegisterModules()
|
||||
|
||||
Reference in New Issue
Block a user