mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-27 18:10:54 +01:00
Removed unused properties from BaseItem.
This commit is contained in:
@@ -5,13 +5,12 @@
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProductVersion>10.0.0</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{A7FE75CD-3CB4-4E71-A5BF-5347721EC8E0}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<ProjectGuid>{175A9388-F352-4586-A6B4-070DED62B644}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>MediaBrowser.Server.Mono</RootNamespace>
|
||||
<AssemblyName>MediaBrowser.Server.Mono</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<StartupObject>MediaBrowser.Server.Mono.MainClass</StartupObject>
|
||||
<ApplicationIcon>..\MediaBrowser.ServerApplication\Resources\Images\Icon.ico</ApplicationIcon>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -22,7 +21,7 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<Externalconsole>true</Externalconsole>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<DebugType>full</DebugType>
|
||||
@@ -31,20 +30,10 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<Externalconsole>true</Externalconsole>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
|
||||
<Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
|
||||
<Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
|
||||
<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" />
|
||||
<Reference Include="Mono.Posix" />
|
||||
<Reference Include="ServiceStack.Common">
|
||||
<HintPath>..\packages\ServiceStack.Common.3.9.70\lib\net35\ServiceStack.Common.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -52,18 +41,10 @@
|
||||
<HintPath>..\packages\ServiceStack.Common.3.9.70\lib\net35\ServiceStack.Interfaces.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="gtk-gui\gui.stetic">
|
||||
<LogicalName>gui.stetic</LogicalName>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\SharedVersion.cs">
|
||||
<Link>Properties\SharedVersion.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="gtk-gui\generated.cs" />
|
||||
<Compile Include="MainWindow.cs" />
|
||||
<Compile Include="gtk-gui\MainWindow.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="..\MediaBrowser.ServerApplication\EntryPoints\StartupWizard.cs">
|
||||
@@ -133,9 +114,6 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="tray.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="sqlite3.dll">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
|
||||
@@ -14,8 +14,6 @@ using System.Windows;
|
||||
using System.Net;
|
||||
using System.Net.Security;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using Gtk;
|
||||
using Gdk;
|
||||
using System.Threading.Tasks;
|
||||
using System.Reflection;
|
||||
|
||||
@@ -27,15 +25,8 @@ namespace MediaBrowser.Server.Mono
|
||||
|
||||
private static ILogger _logger;
|
||||
|
||||
private static MainWindow _mainWindow;
|
||||
|
||||
// The tray Icon
|
||||
private static StatusIcon trayIcon;
|
||||
|
||||
public static void Main (string[] args)
|
||||
{
|
||||
Application.Init ();
|
||||
|
||||
var applicationPath = Assembly.GetEntryAssembly ().Location;
|
||||
|
||||
var appPaths = CreateApplicationPaths(applicationPath);
|
||||
@@ -98,10 +89,10 @@ namespace MediaBrowser.Server.Mono
|
||||
|
||||
private static RemoteCertificateValidationCallback _ignoreCertificates = new RemoteCertificateValidationCallback(delegate { return true; });
|
||||
|
||||
private static TaskCompletionSource<bool> _applicationTaskCompletionSource = new TaskCompletionSource<bool>();
|
||||
|
||||
private static void RunApplication(ServerApplicationPaths appPaths, ILogManager logManager)
|
||||
{
|
||||
// TODO: Show splash here
|
||||
|
||||
SystemEvents.SessionEnding += SystemEvents_SessionEnding;
|
||||
|
||||
// Allow all https requests
|
||||
@@ -109,77 +100,19 @@ namespace MediaBrowser.Server.Mono
|
||||
|
||||
_appHost = new ApplicationHost(appPaths, logManager);
|
||||
|
||||
Console.WriteLine ("appHost.Init");
|
||||
|
||||
var task = _appHost.Init();
|
||||
Task.WaitAll (task);
|
||||
|
||||
Console.WriteLine ("Running startup tasks");
|
||||
|
||||
task = _appHost.RunStartupTasks();
|
||||
Task.WaitAll (task);
|
||||
|
||||
// TODO: Hide splash here
|
||||
_mainWindow = new MainWindow ();
|
||||
task = _applicationTaskCompletionSource.Task;
|
||||
|
||||
// Creation of the Icon
|
||||
// Creation of the Icon
|
||||
trayIcon = new StatusIcon(new Pixbuf ("tray.png"));
|
||||
trayIcon.Visible = true;
|
||||
|
||||
// When the TrayIcon has been clicked.
|
||||
trayIcon.Activate += delegate { };
|
||||
// Show a pop up menu when the icon has been right clicked.
|
||||
trayIcon.PopupMenu += OnTrayIconPopup;
|
||||
|
||||
// A Tooltip for the Icon
|
||||
trayIcon.Tooltip = "Media Browser Server";
|
||||
|
||||
_mainWindow.ShowAll ();
|
||||
_mainWindow.Visible = false;
|
||||
|
||||
Application.Run ();
|
||||
}
|
||||
|
||||
// Create the popup menu, on right click.
|
||||
static void OnTrayIconPopup (object o, EventArgs args) {
|
||||
|
||||
Menu popupMenu = new Menu();
|
||||
|
||||
var menuItemBrowse = new ImageMenuItem ("Browse Library");
|
||||
menuItemBrowse.Image = new Gtk.Image(Stock.MediaPlay, IconSize.Menu);
|
||||
popupMenu.Add(menuItemBrowse);
|
||||
menuItemBrowse.Activated += delegate {
|
||||
BrowserLauncher.OpenWebClient(_appHost.UserManager, _appHost.ServerConfigurationManager, _appHost, _logger);
|
||||
};
|
||||
|
||||
var menuItemConfigure = new ImageMenuItem ("Configure Media Browser");
|
||||
menuItemConfigure.Image = new Gtk.Image(Stock.Edit, IconSize.Menu);
|
||||
popupMenu.Add(menuItemConfigure);
|
||||
menuItemConfigure.Activated += delegate {
|
||||
BrowserLauncher.OpenDashboard(_appHost.UserManager, _appHost.ServerConfigurationManager, _appHost, _logger);
|
||||
};
|
||||
|
||||
var menuItemApi = new ImageMenuItem ("View Api Docs");
|
||||
menuItemApi.Image = new Gtk.Image(Stock.Network, IconSize.Menu);
|
||||
popupMenu.Add(menuItemApi);
|
||||
menuItemApi.Activated += delegate {
|
||||
BrowserLauncher.OpenSwagger(_appHost.ServerConfigurationManager, _appHost, _logger);
|
||||
};
|
||||
|
||||
var menuItemCommunity = new ImageMenuItem ("Visit Community");
|
||||
menuItemCommunity.Image = new Gtk.Image(Stock.Help, IconSize.Menu);
|
||||
popupMenu.Add(menuItemCommunity);
|
||||
menuItemCommunity.Activated += delegate { BrowserLauncher.OpenCommunity(_logger); };
|
||||
|
||||
var menuItemGithub = new ImageMenuItem ("Visit Github");
|
||||
menuItemGithub.Image = new Gtk.Image(Stock.Network, IconSize.Menu);
|
||||
popupMenu.Add(menuItemGithub);
|
||||
menuItemGithub.Activated += delegate { BrowserLauncher.OpenGithub(_logger); };
|
||||
|
||||
var menuItemQuit = new ImageMenuItem ("Exit");
|
||||
menuItemQuit.Image = new Gtk.Image(Stock.Quit, IconSize.Menu);
|
||||
popupMenu.Add(menuItemQuit);
|
||||
menuItemQuit.Activated += delegate { Shutdown(); };
|
||||
|
||||
popupMenu.ShowAll();
|
||||
popupMenu.Popup();
|
||||
Task.WaitAll (task);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -206,8 +139,6 @@ namespace MediaBrowser.Server.Mono
|
||||
|
||||
logger.Info("Server: {0}", Environment.MachineName);
|
||||
logger.Info("Operating system: {0}", Environment.OSVersion.ToString());
|
||||
|
||||
MonoBug11817WorkAround.Apply ();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -237,6 +168,9 @@ namespace MediaBrowser.Server.Mono
|
||||
|
||||
var builder = LogHelper.GetLogMessage(ex);
|
||||
|
||||
Console.WriteLine ("UnhandledException");
|
||||
Console.WriteLine (builder.ToString());
|
||||
|
||||
File.WriteAllText(path, builder.ToString());
|
||||
}
|
||||
|
||||
@@ -253,19 +187,7 @@ namespace MediaBrowser.Server.Mono
|
||||
|
||||
public static void Shutdown()
|
||||
{
|
||||
if (trayIcon != null) {
|
||||
trayIcon.Visible = false;
|
||||
trayIcon.Dispose ();
|
||||
trayIcon = null;
|
||||
}
|
||||
|
||||
if (_mainWindow != null) {
|
||||
_mainWindow.HideAll ();
|
||||
_mainWindow.Dispose ();
|
||||
_mainWindow = null;
|
||||
}
|
||||
|
||||
Application.Quit ();
|
||||
_applicationTaskCompletionSource.SetResult (true);
|
||||
}
|
||||
|
||||
public static void Restart()
|
||||
@@ -285,34 +207,4 @@ namespace MediaBrowser.Server.Mono
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public class MonoBug11817WorkAround
|
||||
{
|
||||
public static void Apply()
|
||||
{
|
||||
var property = typeof(TimeZoneInfo).GetProperty("TimeZoneDirectory", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
|
||||
if (property == null) return;
|
||||
|
||||
var zoneInfo = FindZoneInfoFolder();
|
||||
property.SetValue(null, zoneInfo, new object[0]);
|
||||
}
|
||||
|
||||
public static string FindZoneInfoFolder()
|
||||
{
|
||||
var current = new DirectoryInfo(Directory.GetCurrentDirectory());
|
||||
|
||||
while(current != null)
|
||||
{
|
||||
var zoneinfoTestPath = Path.Combine(current.FullName, "zoneinfo");
|
||||
|
||||
if (Directory.Exists(zoneinfoTestPath))
|
||||
return zoneinfoTestPath;
|
||||
|
||||
current = current.Parent;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,4 +10,7 @@ using System.Runtime.CompilerServices;
|
||||
[assembly: AssemblyProduct ("")]
|
||||
[assembly: AssemblyCopyright ("Luke")]
|
||||
[assembly: AssemblyTrademark ("")]
|
||||
[assembly: AssemblyCulture ("")]
|
||||
[assembly: AssemblyCulture ("")]
|
||||
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
|
||||
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
|
||||
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
|
||||
@@ -8,7 +8,7 @@
|
||||
</nlog>
|
||||
<appSettings>
|
||||
<add key="DebugProgramDataPath" value="ProgramData-Server" />
|
||||
<add key="ReleaseProgramDataPath" value="%ApplicationData%" />
|
||||
<add key="ProgramDataFolderName" value="MediaBrowser-Server" />
|
||||
<add key="ReleaseProgramDataPath" value="" />
|
||||
<add key="ProgramDataFolderName" value="ProgramData-Server" />
|
||||
</appSettings>
|
||||
</configuration>
|
||||
|
||||
Reference in New Issue
Block a user