mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-30 12:28:27 +01:00
moved a few things for mono
This commit is contained in:
36
MediaBrowser.Server.Mono/FFMpeg/FFMpegDownloader.cs
Normal file
36
MediaBrowser.Server.Mono/FFMpeg/FFMpegDownloader.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using MediaBrowser.Common.Configuration;
|
||||
using MediaBrowser.Common.IO;
|
||||
using MediaBrowser.Common.Net;
|
||||
using MediaBrowser.Model.IO;
|
||||
using MediaBrowser.Model.Logging;
|
||||
using MediaBrowser.Model.Net;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MediaBrowser.ServerApplication.FFMpeg
|
||||
{
|
||||
public class FFMpegDownloader
|
||||
{
|
||||
private readonly IHttpClient _httpClient;
|
||||
private readonly IApplicationPaths _appPaths;
|
||||
private readonly ILogger _logger;
|
||||
private readonly IZipClient _zipClient;
|
||||
|
||||
public FFMpegDownloader(ILogger logger, IApplicationPaths appPaths, IHttpClient httpClient, IZipClient zipClient)
|
||||
{
|
||||
_logger = logger;
|
||||
_appPaths = appPaths;
|
||||
_httpClient = httpClient;
|
||||
_zipClient = zipClient;
|
||||
}
|
||||
|
||||
public Task<FFMpegInfo> GetFFMpegInfo()
|
||||
{
|
||||
return Task.FromResult (new FFMpegInfo());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -40,6 +40,9 @@
|
||||
<Reference Include="glade-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
|
||||
<Reference Include="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
|
||||
<Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Data" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="gtk-gui\gui.stetic">
|
||||
@@ -52,6 +55,25 @@
|
||||
<Compile Include="gtk-gui\MainWindow.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="..\MediaBrowser.ServerApplication\EntryPoints\StartupWizard.cs">
|
||||
<Link>EntryPoints\StartupWizard.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\MediaBrowser.ServerApplication\Native\BrowserLauncher.cs">
|
||||
<Link>Native\BrowserLauncher.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="Native\Autorun.cs" />
|
||||
<Compile Include="Native\ServerAuthorization.cs" />
|
||||
<Compile Include="FFMpeg\FFMpegDownloader.cs" />
|
||||
<Compile Include="..\MediaBrowser.ServerApplication\FFMpeg\FFMpegInfo.cs">
|
||||
<Link>FFMpeg\FFMpegInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\MediaBrowser.ServerApplication\ApplicationHost.cs">
|
||||
<Link>ApplicationHost.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="Native\HttpMessageHandlerFactory.cs" />
|
||||
<Compile Include="Native\Assemblies.cs" />
|
||||
<Compile Include="Native\Sqlite.cs" />
|
||||
<Compile Include="Native\NativeApp.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
@@ -88,4 +110,10 @@
|
||||
<Name>MediaBrowser.Api</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="EntryPoints\" />
|
||||
<Folder Include="Implementations\" />
|
||||
<Folder Include="Native\" />
|
||||
<Folder Include="FFMpeg\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
22
MediaBrowser.Server.Mono/Native/Assemblies.cs
Normal file
22
MediaBrowser.Server.Mono/Native/Assemblies.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
namespace MediaBrowser.ServerApplication.Native
|
||||
{
|
||||
/// <summary>
|
||||
/// Class Assemblies
|
||||
/// </summary>
|
||||
public static class Assemblies
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the assemblies with parts.
|
||||
/// </summary>
|
||||
/// <returns>List{Assembly}.</returns>
|
||||
public static List<Assembly> GetAssembliesWithParts()
|
||||
{
|
||||
var list = new List<Assembly>();
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
20
MediaBrowser.Server.Mono/Native/Autorun.cs
Normal file
20
MediaBrowser.Server.Mono/Native/Autorun.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace MediaBrowser.ServerApplication.Native
|
||||
{
|
||||
/// <summary>
|
||||
/// Class Autorun
|
||||
/// </summary>
|
||||
public static class Autorun
|
||||
{
|
||||
/// <summary>
|
||||
/// Configures the specified autorun.
|
||||
/// </summary>
|
||||
/// <param name="autorun">if set to <c>true</c> [autorun].</param>
|
||||
public static void Configure(bool autorun)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
25
MediaBrowser.Server.Mono/Native/HttpMessageHandlerFactory.cs
Normal file
25
MediaBrowser.Server.Mono/Native/HttpMessageHandlerFactory.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System.Net;
|
||||
using System.Net.Cache;
|
||||
using System.Net.Http;
|
||||
|
||||
namespace MediaBrowser.ServerApplication.Native
|
||||
{
|
||||
/// <summary>
|
||||
/// Class HttpMessageHandlerFactory
|
||||
/// </summary>
|
||||
public static class HttpMessageHandlerFactory
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the HTTP message handler.
|
||||
/// </summary>
|
||||
/// <param name="enableHttpCompression">if set to <c>true</c> [enable HTTP compression].</param>
|
||||
/// <returns>HttpMessageHandler.</returns>
|
||||
public static HttpMessageHandler GetHttpMessageHandler(bool enableHttpCompression)
|
||||
{
|
||||
return new HttpClientHandler
|
||||
{
|
||||
AutomaticDecompression = enableHttpCompression ? DecompressionMethods.Deflate : DecompressionMethods.None
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
25
MediaBrowser.Server.Mono/Native/NativeApp.cs
Normal file
25
MediaBrowser.Server.Mono/Native/NativeApp.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
namespace MediaBrowser.ServerApplication.Native
|
||||
{
|
||||
/// <summary>
|
||||
/// Class NativeApp
|
||||
/// </summary>
|
||||
public static class NativeApp
|
||||
{
|
||||
/// <summary>
|
||||
/// Shutdowns this instance.
|
||||
/// </summary>
|
||||
public static void Shutdown()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restarts this instance.
|
||||
/// </summary>
|
||||
public static void Restart()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
26
MediaBrowser.Server.Mono/Native/ServerAuthorization.cs
Normal file
26
MediaBrowser.Server.Mono/Native/ServerAuthorization.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace MediaBrowser.ServerApplication.Native
|
||||
{
|
||||
/// <summary>
|
||||
/// Class Authorization
|
||||
/// </summary>
|
||||
public static class ServerAuthorization
|
||||
{
|
||||
/// <summary>
|
||||
/// Authorizes the server.
|
||||
/// </summary>
|
||||
/// <param name="httpServerPort">The HTTP server port.</param>
|
||||
/// <param name="httpServerUrlPrefix">The HTTP server URL prefix.</param>
|
||||
/// <param name="webSocketPort">The web socket port.</param>
|
||||
/// <param name="udpPort">The UDP port.</param>
|
||||
/// <param name="tempDirectory">The temp directory.</param>
|
||||
public static void AuthorizeServer(int httpServerPort, string httpServerUrlPrefix, int webSocketPort, int udpPort, string tempDirectory)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
36
MediaBrowser.Server.Mono/Native/Sqlite.cs
Normal file
36
MediaBrowser.Server.Mono/Native/Sqlite.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Data;
|
||||
using System.Data.SQLite;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MediaBrowser.ServerApplication.Native
|
||||
{
|
||||
/// <summary>
|
||||
/// Class Sqlite
|
||||
/// </summary>
|
||||
public static class Sqlite
|
||||
{
|
||||
/// <summary>
|
||||
/// Connects to db.
|
||||
/// </summary>
|
||||
/// <param name="dbPath">The db path.</param>
|
||||
/// <returns>Task{IDbConnection}.</returns>
|
||||
/// <exception cref="System.ArgumentNullException">dbPath</exception>
|
||||
public static async Task<IDbConnection> OpenDatabase(string dbPath)
|
||||
{
|
||||
var connectionstr = new SQLiteConnectionStringBuilder
|
||||
{
|
||||
PageSize = 4096,
|
||||
CacheSize = 4096,
|
||||
SyncMode = SynchronizationModes.Normal,
|
||||
DataSource = dbPath,
|
||||
JournalMode = SQLiteJournalModeEnum.Wal
|
||||
};
|
||||
|
||||
var connection = new SQLiteConnection(connectionstr.ConnectionString);
|
||||
|
||||
await connection.OpenAsync().ConfigureAwait(false);
|
||||
|
||||
return connection;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<stetic-interface>
|
||||
<configuration>
|
||||
<images-root-path>..</images-root-path>
|
||||
<target-gtk-version>2.12</target-gtk-version>
|
||||
</configuration>
|
||||
<import>
|
||||
|
||||
Reference in New Issue
Block a user