aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Mono
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Server.Mono')
-rw-r--r--MediaBrowser.Server.Mono/FFMpeg/FFMpegDownloadInfo.cs57
-rw-r--r--MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj8
-rw-r--r--MediaBrowser.Server.Mono/Program.cs4
3 files changed, 56 insertions, 13 deletions
diff --git a/MediaBrowser.Server.Mono/FFMpeg/FFMpegDownloadInfo.cs b/MediaBrowser.Server.Mono/FFMpeg/FFMpegDownloadInfo.cs
index 970e5a3e0..7cb7278dc 100644
--- a/MediaBrowser.Server.Mono/FFMpeg/FFMpegDownloadInfo.cs
+++ b/MediaBrowser.Server.Mono/FFMpeg/FFMpegDownloadInfo.cs
@@ -1,20 +1,57 @@
-
+using System;
+
namespace MediaBrowser.ServerApplication.FFMpeg
{
public static class FFMpegDownloadInfo
{
- public static string Version = "ffmpeg20130904";
+ public static string Version = ffmpegOsType("Version");
- public static string[] FfMpegUrls = new[]
- {
- "http://ffmpeg.gusari.org/static/32bit/ffmpeg.static.32bit.2013-10-11.tar.gz",
+ public static string[] FfMpegUrls = ffmpegOsType("FfMpegUrls").Split(',');
- "https://www.dropbox.com/s/b9v17h105cps7p0/ffmpeg.static.32bit.2013-10-11.tar.gz?dl=1"
- };
+ public static string FFMpegFilename = ffmpegOsType("FFMpegFilename");
+ public static string FFProbeFilename = ffmpegOsType("FFProbeFilename");
- public static string FFMpegFilename = "ffmpeg";
- public static string FFProbeFilename = "ffprobe";
+ public static string ArchiveType = ffmpegOsType("ArchiveType");
- public static string ArchiveType = "gz";
+ private static string ffmpegOsType(string arg)
+ {
+ OperatingSystem os = Environment.OSVersion;
+ PlatformID pid = os.Platform;
+ switch (pid)
+ {
+ case PlatformID.Win32NT:
+ switch (arg)
+ {
+ case "Version":
+ return "ffmpeg20131221";
+ case "FfMpegUrls":
+ return "http://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-20131221-git-70d6ce7-win32-static.7z,https://www.dropbox.com/s/d38uj7857trbw1g/ffmpeg-20131209-git-a12f679-win32-static.7z?dl=1";
+ case "FFMpegFilename":
+ return "ffmpeg.exe";
+ case "FFProbeFilename":
+ return "ffprobe.exe";
+ case "ArchiveType":
+ return "7z";
+ }
+ break;
+ case PlatformID.Unix:
+ case PlatformID.MacOSX:
+ switch (arg)
+ {
+ case "Version":
+ return "ffmpeg20131221";
+ case "FfMpegUrls":
+ return "http://ffmpeg.gusari.org/static/32bit/ffmpeg.static.32bit.2013-12-21.tar.gz,https://www.dropbox.com/s/b9v17h105cps7p0/ffmpeg.static.32bit.2013-10-11.tar.gz?dl=1";
+ case "FFMpegFilename":
+ return "ffmpeg";
+ case "FFProbeFilename":
+ return "ffprobe";
+ case "ArchiveType":
+ return "gz";
+ }
+ break;
+ }
+ return "";
+ }
}
}
diff --git a/MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj b/MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj
index 39321876c..d37330821 100644
--- a/MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj
+++ b/MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj
@@ -50,6 +50,7 @@
<Reference Include="ServiceStack.Interfaces">
<HintPath>..\ThirdParty\ServiceStack\ServiceStack.Interfaces.dll</HintPath>
</Reference>
+ <Reference Include="Mono.Posix" Condition=" '$(ConfigurationName)' == 'Release Mono' "/>
</ItemGroup>
<ItemGroup>
<Compile Include="..\SharedVersion.cs">
@@ -127,8 +128,11 @@
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
- <None Include="sqlite3.dll">
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="..\ThirdParty\SQLite3\x86\3.8.2\sqlite3.dll">
+ <Link>sqlite3.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </None>
+ </Content>
</ItemGroup>
</Project> \ No newline at end of file
diff --git a/MediaBrowser.Server.Mono/Program.cs b/MediaBrowser.Server.Mono/Program.cs
index cf0b4c6d7..59fc11c07 100644
--- a/MediaBrowser.Server.Mono/Program.cs
+++ b/MediaBrowser.Server.Mono/Program.cs
@@ -102,7 +102,9 @@ namespace MediaBrowser.Server.Mono
Console.WriteLine ("appHost.Init");
- var task = _appHost.Init();
+ var initProgress = new Progress<double>();
+
+ var task = _appHost.Init(initProgress);
Task.WaitAll (task);
Console.WriteLine ("Running startup tasks");