aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Model')
-rw-r--r--MediaBrowser.Model/Configuration/ServerConfiguration.cs8
-rw-r--r--MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs2
-rw-r--r--MediaBrowser.Model/Dlna/StreamInfo.cs14
-rw-r--r--MediaBrowser.Model/Providers/ExternalIdInfo.cs32
-rw-r--r--MediaBrowser.Model/Providers/ExternalIdMediaType.cs71
-rw-r--r--MediaBrowser.Model/Querying/UpcomingEpisodesQuery.cs3
-rw-r--r--MediaBrowser.Model/SyncPlay/JoinGroupRequest.cs6
-rw-r--r--MediaBrowser.Model/SyncPlay/PlaybackRequestType.cs6
8 files changed, 111 insertions, 31 deletions
diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
index b87c8fbab..a0c21a666 100644
--- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs
+++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
@@ -82,8 +82,6 @@ namespace MediaBrowser.Model.Configuration
public bool EnableRemoteAccess { get; set; }
- public bool CollectionsUpgraded { get; set; }
-
/// <summary>
/// Gets or sets a value indicating whether [enable case sensitive item ids].
/// </summary>
@@ -269,6 +267,9 @@ namespace MediaBrowser.Model.Configuration
PathSubstitutions = Array.Empty<PathSubstitution>();
IgnoreVirtualInterfaces = false;
EnableSimpleArtistDetection = false;
+ SkipDeserializationForBasicTypes = true;
+
+ PluginRepositories = new List<RepositoryInfo>();
DisplaySpecialsWithinSeasons = true;
EnableExternalContentInSuggestions = true;
@@ -282,6 +283,9 @@ namespace MediaBrowser.Model.Configuration
EnableHttps = false;
EnableDashboardResponseCaching = true;
EnableCaseSensitiveItemIds = true;
+ EnableNormalizedItemByNameIds = true;
+ DisableLiveTvChannelUserDataName = true;
+ EnableNewOmdbSupport = true;
AutoRunWebApp = true;
EnableRemoteAccess = true;
diff --git a/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs b/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs
index 398c5db8c..bdc5f8bb7 100644
--- a/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs
+++ b/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs
@@ -206,7 +206,7 @@ namespace MediaBrowser.Model.Dlna
}
}
- return new MediaFormatProfile[] { };
+ return Array.Empty<MediaFormatProfile>();
}
private MediaFormatProfile ValueOf(string value)
diff --git a/MediaBrowser.Model/Dlna/StreamInfo.cs b/MediaBrowser.Model/Dlna/StreamInfo.cs
index b89e9ce90..204340c46 100644
--- a/MediaBrowser.Model/Dlna/StreamInfo.cs
+++ b/MediaBrowser.Model/Dlna/StreamInfo.cs
@@ -144,7 +144,7 @@ namespace MediaBrowser.Model.Dlna
public Dictionary<string, string> StreamOptions { get; private set; }
- public string MediaSourceId => MediaSource == null ? null : MediaSource.Id;
+ public string MediaSourceId => MediaSource?.Id;
public bool IsDirectStream =>
PlayMethod == PlayMethod.DirectStream ||
@@ -813,18 +813,18 @@ namespace MediaBrowser.Model.Dlna
{
var stream = TargetAudioStream;
- string inputCodec = stream == null ? null : stream.Codec;
+ string inputCodec = stream?.Codec;
if (IsDirectStream)
{
- return string.IsNullOrEmpty(inputCodec) ? new string[] { } : new[] { inputCodec };
+ return string.IsNullOrEmpty(inputCodec) ? Array.Empty<string>() : new[] { inputCodec };
}
foreach (string codec in AudioCodecs)
{
if (string.Equals(codec, inputCodec, StringComparison.OrdinalIgnoreCase))
{
- return string.IsNullOrEmpty(codec) ? new string[] { } : new[] { codec };
+ return string.IsNullOrEmpty(codec) ? Array.Empty<string>() : new[] { codec };
}
}
@@ -838,18 +838,18 @@ namespace MediaBrowser.Model.Dlna
{
var stream = TargetVideoStream;
- string inputCodec = stream == null ? null : stream.Codec;
+ string inputCodec = stream?.Codec;
if (IsDirectStream)
{
- return string.IsNullOrEmpty(inputCodec) ? new string[] { } : new[] { inputCodec };
+ return string.IsNullOrEmpty(inputCodec) ? Array.Empty<string>() : new[] { inputCodec };
}
foreach (string codec in VideoCodecs)
{
if (string.Equals(codec, inputCodec, StringComparison.OrdinalIgnoreCase))
{
- return string.IsNullOrEmpty(codec) ? new string[] { } : new[] { codec };
+ return string.IsNullOrEmpty(codec) ? Array.Empty<string>() : new[] { codec };
}
}
diff --git a/MediaBrowser.Model/Providers/ExternalIdInfo.cs b/MediaBrowser.Model/Providers/ExternalIdInfo.cs
index f2e6d8ef3..01784554f 100644
--- a/MediaBrowser.Model/Providers/ExternalIdInfo.cs
+++ b/MediaBrowser.Model/Providers/ExternalIdInfo.cs
@@ -1,26 +1,36 @@
-#nullable disable
-#pragma warning disable CS1591
-
namespace MediaBrowser.Model.Providers
{
+ /// <summary>
+ /// Represents the external id information for serialization to the client.
+ /// </summary>
public class ExternalIdInfo
{
/// <summary>
- /// Gets or sets the name.
+ /// Gets or sets the display name of the external id provider (IE: IMDB, MusicBrainz, etc).
+ /// </summary>
+ // TODO: This should be renamed to ProviderName
+ public string? Name { get; set; }
+
+ /// <summary>
+ /// Gets or sets the unique key for this id. This key should be unique across all providers.
/// </summary>
- /// <value>The name.</value>
- public string Name { get; set; }
+ // TODO: This property is not actually unique across the concrete types at the moment. It should be updated to be unique.
+ public string? Key { get; set; }
/// <summary>
- /// Gets or sets the key.
+ /// Gets or sets the specific media type for this id. This is used to distinguish between the different
+ /// external id types for providers with multiple ids.
+ /// A null value indicates there is no specific media type associated with the external id, or this is the
+ /// default id for the external provider so there is no need to specify a type.
/// </summary>
- /// <value>The key.</value>
- public string Key { get; set; }
+ /// <remarks>
+ /// This can be used along with the <see cref="Name"/> to localize the external id on the client.
+ /// </remarks>
+ public ExternalIdMediaType? Type { get; set; }
/// <summary>
/// Gets or sets the URL format string.
/// </summary>
- /// <value>The URL format string.</value>
- public string UrlFormatString { get; set; }
+ public string? UrlFormatString { get; set; }
}
}
diff --git a/MediaBrowser.Model/Providers/ExternalIdMediaType.cs b/MediaBrowser.Model/Providers/ExternalIdMediaType.cs
new file mode 100644
index 000000000..5303c8f58
--- /dev/null
+++ b/MediaBrowser.Model/Providers/ExternalIdMediaType.cs
@@ -0,0 +1,71 @@
+namespace MediaBrowser.Model.Providers
+{
+ /// <summary>
+ /// The specific media type of an <see cref="ExternalIdInfo"/>.
+ /// </summary>
+ /// <remarks>
+ /// Client applications may use this as a translation key.
+ /// </remarks>
+ public enum ExternalIdMediaType
+ {
+ /// <summary>
+ /// A music album.
+ /// </summary>
+ Album = 1,
+
+ /// <summary>
+ /// The artist of a music album.
+ /// </summary>
+ AlbumArtist = 2,
+
+ /// <summary>
+ /// The artist of a media item.
+ /// </summary>
+ Artist = 3,
+
+ /// <summary>
+ /// A boxed set of media.
+ /// </summary>
+ BoxSet = 4,
+
+ /// <summary>
+ /// A series episode.
+ /// </summary>
+ Episode = 5,
+
+ /// <summary>
+ /// A movie.
+ /// </summary>
+ Movie = 6,
+
+ /// <summary>
+ /// An alternative artist apart from the main artist.
+ /// </summary>
+ OtherArtist = 7,
+
+ /// <summary>
+ /// A person.
+ /// </summary>
+ Person = 8,
+
+ /// <summary>
+ /// A release group.
+ /// </summary>
+ ReleaseGroup = 9,
+
+ /// <summary>
+ /// A single season of a series.
+ /// </summary>
+ Season = 10,
+
+ /// <summary>
+ /// A series.
+ /// </summary>
+ Series = 11,
+
+ /// <summary>
+ /// A music track.
+ /// </summary>
+ Track = 12
+ }
+}
diff --git a/MediaBrowser.Model/Querying/UpcomingEpisodesQuery.cs b/MediaBrowser.Model/Querying/UpcomingEpisodesQuery.cs
index 12d537492..2ef6f7c60 100644
--- a/MediaBrowser.Model/Querying/UpcomingEpisodesQuery.cs
+++ b/MediaBrowser.Model/Querying/UpcomingEpisodesQuery.cs
@@ -1,6 +1,7 @@
#nullable disable
#pragma warning disable CS1591
+using System;
using MediaBrowser.Model.Entities;
namespace MediaBrowser.Model.Querying
@@ -54,7 +55,7 @@ namespace MediaBrowser.Model.Querying
public UpcomingEpisodesQuery()
{
- EnableImageTypes = new ImageType[] { };
+ EnableImageTypes = Array.Empty<ImageType>();
}
}
}
diff --git a/MediaBrowser.Model/SyncPlay/JoinGroupRequest.cs b/MediaBrowser.Model/SyncPlay/JoinGroupRequest.cs
index d67b6bd55..0c77a6132 100644
--- a/MediaBrowser.Model/SyncPlay/JoinGroupRequest.cs
+++ b/MediaBrowser.Model/SyncPlay/JoinGroupRequest.cs
@@ -12,11 +12,5 @@ namespace MediaBrowser.Model.SyncPlay
/// </summary>
/// <value>The Group id to join.</value>
public Guid GroupId { get; set; }
-
- /// <summary>
- /// Gets or sets the playing item id.
- /// </summary>
- /// <value>The client's currently playing item id.</value>
- public Guid PlayingItemId { get; set; }
}
}
diff --git a/MediaBrowser.Model/SyncPlay/PlaybackRequestType.cs b/MediaBrowser.Model/SyncPlay/PlaybackRequestType.cs
index 671f4e01f..e89efeed8 100644
--- a/MediaBrowser.Model/SyncPlay/PlaybackRequestType.cs
+++ b/MediaBrowser.Model/SyncPlay/PlaybackRequestType.cs
@@ -23,16 +23,16 @@ namespace MediaBrowser.Model.SyncPlay
/// <summary>
/// A user is signaling that playback is buffering.
/// </summary>
- Buffering = 3,
+ Buffer = 3,
/// <summary>
/// A user is signaling that playback resumed.
/// </summary>
- BufferingDone = 4,
+ Ready = 4,
/// <summary>
/// A user is reporting its ping.
/// </summary>
- UpdatePing = 5
+ Ping = 5
}
}