Merge remote-tracking branch 'upstream/master' into quickconnect

This commit is contained in:
Matt Montgomery
2020-08-12 15:38:07 -05:00
389 changed files with 28378 additions and 24271 deletions

View File

@@ -52,7 +52,13 @@ namespace MediaBrowser.Model.Configuration
public string PreviousVersionStr
{
get => PreviousVersion?.ToString();
set => PreviousVersion = Version.Parse(value);
set
{
if (Version.TryParse(value, out var version))
{
PreviousVersion = version;
}
}
}
}
}

View File

@@ -259,6 +259,16 @@ namespace MediaBrowser.Model.Configuration
public string[] UninstalledPlugins { get; set; }
/// <summary>
/// Gets or sets a value indicating whether slow server responses should be logged as a warning.
/// </summary>
public bool EnableSlowResponseWarning { get; set; }
/// <summary>
/// Gets or sets the threshold for the slow response time warning in ms.
/// </summary>
public long SlowResponseThresholdMs { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="ServerConfiguration" /> class.
/// </summary>
@@ -365,6 +375,9 @@ namespace MediaBrowser.Model.Configuration
DisabledImageFetchers = new[] { "The Open Movie Database", "TheMovieDb" }
}
};
EnableSlowResponseWarning = true;
SlowResponseThresholdMs = 500;
}
}

View File

@@ -1,6 +1,6 @@
#pragma warning disable CS1591
using MediaBrowser.Model.Entities;
using Jellyfin.Data.Enums;
namespace MediaBrowser.Model.Dlna
{

View File

@@ -1,22 +1,18 @@
#nullable disable
using System.Collections.Generic;
using Jellyfin.Data.Enums;
namespace MediaBrowser.Model.Entities
{
/// <summary>
/// Defines the display preferences for any item that supports them (usually Folders).
/// </summary>
public class DisplayPreferences
public class DisplayPreferencesDto
{
/// <summary>
/// The image scale.
/// Initializes a new instance of the <see cref="DisplayPreferencesDto" /> class.
/// </summary>
private const double ImageScale = .9;
/// <summary>
/// Initializes a new instance of the <see cref="DisplayPreferences" /> class.
/// </summary>
public DisplayPreferences()
public DisplayPreferencesDto()
{
RememberIndexing = false;
PrimaryImageHeight = 250;

View File

@@ -233,7 +233,7 @@ namespace MediaBrowser.Model.Entities
if (!string.IsNullOrEmpty(Title))
{
var result = new StringBuilder(Title);
var result = new StringBuilder(Title);
foreach (var tag in attributes)
{
// Keep Tags that are not already in Title.
@@ -246,7 +246,7 @@ namespace MediaBrowser.Model.Entities
return result.ToString();
}
return string.Join(" - ", attributes.ToArray());
return string.Join(" - ", attributes);
}
default:

View File

@@ -1,18 +0,0 @@
namespace MediaBrowser.Model.Entities
{
/// <summary>
/// Enum ScrollDirection.
/// </summary>
public enum ScrollDirection
{
/// <summary>
/// The horizontal.
/// </summary>
Horizontal,
/// <summary>
/// The vertical.
/// </summary>
Vertical
}
}

View File

@@ -1,18 +0,0 @@
namespace MediaBrowser.Model.Entities
{
/// <summary>
/// Enum SortOrder.
/// </summary>
public enum SortOrder
{
/// <summary>
/// The ascending.
/// </summary>
Ascending,
/// <summary>
/// The descending.
/// </summary>
Descending
}
}

View File

@@ -2,7 +2,7 @@
#pragma warning disable CS1591
using System;
using MediaBrowser.Model.Entities;
using Jellyfin.Data.Enums;
namespace MediaBrowser.Model.LiveTv
{

View File

@@ -1,6 +1,6 @@
#pragma warning disable CS1591
using MediaBrowser.Model.Entities;
using Jellyfin.Data.Enums;
namespace MediaBrowser.Model.LiveTv
{