mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
This commit is contained in:
commit
599e54caf1
@ -431,6 +431,22 @@ namespace MediaBrowser.Server.Implementations.MediaEncoder
|
|||||||
|
|
||||||
cancellationToken.ThrowIfCancellationRequested();
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
|
|
||||||
|
if (result.streams != null)
|
||||||
|
{
|
||||||
|
// Normalize aspect ratio if invalid
|
||||||
|
foreach (var stream in result.streams)
|
||||||
|
{
|
||||||
|
if (string.Equals(stream.display_aspect_ratio, "0:1", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
stream.display_aspect_ratio = string.Empty;
|
||||||
|
}
|
||||||
|
if (string.Equals(stream.sample_aspect_ratio, "0:1", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
stream.sample_aspect_ratio = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (extractChapters && !string.IsNullOrEmpty(standardError))
|
if (extractChapters && !string.IsNullOrEmpty(standardError))
|
||||||
{
|
{
|
||||||
AddChapters(result, standardError);
|
AddChapters(result, standardError);
|
||||||
|
@ -24,12 +24,27 @@ namespace MediaBrowser.ServerApplication
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class App : Application
|
public partial class App : Application
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The single instance mutex
|
||||||
|
/// </summary>
|
||||||
|
private static Mutex _singleInstanceMutex;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines the entry point of the application.
|
/// Defines the entry point of the application.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[STAThread]
|
[STAThread]
|
||||||
public static void Main()
|
public static void Main()
|
||||||
{
|
{
|
||||||
|
bool createdNew;
|
||||||
|
|
||||||
|
_singleInstanceMutex = new Mutex(true, @"Local\" + typeof(App).Assembly.GetName().Name, out createdNew);
|
||||||
|
|
||||||
|
if (!createdNew)
|
||||||
|
{
|
||||||
|
_singleInstanceMutex = null;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Look for the existence of an update archive
|
// Look for the existence of an update archive
|
||||||
var appPaths = new ServerApplicationPaths();
|
var appPaths = new ServerApplicationPaths();
|
||||||
var updateArchive = Path.Combine(appPaths.TempUpdatePath, Constants.MbServerPkgName + ".zip");
|
var updateArchive = Path.Combine(appPaths.TempUpdatePath, Constants.MbServerPkgName + ".zip");
|
||||||
@ -66,11 +81,6 @@ namespace MediaBrowser.ServerApplication
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The single instance mutex
|
|
||||||
/// </summary>
|
|
||||||
private Mutex SingleInstanceMutex;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the logger.
|
/// Gets or sets the logger.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -107,15 +117,6 @@ namespace MediaBrowser.ServerApplication
|
|||||||
/// <param name="e">A <see cref="T:System.Windows.StartupEventArgs" /> that contains the event data.</param>
|
/// <param name="e">A <see cref="T:System.Windows.StartupEventArgs" /> that contains the event data.</param>
|
||||||
protected override void OnStartup(StartupEventArgs e)
|
protected override void OnStartup(StartupEventArgs e)
|
||||||
{
|
{
|
||||||
bool createdNew;
|
|
||||||
SingleInstanceMutex = new Mutex(true, @"Local\" + GetType().Assembly.GetName().Name, out createdNew);
|
|
||||||
if (!createdNew)
|
|
||||||
{
|
|
||||||
SingleInstanceMutex = null;
|
|
||||||
Shutdown();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
|
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
|
||||||
LoadKernel();
|
LoadKernel();
|
||||||
|
|
||||||
@ -190,7 +191,10 @@ namespace MediaBrowser.ServerApplication
|
|||||||
|
|
||||||
base.OnExit(e);
|
base.OnExit(e);
|
||||||
|
|
||||||
CompositionRoot.Dispose();
|
if (CompositionRoot != null)
|
||||||
|
{
|
||||||
|
CompositionRoot.Dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -198,15 +202,15 @@ namespace MediaBrowser.ServerApplication
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void ReleaseMutex()
|
private void ReleaseMutex()
|
||||||
{
|
{
|
||||||
if (SingleInstanceMutex == null)
|
if (_singleInstanceMutex == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SingleInstanceMutex.ReleaseMutex();
|
_singleInstanceMutex.ReleaseMutex();
|
||||||
SingleInstanceMutex.Close();
|
_singleInstanceMutex.Close();
|
||||||
SingleInstanceMutex.Dispose();
|
_singleInstanceMutex.Dispose();
|
||||||
SingleInstanceMutex = null;
|
_singleInstanceMutex = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
WindowStyle="None"
|
WindowStyle="None"
|
||||||
ShowInTaskbar="False">
|
ShowInTaskbar="False">
|
||||||
<Grid>
|
<Grid>
|
||||||
<tb:TaskbarIcon Name="MbTaskbarIcon" ToolTipText="Media Browser Server">
|
<tb:TaskbarIcon Name="MbTaskbarIcon" ToolTipText="Media Browser Server" IconSource="/Resources/Images/icon.ico">
|
||||||
|
|
||||||
<tb:TaskbarIcon.ContextMenu>
|
<tb:TaskbarIcon.ContextMenu>
|
||||||
<ContextMenu Background="White">
|
<ContextMenu Background="White">
|
||||||
@ -35,32 +35,6 @@
|
|||||||
</ContextMenu>
|
</ContextMenu>
|
||||||
</tb:TaskbarIcon.ContextMenu>
|
</tb:TaskbarIcon.ContextMenu>
|
||||||
|
|
||||||
<tb:TaskbarIcon.Style>
|
|
||||||
<Style TargetType="{x:Type tb:TaskbarIcon}">
|
|
||||||
<Setter Property="IconSource" Value="/Resources/Images/icon.ico" />
|
|
||||||
<Style.Triggers>
|
|
||||||
<DataTrigger Binding="{Binding LoadingImageIndex}" Value="1">
|
|
||||||
<Setter Property="IconSource" Value="/Resources/Images/Loading/1.ico" />
|
|
||||||
</DataTrigger>
|
|
||||||
<DataTrigger Binding="{Binding LoadingImageIndex}" Value="2">
|
|
||||||
<Setter Property="IconSource" Value="/Resources/Images/Loading/2.ico" />
|
|
||||||
</DataTrigger>
|
|
||||||
<DataTrigger Binding="{Binding LoadingImageIndex}" Value="3">
|
|
||||||
<Setter Property="IconSource" Value="/Resources/Images/Loading/3.ico" />
|
|
||||||
</DataTrigger>
|
|
||||||
<DataTrigger Binding="{Binding LoadingImageIndex}" Value="4">
|
|
||||||
<Setter Property="IconSource" Value="/Resources/Images/Loading/4.ico" />
|
|
||||||
</DataTrigger>
|
|
||||||
<DataTrigger Binding="{Binding LoadingImageIndex}" Value="5">
|
|
||||||
<Setter Property="IconSource" Value="/Resources/Images/Loading/5.ico" />
|
|
||||||
</DataTrigger>
|
|
||||||
<DataTrigger Binding="{Binding LoadingImageIndex}" Value="6">
|
|
||||||
<Setter Property="IconSource" Value="/Resources/Images/Loading/6.ico" />
|
|
||||||
</DataTrigger>
|
|
||||||
</Style.Triggers>
|
|
||||||
</Style>
|
|
||||||
</tb:TaskbarIcon.Style>
|
|
||||||
|
|
||||||
</tb:TaskbarIcon>
|
</tb:TaskbarIcon>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
@ -333,14 +333,6 @@
|
|||||||
<Resource Include="Resources\Images\mblogoblackfull.png" />
|
<Resource Include="Resources\Images\mblogoblackfull.png" />
|
||||||
<Resource Include="Resources\Images\mblogowhitefull.png" />
|
<Resource Include="Resources\Images\mblogowhitefull.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<Resource Include="Resources\Images\Loading\1.ico" />
|
|
||||||
<Resource Include="Resources\Images\Loading\2.ico" />
|
|
||||||
<Resource Include="Resources\Images\Loading\3.ico" />
|
|
||||||
<Resource Include="Resources\Images\Loading\4.ico" />
|
|
||||||
<Resource Include="Resources\Images\Loading\5.ico" />
|
|
||||||
<Resource Include="Resources\Images\Loading\6.ico" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<BootstrapperPackage Include=".NETFramework,Version=v4.5">
|
<BootstrapperPackage Include=".NETFramework,Version=v4.5">
|
||||||
<Visible>False</Visible>
|
<Visible>False</Visible>
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 148 KiB |
Binary file not shown.
Before Width: | Height: | Size: 148 KiB |
Binary file not shown.
Before Width: | Height: | Size: 149 KiB |
Binary file not shown.
Before Width: | Height: | Size: 150 KiB |
Binary file not shown.
Before Width: | Height: | Size: 151 KiB |
Binary file not shown.
Before Width: | Height: | Size: 150 KiB |
Loading…
x
Reference in New Issue
Block a user