aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Model')
-rw-r--r--MediaBrowser.Model/Activity/ActivityLogEntry.cs1
-rw-r--r--MediaBrowser.Model/ApiClient/ServerDiscoveryInfo.cs1
-rw-r--r--MediaBrowser.Model/Branding/BrandingOptions.cs1
-rw-r--r--MediaBrowser.Model/Channels/ChannelFeatures.cs3
-rw-r--r--MediaBrowser.Model/Channels/ChannelInfo.cs1
-rw-r--r--MediaBrowser.Model/Channels/ChannelQuery.cs10
-rw-r--r--MediaBrowser.Model/Configuration/AccessSchedule.cs2
-rw-r--r--MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs27
-rw-r--r--MediaBrowser.Model/Configuration/DynamicDayOfWeek.cs18
-rw-r--r--MediaBrowser.Model/Configuration/EncodingOptions.cs19
-rw-r--r--MediaBrowser.Model/Configuration/LibraryOptions.cs24
-rw-r--r--MediaBrowser.Model/Configuration/MetadataOptions.cs4
-rw-r--r--MediaBrowser.Model/Configuration/MetadataPlugin.cs1
-rw-r--r--MediaBrowser.Model/Configuration/MetadataPluginSummary.cs1
-rw-r--r--MediaBrowser.Model/Configuration/MetadataPluginType.cs2
-rw-r--r--MediaBrowser.Model/Configuration/ServerConfiguration.cs32
-rw-r--r--MediaBrowser.Model/Configuration/SubtitlePlaybackMode.cs13
-rw-r--r--MediaBrowser.Model/Configuration/UnratedItem.cs17
-rw-r--r--MediaBrowser.Model/Configuration/UserConfiguration.cs8
-rw-r--r--MediaBrowser.Model/Configuration/XbmcMetadataOptions.cs2
-rw-r--r--MediaBrowser.Model/Cryptography/ICryptoProvider.cs2
-rw-r--r--MediaBrowser.Model/Devices/ContentUploadHistory.cs15
-rw-r--r--MediaBrowser.Model/Devices/DeviceInfo.cs1
-rw-r--r--MediaBrowser.Model/Devices/DeviceOptions.cs2
-rw-r--r--MediaBrowser.Model/Devices/LocalFileInfo.cs12
-rw-r--r--MediaBrowser.Model/Dlna/AudioOptions.cs9
-rw-r--r--MediaBrowser.Model/Dlna/CodecProfile.cs1
-rw-r--r--MediaBrowser.Model/Dlna/ConditionProcessor.cs36
-rw-r--r--MediaBrowser.Model/Dlna/ContainerProfile.cs2
-rw-r--r--MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs14
-rw-r--r--MediaBrowser.Model/Dlna/DeviceIdentification.cs1
-rw-r--r--MediaBrowser.Model/Dlna/DeviceProfile.cs22
-rw-r--r--MediaBrowser.Model/Dlna/DeviceProfileInfo.cs1
-rw-r--r--MediaBrowser.Model/Dlna/DirectPlayProfile.cs1
-rw-r--r--MediaBrowser.Model/Dlna/HttpHeaderInfo.cs1
-rw-r--r--MediaBrowser.Model/Dlna/ITranscoderSupport.cs5
-rw-r--r--MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs123
-rw-r--r--MediaBrowser.Model/Dlna/ProfileCondition.cs26
-rw-r--r--MediaBrowser.Model/Dlna/ResolutionConfiguration.cs1
-rw-r--r--MediaBrowser.Model/Dlna/ResolutionNormalizer.cs5
-rw-r--r--MediaBrowser.Model/Dlna/ResolutionOptions.cs1
-rw-r--r--MediaBrowser.Model/Dlna/ResponseProfile.cs4
-rw-r--r--MediaBrowser.Model/Dlna/SearchCriteria.cs9
-rw-r--r--MediaBrowser.Model/Dlna/SortCriteria.cs1
-rw-r--r--MediaBrowser.Model/Dlna/StreamBuilder.cs40
-rw-r--r--MediaBrowser.Model/Dlna/StreamInfo.cs47
-rw-r--r--MediaBrowser.Model/Dlna/SubtitleDeliveryMethod.cs8
-rw-r--r--MediaBrowser.Model/Dlna/SubtitleProfile.cs1
-rw-r--r--MediaBrowser.Model/Dlna/SubtitleStreamInfo.cs9
-rw-r--r--MediaBrowser.Model/Dlna/TranscodingProfile.cs1
-rw-r--r--MediaBrowser.Model/Dlna/UpnpDeviceInfo.cs4
-rw-r--r--MediaBrowser.Model/Dlna/VideoOptions.cs1
-rw-r--r--MediaBrowser.Model/Dlna/XmlAttribute.cs1
-rw-r--r--MediaBrowser.Model/Drawing/DrawingUtils.cs5
-rw-r--r--MediaBrowser.Model/Dto/BaseItemDto.cs37
-rw-r--r--MediaBrowser.Model/Dto/BaseItemPerson.cs9
-rw-r--r--MediaBrowser.Model/Dto/IHasServerId.cs1
-rw-r--r--MediaBrowser.Model/Dto/ImageByNameInfo.cs1
-rw-r--r--MediaBrowser.Model/Dto/ImageInfo.cs11
-rw-r--r--MediaBrowser.Model/Dto/ImageOptions.cs19
-rw-r--r--MediaBrowser.Model/Dto/ItemIndex.cs20
-rw-r--r--MediaBrowser.Model/Dto/MediaSourceInfo.cs24
-rw-r--r--MediaBrowser.Model/Dto/MetadataEditorInfo.cs5
-rw-r--r--MediaBrowser.Model/Dto/NameIdPair.cs2
-rw-r--r--MediaBrowser.Model/Dto/NameValuePair.cs2
-rw-r--r--MediaBrowser.Model/Dto/PublicUserDto.cs48
-rw-r--r--MediaBrowser.Model/Dto/RecommendationDto.cs1
-rw-r--r--MediaBrowser.Model/Dto/UserDto.cs1
-rw-r--r--MediaBrowser.Model/Dto/UserItemDataDto.cs1
-rw-r--r--MediaBrowser.Model/Entities/ChapterInfo.cs1
-rw-r--r--MediaBrowser.Model/Entities/DisplayPreferences.cs3
-rw-r--r--MediaBrowser.Model/Entities/IHasProviderIds.cs2
-rw-r--r--MediaBrowser.Model/Entities/ImageType.cs7
-rw-r--r--MediaBrowser.Model/Entities/LibraryUpdateInfo.cs29
-rw-r--r--MediaBrowser.Model/Entities/MediaAttachment.cs1
-rw-r--r--MediaBrowser.Model/Entities/MediaStream.cs24
-rw-r--r--MediaBrowser.Model/Entities/MediaUrl.cs2
-rw-r--r--MediaBrowser.Model/Entities/MetadataFields.cs2
-rw-r--r--MediaBrowser.Model/Entities/MetadataProvider.cs (renamed from MediaBrowser.Model/Entities/MetadataProviders.cs)14
-rw-r--r--MediaBrowser.Model/Entities/PackageReviewInfo.cs14
-rw-r--r--MediaBrowser.Model/Entities/ParentalRating.cs24
-rw-r--r--MediaBrowser.Model/Entities/ProviderIdsExtensions.cs8
-rw-r--r--MediaBrowser.Model/Entities/VirtualFolderInfo.cs4
-rw-r--r--MediaBrowser.Model/Events/GenericEventArgs.cs7
-rw-r--r--MediaBrowser.Model/Extensions/ListHelper.cs29
-rw-r--r--MediaBrowser.Model/Extensions/StringHelper.cs4
-rw-r--r--MediaBrowser.Model/Globalization/CountryInfo.cs1
-rw-r--r--MediaBrowser.Model/Globalization/CultureDto.cs1
-rw-r--r--MediaBrowser.Model/Globalization/ILocalizationManager.cs1
-rw-r--r--MediaBrowser.Model/Globalization/LocalizationOption.cs2
-rw-r--r--MediaBrowser.Model/IO/FileSystemEntryInfo.cs27
-rw-r--r--MediaBrowser.Model/IO/FileSystemMetadata.cs1
-rw-r--r--MediaBrowser.Model/IO/IFileSystem.cs1
-rw-r--r--MediaBrowser.Model/IO/IIsoManager.cs1
-rw-r--r--MediaBrowser.Model/IO/IIsoMount.cs2
-rw-r--r--MediaBrowser.Model/IO/IIsoMounter.cs12
-rw-r--r--MediaBrowser.Model/IO/IStreamHelper.cs1
-rw-r--r--MediaBrowser.Model/IO/IZipClient.cs2
-rw-r--r--MediaBrowser.Model/Library/UserViewQuery.cs12
-rw-r--r--MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs2
-rw-r--r--MediaBrowser.Model/LiveTv/ChannelType.cs2
-rw-r--r--MediaBrowser.Model/LiveTv/GuideInfo.cs1
-rw-r--r--MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs11
-rw-r--r--MediaBrowser.Model/LiveTv/LiveTvInfo.cs12
-rw-r--r--MediaBrowser.Model/LiveTv/LiveTvOptions.cs35
-rw-r--r--MediaBrowser.Model/LiveTv/LiveTvServiceInfo.cs1
-rw-r--r--MediaBrowser.Model/LiveTv/RecordingQuery.cs14
-rw-r--r--MediaBrowser.Model/LiveTv/SeriesTimerInfoDto.cs1
-rw-r--r--MediaBrowser.Model/LiveTv/SeriesTimerQuery.cs4
-rw-r--r--MediaBrowser.Model/LiveTv/TimerInfoDto.cs2
-rw-r--r--MediaBrowser.Model/LiveTv/TimerQuery.cs1
-rw-r--r--MediaBrowser.Model/MediaBrowser.Model.csproj6
-rw-r--r--MediaBrowser.Model/MediaInfo/AudioCodec.cs4
-rw-r--r--MediaBrowser.Model/MediaInfo/BlurayDiscInfo.cs1
-rw-r--r--MediaBrowser.Model/MediaInfo/LiveStreamRequest.cs45
-rw-r--r--MediaBrowser.Model/MediaInfo/LiveStreamResponse.cs7
-rw-r--r--MediaBrowser.Model/MediaInfo/MediaInfo.cs9
-rw-r--r--MediaBrowser.Model/MediaInfo/PlaybackInfoRequest.cs7
-rw-r--r--MediaBrowser.Model/MediaInfo/PlaybackInfoResponse.cs2
-rw-r--r--MediaBrowser.Model/MediaInfo/SubtitleTrackEvent.cs4
-rw-r--r--MediaBrowser.Model/Net/EndPointInfo.cs1
-rw-r--r--MediaBrowser.Model/Net/HttpException.cs1
-rw-r--r--MediaBrowser.Model/Net/ISocket.cs1
-rw-r--r--MediaBrowser.Model/Net/MimeTypes.cs19
-rw-r--r--MediaBrowser.Model/Net/NetworkShare.cs11
-rw-r--r--MediaBrowser.Model/Net/SocketReceiveResult.cs10
-rw-r--r--MediaBrowser.Model/Net/WebSocketMessage.cs2
-rw-r--r--MediaBrowser.Model/Notifications/NotificationOption.cs18
-rw-r--r--MediaBrowser.Model/Notifications/NotificationOptions.cs38
-rw-r--r--MediaBrowser.Model/Notifications/NotificationRequest.cs1
-rw-r--r--MediaBrowser.Model/Notifications/NotificationTypeInfo.cs1
-rw-r--r--MediaBrowser.Model/Playlists/PlaylistCreationRequest.cs1
-rw-r--r--MediaBrowser.Model/Playlists/PlaylistCreationResult.cs7
-rw-r--r--MediaBrowser.Model/Playlists/PlaylistItemQuery.cs39
-rw-r--r--MediaBrowser.Model/Plugins/PluginInfo.cs7
-rw-r--r--MediaBrowser.Model/Plugins/PluginPageInfo.cs1
-rw-r--r--MediaBrowser.Model/Providers/ExternalUrl.cs1
-rw-r--r--MediaBrowser.Model/Providers/ImageProviderInfo.cs28
-rw-r--r--MediaBrowser.Model/Providers/RemoteImageInfo.cs1
-rw-r--r--MediaBrowser.Model/Providers/RemoteImageQuery.cs7
-rw-r--r--MediaBrowser.Model/Providers/RemoteImageResult.cs1
-rw-r--r--MediaBrowser.Model/Providers/RemoteSearchResult.cs19
-rw-r--r--MediaBrowser.Model/Providers/RemoteSubtitleInfo.cs11
-rw-r--r--MediaBrowser.Model/Providers/SubtitleOptions.cs7
-rw-r--r--MediaBrowser.Model/Providers/SubtitleProviderInfo.cs2
-rw-r--r--MediaBrowser.Model/Querying/AllThemeMediaResult.cs13
-rw-r--r--MediaBrowser.Model/Querying/EpisodeQuery.cs1
-rw-r--r--MediaBrowser.Model/Querying/ItemCountsQuery.cs20
-rw-r--r--MediaBrowser.Model/Querying/ItemFields.cs74
-rw-r--r--MediaBrowser.Model/Querying/ItemSortBy.cs56
-rw-r--r--MediaBrowser.Model/Querying/LatestItemsQuery.cs20
-rw-r--r--MediaBrowser.Model/Querying/MovieRecommendationQuery.cs1
-rw-r--r--MediaBrowser.Model/Querying/NextUpQuery.cs5
-rw-r--r--MediaBrowser.Model/Querying/QueryFilters.cs6
-rw-r--r--MediaBrowser.Model/Querying/QueryResult.cs3
-rw-r--r--MediaBrowser.Model/Querying/ThemeMediaResult.cs2
-rw-r--r--MediaBrowser.Model/Querying/UpcomingEpisodesQuery.cs5
-rw-r--r--MediaBrowser.Model/Search/SearchHint.cs2
-rw-r--r--MediaBrowser.Model/Search/SearchHintResult.cs1
-rw-r--r--MediaBrowser.Model/Search/SearchQuery.cs12
-rw-r--r--MediaBrowser.Model/Serialization/IJsonSerializer.cs1
-rw-r--r--MediaBrowser.Model/Serialization/IXmlSerializer.cs1
-rw-r--r--MediaBrowser.Model/Services/ApiMemberAttribute.cs3
-rw-r--r--MediaBrowser.Model/Services/IHasRequestFilter.cs2
-rw-r--r--MediaBrowser.Model/Services/IHttpRequest.cs4
-rw-r--r--MediaBrowser.Model/Services/IHttpResult.cs11
-rw-r--r--MediaBrowser.Model/Services/IRequest.cs13
-rw-r--r--MediaBrowser.Model/Services/IRequiresRequestStream.cs2
-rw-r--r--MediaBrowser.Model/Services/IService.cs2
-rw-r--r--MediaBrowser.Model/Services/QueryParamCollection.cs10
-rw-r--r--MediaBrowser.Model/Services/RouteAttribute.cs19
-rw-r--r--MediaBrowser.Model/Session/BrowseRequest.cs1
-rw-r--r--MediaBrowser.Model/Session/ClientCapabilities.cs5
-rw-r--r--MediaBrowser.Model/Session/GeneralCommand.cs1
-rw-r--r--MediaBrowser.Model/Session/MessageCommand.cs1
-rw-r--r--MediaBrowser.Model/Session/PlayRequest.cs8
-rw-r--r--MediaBrowser.Model/Session/PlaybackProgressInfo.cs3
-rw-r--r--MediaBrowser.Model/Session/PlaybackStopInfo.cs2
-rw-r--r--MediaBrowser.Model/Session/PlayerStateInfo.cs1
-rw-r--r--MediaBrowser.Model/Session/PlaystateRequest.cs2
-rw-r--r--MediaBrowser.Model/Session/SessionUserInfo.cs2
-rw-r--r--MediaBrowser.Model/Session/TranscodingInfo.cs13
-rw-r--r--MediaBrowser.Model/Session/UserDataChangeInfo.cs1
-rw-r--r--MediaBrowser.Model/Sync/SyncCategory.cs6
-rw-r--r--MediaBrowser.Model/Sync/SyncJob.cs3
-rw-r--r--MediaBrowser.Model/Sync/SyncTarget.cs1
-rw-r--r--MediaBrowser.Model/SyncPlay/GroupInfoView.cs42
-rw-r--r--MediaBrowser.Model/SyncPlay/GroupUpdate.cs28
-rw-r--r--MediaBrowser.Model/SyncPlay/GroupUpdateType.cs63
-rw-r--r--MediaBrowser.Model/SyncPlay/JoinGroupRequest.cs22
-rw-r--r--MediaBrowser.Model/SyncPlay/PlaybackRequest.cs34
-rw-r--r--MediaBrowser.Model/SyncPlay/PlaybackRequestType.cs38
-rw-r--r--MediaBrowser.Model/SyncPlay/SendCommand.cs40
-rw-r--r--MediaBrowser.Model/SyncPlay/SendCommandType.cs23
-rw-r--r--MediaBrowser.Model/SyncPlay/UtcTimeResponse.cs22
-rw-r--r--MediaBrowser.Model/System/LogFile.cs1
-rw-r--r--MediaBrowser.Model/System/PublicSystemInfo.cs1
-rw-r--r--MediaBrowser.Model/System/SystemInfo.cs4
-rw-r--r--MediaBrowser.Model/System/WakeOnLanInfo.cs31
-rw-r--r--MediaBrowser.Model/Tasks/IScheduledTask.cs11
-rw-r--r--MediaBrowser.Model/Tasks/IScheduledTaskWorker.cs3
-rw-r--r--MediaBrowser.Model/Tasks/ITaskManager.cs2
-rw-r--r--MediaBrowser.Model/Tasks/ScheduledTaskHelpers.cs4
-rw-r--r--MediaBrowser.Model/Tasks/TaskCompletionEventArgs.cs10
-rw-r--r--MediaBrowser.Model/Tasks/TaskInfo.cs1
-rw-r--r--MediaBrowser.Model/Tasks/TaskResult.cs1
-rw-r--r--MediaBrowser.Model/Tasks/TaskTriggerInfo.cs1
-rw-r--r--MediaBrowser.Model/Updates/InstallationInfo.cs23
-rw-r--r--MediaBrowser.Model/Updates/PackageInfo.cs1
-rw-r--r--MediaBrowser.Model/Updates/RepositoryInfo.cs20
-rw-r--r--MediaBrowser.Model/Updates/VersionInfo.cs22
-rw-r--r--MediaBrowser.Model/Users/ForgotPasswordResult.cs1
-rw-r--r--MediaBrowser.Model/Users/PinRedeemResult.cs1
-rw-r--r--MediaBrowser.Model/Users/UserAction.cs7
-rw-r--r--MediaBrowser.Model/Users/UserPolicy.cs34
215 files changed, 1563 insertions, 693 deletions
diff --git a/MediaBrowser.Model/Activity/ActivityLogEntry.cs b/MediaBrowser.Model/Activity/ActivityLogEntry.cs
index 5ab904394..1d47ef9f6 100644
--- a/MediaBrowser.Model/Activity/ActivityLogEntry.cs
+++ b/MediaBrowser.Model/Activity/ActivityLogEntry.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
diff --git a/MediaBrowser.Model/ApiClient/ServerDiscoveryInfo.cs b/MediaBrowser.Model/ApiClient/ServerDiscoveryInfo.cs
index bb203f895..fcc90a1f7 100644
--- a/MediaBrowser.Model/ApiClient/ServerDiscoveryInfo.cs
+++ b/MediaBrowser.Model/ApiClient/ServerDiscoveryInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.ApiClient
diff --git a/MediaBrowser.Model/Branding/BrandingOptions.cs b/MediaBrowser.Model/Branding/BrandingOptions.cs
index 8ab268a64..5ddf1e7e6 100644
--- a/MediaBrowser.Model/Branding/BrandingOptions.cs
+++ b/MediaBrowser.Model/Branding/BrandingOptions.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.Branding
diff --git a/MediaBrowser.Model/Channels/ChannelFeatures.cs b/MediaBrowser.Model/Channels/ChannelFeatures.cs
index c4e97ffe5..a55754edd 100644
--- a/MediaBrowser.Model/Channels/ChannelFeatures.cs
+++ b/MediaBrowser.Model/Channels/ChannelFeatures.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -37,7 +38,7 @@ namespace MediaBrowser.Model.Channels
public ChannelMediaContentType[] ContentTypes { get; set; }
/// <summary>
- /// Represents the maximum number of records the channel allows retrieving at a time
+ /// Represents the maximum number of records the channel allows retrieving at a time.
/// </summary>
public int? MaxPageSize { get; set; }
diff --git a/MediaBrowser.Model/Channels/ChannelInfo.cs b/MediaBrowser.Model/Channels/ChannelInfo.cs
index bfb34db55..f2432aaeb 100644
--- a/MediaBrowser.Model/Channels/ChannelInfo.cs
+++ b/MediaBrowser.Model/Channels/ChannelInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.Channels
diff --git a/MediaBrowser.Model/Channels/ChannelQuery.cs b/MediaBrowser.Model/Channels/ChannelQuery.cs
index 88fc94a6f..fd90e7f06 100644
--- a/MediaBrowser.Model/Channels/ChannelQuery.cs
+++ b/MediaBrowser.Model/Channels/ChannelQuery.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -9,12 +10,15 @@ namespace MediaBrowser.Model.Channels
public class ChannelQuery
{
/// <summary>
- /// Fields to return within the items, in addition to basic information
+ /// Fields to return within the items, in addition to basic information.
/// </summary>
/// <value>The fields.</value>
public ItemFields[] Fields { get; set; }
+
public bool? EnableImages { get; set; }
+
public int? ImageTypeLimit { get; set; }
+
public ImageType[] EnableImageTypes { get; set; }
/// <summary>
@@ -30,7 +34,7 @@ namespace MediaBrowser.Model.Channels
public int? StartIndex { get; set; }
/// <summary>
- /// The maximum number of items to return
+ /// The maximum number of items to return.
/// </summary>
/// <value>The limit.</value>
public int? Limit { get; set; }
@@ -48,7 +52,9 @@ namespace MediaBrowser.Model.Channels
/// </summary>
/// <value><c>null</c> if [is favorite] contains no value, <c>true</c> if [is favorite]; otherwise, <c>false</c>.</value>
public bool? IsFavorite { get; set; }
+
public bool? IsRecordingsFolder { get; set; }
+
public bool RefreshLatestChannelItems { get; set; }
}
}
diff --git a/MediaBrowser.Model/Configuration/AccessSchedule.cs b/MediaBrowser.Model/Configuration/AccessSchedule.cs
index 120c47dbc..7bd355449 100644
--- a/MediaBrowser.Model/Configuration/AccessSchedule.cs
+++ b/MediaBrowser.Model/Configuration/AccessSchedule.cs
@@ -1,3 +1,5 @@
+using Jellyfin.Data.Enums;
+
#pragma warning disable CS1591
namespace MediaBrowser.Model.Configuration
diff --git a/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs b/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs
index cc2541f74..66f3e1a94 100644
--- a/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs
+++ b/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs
@@ -1,3 +1,4 @@
+#nullable disable
using System;
using System.Xml.Serialization;
@@ -11,7 +12,15 @@ namespace MediaBrowser.Model.Configuration
public class BaseApplicationConfiguration
{
/// <summary>
- /// The number of days we should retain log files
+ /// Initializes a new instance of the <see cref="BaseApplicationConfiguration" /> class.
+ /// </summary>
+ public BaseApplicationConfiguration()
+ {
+ LogFileRetentionDays = 3;
+ }
+
+ /// <summary>
+ /// Gets or sets the number of days we should retain log files.
/// </summary>
/// <value>The log file retention days.</value>
public int LogFileRetentionDays { get; set; }
@@ -29,29 +38,21 @@ namespace MediaBrowser.Model.Configuration
public string CachePath { get; set; }
/// <summary>
- /// Last known version that was ran using the configuration.
+ /// Gets or sets the last known version that was ran using the configuration.
/// </summary>
/// <value>The version from previous run.</value>
[XmlIgnore]
public Version PreviousVersion { get; set; }
/// <summary>
- /// Stringified PreviousVersion to be stored/loaded,
- /// because System.Version itself isn't xml-serializable
+ /// Gets or sets the stringified PreviousVersion to be stored/loaded,
+ /// because System.Version itself isn't xml-serializable.
/// </summary>
- /// <value>String value of PreviousVersion</value>
+ /// <value>String value of PreviousVersion.</value>
public string PreviousVersionStr
{
get => PreviousVersion?.ToString();
set => PreviousVersion = Version.Parse(value);
}
-
- /// <summary>
- /// Initializes a new instance of the <see cref="BaseApplicationConfiguration" /> class.
- /// </summary>
- public BaseApplicationConfiguration()
- {
- LogFileRetentionDays = 3;
- }
}
}
diff --git a/MediaBrowser.Model/Configuration/DynamicDayOfWeek.cs b/MediaBrowser.Model/Configuration/DynamicDayOfWeek.cs
deleted file mode 100644
index 71b16cfba..000000000
--- a/MediaBrowser.Model/Configuration/DynamicDayOfWeek.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-#pragma warning disable CS1591
-
-namespace MediaBrowser.Model.Configuration
-{
- public enum DynamicDayOfWeek
- {
- Sunday = 0,
- Monday = 1,
- Tuesday = 2,
- Wednesday = 3,
- Thursday = 4,
- Friday = 5,
- Saturday = 6,
- Everyday = 7,
- Weekday = 8,
- Weekend = 9
- }
-}
diff --git a/MediaBrowser.Model/Configuration/EncodingOptions.cs b/MediaBrowser.Model/Configuration/EncodingOptions.cs
index 648568fd7..9a30f7e9f 100644
--- a/MediaBrowser.Model/Configuration/EncodingOptions.cs
+++ b/MediaBrowser.Model/Configuration/EncodingOptions.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.Configuration
@@ -5,10 +6,15 @@ namespace MediaBrowser.Model.Configuration
public class EncodingOptions
{
public int EncodingThreadCount { get; set; }
+
public string TranscodingTempPath { get; set; }
+
public double DownMixAudioBoost { get; set; }
+
public bool EnableThrottling { get; set; }
+
public int ThrottleDelaySeconds { get; set; }
+
public string HardwareAccelerationType { get; set; }
/// <summary>
@@ -20,12 +26,23 @@ namespace MediaBrowser.Model.Configuration
/// The current FFmpeg path being used by the system and displayed on the transcode page.
/// </summary>
public string EncoderAppPathDisplay { get; set; }
+
public string VaapiDevice { get; set; }
+
public int H264Crf { get; set; }
+
public int H265Crf { get; set; }
+
public string EncoderPreset { get; set; }
+
public string DeinterlaceMethod { get; set; }
+
+ public bool EnableDecodingColorDepth10Hevc { get; set; }
+
+ public bool EnableDecodingColorDepth10Vp9 { get; set; }
+
public bool EnableHardwareEncoding { get; set; }
+
public bool EnableSubtitleExtraction { get; set; }
public string[] HardwareDecodingCodecs { get; set; }
@@ -41,6 +58,8 @@ namespace MediaBrowser.Model.Configuration
H264Crf = 23;
H265Crf = 28;
DeinterlaceMethod = "yadif";
+ EnableDecodingColorDepth10Hevc = true;
+ EnableDecodingColorDepth10Vp9 = true;
EnableHardwareEncoding = true;
EnableSubtitleExtraction = true;
HardwareDecodingCodecs = new string[] { "h264", "vc1" };
diff --git a/MediaBrowser.Model/Configuration/LibraryOptions.cs b/MediaBrowser.Model/Configuration/LibraryOptions.cs
index 4342ccd8a..890469d36 100644
--- a/MediaBrowser.Model/Configuration/LibraryOptions.cs
+++ b/MediaBrowser.Model/Configuration/LibraryOptions.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -9,17 +10,27 @@ namespace MediaBrowser.Model.Configuration
public class LibraryOptions
{
public bool EnablePhotos { get; set; }
+
public bool EnableRealtimeMonitor { get; set; }
+
public bool EnableChapterImageExtraction { get; set; }
+
public bool ExtractChapterImagesDuringLibraryScan { get; set; }
+
public bool DownloadImagesInAdvance { get; set; }
+
public MediaPathInfo[] PathInfos { get; set; }
public bool SaveLocalMetadata { get; set; }
+
public bool EnableInternetProviders { get; set; }
+
public bool ImportMissingEpisodes { get; set; }
+
public bool EnableAutomaticSeriesGrouping { get; set; }
+
public bool EnableEmbeddedTitles { get; set; }
+
public bool EnableEmbeddedEpisodeInfos { get; set; }
public int AutomaticRefreshIntervalDays { get; set; }
@@ -37,17 +48,25 @@ namespace MediaBrowser.Model.Configuration
public string MetadataCountryCode { get; set; }
public string SeasonZeroDisplayName { get; set; }
+
public string[] MetadataSavers { get; set; }
+
public string[] DisabledLocalMetadataReaders { get; set; }
+
public string[] LocalMetadataReaderOrder { get; set; }
public string[] DisabledSubtitleFetchers { get; set; }
+
public string[] SubtitleFetcherOrder { get; set; }
public bool SkipSubtitlesIfEmbeddedSubtitlesPresent { get; set; }
+
public bool SkipSubtitlesIfAudioTrackMatches { get; set; }
+
public string[] SubtitleDownloadLanguages { get; set; }
+
public bool RequirePerfectSubtitleMatch { get; set; }
+
public bool SaveSubtitlesWithMedia { get; set; }
public TypeOptions[] TypeOptions { get; set; }
@@ -88,17 +107,22 @@ namespace MediaBrowser.Model.Configuration
public class MediaPathInfo
{
public string Path { get; set; }
+
public string NetworkPath { get; set; }
}
public class TypeOptions
{
public string Type { get; set; }
+
public string[] MetadataFetchers { get; set; }
+
public string[] MetadataFetcherOrder { get; set; }
public string[] ImageFetchers { get; set; }
+
public string[] ImageFetcherOrder { get; set; }
+
public ImageOption[] ImageOptions { get; set; }
public ImageOption GetImageOptions(ImageType type)
diff --git a/MediaBrowser.Model/Configuration/MetadataOptions.cs b/MediaBrowser.Model/Configuration/MetadataOptions.cs
index 625054b9e..e7dc3da3c 100644
--- a/MediaBrowser.Model/Configuration/MetadataOptions.cs
+++ b/MediaBrowser.Model/Configuration/MetadataOptions.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -12,12 +13,15 @@ namespace MediaBrowser.Model.Configuration
public string ItemType { get; set; }
public string[] DisabledMetadataSavers { get; set; }
+
public string[] LocalMetadataReaderOrder { get; set; }
public string[] DisabledMetadataFetchers { get; set; }
+
public string[] MetadataFetcherOrder { get; set; }
public string[] DisabledImageFetchers { get; set; }
+
public string[] ImageFetcherOrder { get; set; }
public MetadataOptions()
diff --git a/MediaBrowser.Model/Configuration/MetadataPlugin.cs b/MediaBrowser.Model/Configuration/MetadataPlugin.cs
index c2b47eb9b..db8cd1875 100644
--- a/MediaBrowser.Model/Configuration/MetadataPlugin.cs
+++ b/MediaBrowser.Model/Configuration/MetadataPlugin.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.Configuration
diff --git a/MediaBrowser.Model/Configuration/MetadataPluginSummary.cs b/MediaBrowser.Model/Configuration/MetadataPluginSummary.cs
index 53063810b..0c197ee02 100644
--- a/MediaBrowser.Model/Configuration/MetadataPluginSummary.cs
+++ b/MediaBrowser.Model/Configuration/MetadataPluginSummary.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
diff --git a/MediaBrowser.Model/Configuration/MetadataPluginType.cs b/MediaBrowser.Model/Configuration/MetadataPluginType.cs
index bff12799f..4c5e95266 100644
--- a/MediaBrowser.Model/Configuration/MetadataPluginType.cs
+++ b/MediaBrowser.Model/Configuration/MetadataPluginType.cs
@@ -3,7 +3,7 @@
namespace MediaBrowser.Model.Configuration
{
/// <summary>
- /// Enum MetadataPluginType
+ /// Enum MetadataPluginType.
/// </summary>
public enum MetadataPluginType
{
diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
index 1f5981f10..b87c8fbab 100644
--- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs
+++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
@@ -1,7 +1,10 @@
+#nullable disable
#pragma warning disable CS1591
using System;
+using System.Collections.Generic;
using MediaBrowser.Model.Dto;
+using MediaBrowser.Model.Updates;
namespace MediaBrowser.Model.Configuration
{
@@ -110,19 +113,19 @@ namespace MediaBrowser.Model.Configuration
public string MetadataCountryCode { get; set; }
/// <summary>
- /// Characters to be replaced with a ' ' in strings to create a sort name
+ /// Characters to be replaced with a ' ' in strings to create a sort name.
/// </summary>
/// <value>The sort replace characters.</value>
public string[] SortReplaceCharacters { get; set; }
/// <summary>
- /// Characters to be removed from strings to create a sort name
+ /// Characters to be removed from strings to create a sort name.
/// </summary>
/// <value>The sort remove characters.</value>
public string[] SortRemoveCharacters { get; set; }
/// <summary>
- /// Words to be removed from strings to create a sort name
+ /// Words to be removed from strings to create a sort name.
/// </summary>
/// <value>The sort remove words.</value>
public string[] SortRemoveWords { get; set; }
@@ -228,6 +231,8 @@ namespace MediaBrowser.Model.Configuration
public string[] CodecsUsed { get; set; }
+ public List<RepositoryInfo> PluginRepositories { get; set; }
+
public bool IgnoreVirtualInterfaces { get; set; }
public bool EnableExternalContentInSuggestions { get; set; }
@@ -240,11 +245,13 @@ namespace MediaBrowser.Model.Configuration
public bool EnableNewOmdbSupport { get; set; }
public string[] RemoteIPFilter { get; set; }
+
public bool IsRemoteIPFilterBlacklist { get; set; }
public int ImageExtractionTimeoutMs { get; set; }
public PathSubstitution[] PathSubstitutions { get; set; }
+
public bool EnableSimpleArtistDetection { get; set; }
public string[] UninstalledPlugins { get; set; }
@@ -313,24 +320,24 @@ namespace MediaBrowser.Model.Configuration
new MetadataOptions
{
ItemType = "MusicVideo",
- DisabledMetadataFetchers = new [] { "The Open Movie Database" },
- DisabledImageFetchers = new [] { "The Open Movie Database" }
+ DisabledMetadataFetchers = new[] { "The Open Movie Database" },
+ DisabledImageFetchers = new[] { "The Open Movie Database" }
},
new MetadataOptions
{
ItemType = "Series",
- DisabledMetadataFetchers = new [] { "TheMovieDb" },
- DisabledImageFetchers = new [] { "TheMovieDb" }
+ DisabledMetadataFetchers = new[] { "TheMovieDb" },
+ DisabledImageFetchers = new[] { "TheMovieDb" }
},
new MetadataOptions
{
ItemType = "MusicAlbum",
- DisabledMetadataFetchers = new [] { "TheAudioDB" }
+ DisabledMetadataFetchers = new[] { "TheAudioDB" }
},
new MetadataOptions
{
ItemType = "MusicArtist",
- DisabledMetadataFetchers = new [] { "TheAudioDB" }
+ DisabledMetadataFetchers = new[] { "TheAudioDB" }
},
new MetadataOptions
{
@@ -339,13 +346,13 @@ namespace MediaBrowser.Model.Configuration
new MetadataOptions
{
ItemType = "Season",
- DisabledMetadataFetchers = new [] { "TheMovieDb" },
+ DisabledMetadataFetchers = new[] { "TheMovieDb" },
},
new MetadataOptions
{
ItemType = "Episode",
- DisabledMetadataFetchers = new [] { "The Open Movie Database", "TheMovieDb" },
- DisabledImageFetchers = new [] { "The Open Movie Database", "TheMovieDb" }
+ DisabledMetadataFetchers = new[] { "The Open Movie Database", "TheMovieDb" },
+ DisabledImageFetchers = new[] { "The Open Movie Database", "TheMovieDb" }
}
};
}
@@ -354,6 +361,7 @@ namespace MediaBrowser.Model.Configuration
public class PathSubstitution
{
public string From { get; set; }
+
public string To { get; set; }
}
}
diff --git a/MediaBrowser.Model/Configuration/SubtitlePlaybackMode.cs b/MediaBrowser.Model/Configuration/SubtitlePlaybackMode.cs
deleted file mode 100644
index f0aa2b98c..000000000
--- a/MediaBrowser.Model/Configuration/SubtitlePlaybackMode.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-#pragma warning disable CS1591
-
-namespace MediaBrowser.Model.Configuration
-{
- public enum SubtitlePlaybackMode
- {
- Default = 0,
- Always = 1,
- OnlyForced = 2,
- None = 3,
- Smart = 4
- }
-}
diff --git a/MediaBrowser.Model/Configuration/UnratedItem.cs b/MediaBrowser.Model/Configuration/UnratedItem.cs
deleted file mode 100644
index e1d1a363d..000000000
--- a/MediaBrowser.Model/Configuration/UnratedItem.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-#pragma warning disable CS1591
-
-namespace MediaBrowser.Model.Configuration
-{
- public enum UnratedItem
- {
- Movie,
- Trailer,
- Series,
- Music,
- Book,
- LiveTvChannel,
- LiveTvProgram,
- ChannelContent,
- Other
- }
-}
diff --git a/MediaBrowser.Model/Configuration/UserConfiguration.cs b/MediaBrowser.Model/Configuration/UserConfiguration.cs
index a475c9910..cc0e0c468 100644
--- a/MediaBrowser.Model/Configuration/UserConfiguration.cs
+++ b/MediaBrowser.Model/Configuration/UserConfiguration.cs
@@ -1,11 +1,13 @@
+#nullable disable
#pragma warning disable CS1591
using System;
+using Jellyfin.Data.Enums;
namespace MediaBrowser.Model.Configuration
{
/// <summary>
- /// Class UserConfiguration
+ /// Class UserConfiguration.
/// </summary>
public class UserConfiguration
{
@@ -32,6 +34,7 @@ namespace MediaBrowser.Model.Configuration
public string[] GroupedFolders { get; set; }
public SubtitlePlaybackMode SubtitleMode { get; set; }
+
public bool DisplayCollectionsView { get; set; }
public bool EnableLocalPassword { get; set; }
@@ -39,12 +42,15 @@ namespace MediaBrowser.Model.Configuration
public string[] OrderedViews { get; set; }
public string[] LatestItemsExcludes { get; set; }
+
public string[] MyMediaExcludes { get; set; }
public bool HidePlayedInLatest { get; set; }
public bool RememberAudioSelections { get; set; }
+
public bool RememberSubtitleSelections { get; set; }
+
public bool EnableNextEpisodeAutoPlay { get; set; }
/// <summary>
diff --git a/MediaBrowser.Model/Configuration/XbmcMetadataOptions.cs b/MediaBrowser.Model/Configuration/XbmcMetadataOptions.cs
index d6c1295f4..4d5f996f8 100644
--- a/MediaBrowser.Model/Configuration/XbmcMetadataOptions.cs
+++ b/MediaBrowser.Model/Configuration/XbmcMetadataOptions.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.Configuration
@@ -9,6 +10,7 @@ namespace MediaBrowser.Model.Configuration
public string ReleaseDateFormat { get; set; }
public bool SaveImagePathsInNfo { get; set; }
+
public bool EnablePathSubstitution { get; set; }
public bool EnableExtraThumbsDuplication { get; set; }
diff --git a/MediaBrowser.Model/Cryptography/ICryptoProvider.cs b/MediaBrowser.Model/Cryptography/ICryptoProvider.cs
index 656c04f46..d8b7d848a 100644
--- a/MediaBrowser.Model/Cryptography/ICryptoProvider.cs
+++ b/MediaBrowser.Model/Cryptography/ICryptoProvider.cs
@@ -10,7 +10,7 @@ namespace MediaBrowser.Model.Cryptography
IEnumerable<string> GetSupportedHashMethods();
- byte[] ComputeHash(string HashMethod, byte[] bytes, byte[] salt);
+ byte[] ComputeHash(string hashMethod, byte[] bytes, byte[] salt);
byte[] ComputeHashWithDefaultMethod(byte[] bytes, byte[] salt);
diff --git a/MediaBrowser.Model/Devices/ContentUploadHistory.cs b/MediaBrowser.Model/Devices/ContentUploadHistory.cs
deleted file mode 100644
index c493760d5..000000000
--- a/MediaBrowser.Model/Devices/ContentUploadHistory.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-#pragma warning disable CS1591
-
-namespace MediaBrowser.Model.Devices
-{
- public class ContentUploadHistory
- {
- public string DeviceId { get; set; }
- public LocalFileInfo[] FilesUploaded { get; set; }
-
- public ContentUploadHistory()
- {
- FilesUploaded = new LocalFileInfo[] { };
- }
- }
-}
diff --git a/MediaBrowser.Model/Devices/DeviceInfo.cs b/MediaBrowser.Model/Devices/DeviceInfo.cs
index d2563d1d0..0cccf931c 100644
--- a/MediaBrowser.Model/Devices/DeviceInfo.cs
+++ b/MediaBrowser.Model/Devices/DeviceInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
diff --git a/MediaBrowser.Model/Devices/DeviceOptions.cs b/MediaBrowser.Model/Devices/DeviceOptions.cs
index 8b77fd7fc..037ffeb5e 100644
--- a/MediaBrowser.Model/Devices/DeviceOptions.cs
+++ b/MediaBrowser.Model/Devices/DeviceOptions.cs
@@ -4,6 +4,6 @@ namespace MediaBrowser.Model.Devices
{
public class DeviceOptions
{
- public string CustomName { get; set; }
+ public string? CustomName { get; set; }
}
}
diff --git a/MediaBrowser.Model/Devices/LocalFileInfo.cs b/MediaBrowser.Model/Devices/LocalFileInfo.cs
deleted file mode 100644
index 63a8dc2aa..000000000
--- a/MediaBrowser.Model/Devices/LocalFileInfo.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-#pragma warning disable CS1591
-
-namespace MediaBrowser.Model.Devices
-{
- public class LocalFileInfo
- {
- public string Name { get; set; }
- public string Id { get; set; }
- public string Album { get; set; }
- public string MimeType { get; set; }
- }
-}
diff --git a/MediaBrowser.Model/Dlna/AudioOptions.cs b/MediaBrowser.Model/Dlna/AudioOptions.cs
index 40081b282..67e4ffe03 100644
--- a/MediaBrowser.Model/Dlna/AudioOptions.cs
+++ b/MediaBrowser.Model/Dlna/AudioOptions.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -19,12 +20,17 @@ namespace MediaBrowser.Model.Dlna
}
public bool EnableDirectPlay { get; set; }
+
public bool EnableDirectStream { get; set; }
+
public bool ForceDirectPlay { get; set; }
+
public bool ForceDirectStream { get; set; }
public Guid ItemId { get; set; }
+
public MediaSourceInfo[] MediaSources { get; set; }
+
public DeviceProfile Profile { get; set; }
/// <summary>
@@ -41,7 +47,7 @@ namespace MediaBrowser.Model.Dlna
public int? MaxAudioChannels { get; set; }
/// <summary>
- /// The application's configured quality setting
+ /// The application's configured quality setting.
/// </summary>
public long? MaxBitrate { get; set; }
@@ -79,6 +85,7 @@ namespace MediaBrowser.Model.Dlna
{
return Profile.MaxStaticMusicBitrate;
}
+
return Profile.MaxStaticBitrate;
}
diff --git a/MediaBrowser.Model/Dlna/CodecProfile.cs b/MediaBrowser.Model/Dlna/CodecProfile.cs
index 7bb961deb..d4fd3e673 100644
--- a/MediaBrowser.Model/Dlna/CodecProfile.cs
+++ b/MediaBrowser.Model/Dlna/CodecProfile.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
diff --git a/MediaBrowser.Model/Dlna/ConditionProcessor.cs b/MediaBrowser.Model/Dlna/ConditionProcessor.cs
index 0c3bd8882..faf1ee41b 100644
--- a/MediaBrowser.Model/Dlna/ConditionProcessor.cs
+++ b/MediaBrowser.Model/Dlna/ConditionProcessor.cs
@@ -15,7 +15,7 @@ namespace MediaBrowser.Model.Dlna
int? height,
int? videoBitDepth,
int? videoBitrate,
- string videoProfile,
+ string? videoProfile,
double? videoLevel,
float? videoFramerate,
int? packetLength,
@@ -25,7 +25,7 @@ namespace MediaBrowser.Model.Dlna
int? refFrames,
int? numVideoStreams,
int? numAudioStreams,
- string videoCodecTag,
+ string? videoCodecTag,
bool? isAvc)
{
switch (condition.Property)
@@ -103,7 +103,7 @@ namespace MediaBrowser.Model.Dlna
int? audioBitrate,
int? audioSampleRate,
int? audioBitDepth,
- string audioProfile,
+ string? audioProfile,
bool? isSecondaryTrack)
{
switch (condition.Property)
@@ -154,7 +154,7 @@ namespace MediaBrowser.Model.Dlna
return false;
}
- private static bool IsConditionSatisfied(ProfileCondition condition, string currentValue)
+ private static bool IsConditionSatisfied(ProfileCondition condition, string? currentValue)
{
if (string.IsNullOrEmpty(currentValue))
{
@@ -201,34 +201,6 @@ namespace MediaBrowser.Model.Dlna
return false;
}
- private static bool IsConditionSatisfied(ProfileCondition condition, float currentValue)
- {
- if (currentValue <= 0)
- {
- // If the value is unknown, it satisfies if not marked as required
- return !condition.IsRequired;
- }
-
- if (float.TryParse(condition.Value, NumberStyles.Any, CultureInfo.InvariantCulture, out var expected))
- {
- switch (condition.Condition)
- {
- case ProfileConditionType.Equals:
- return currentValue.Equals(expected);
- case ProfileConditionType.GreaterThanEqual:
- return currentValue >= expected;
- case ProfileConditionType.LessThanEqual:
- return currentValue <= expected;
- case ProfileConditionType.NotEquals:
- return !currentValue.Equals(expected);
- default:
- throw new InvalidOperationException("Unexpected ProfileConditionType: " + condition.Condition);
- }
- }
-
- return false;
- }
-
private static bool IsConditionSatisfied(ProfileCondition condition, double? currentValue)
{
if (!currentValue.HasValue)
diff --git a/MediaBrowser.Model/Dlna/ContainerProfile.cs b/MediaBrowser.Model/Dlna/ContainerProfile.cs
index cc2417a70..f77d9b267 100644
--- a/MediaBrowser.Model/Dlna/ContainerProfile.cs
+++ b/MediaBrowser.Model/Dlna/ContainerProfile.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -10,6 +11,7 @@ namespace MediaBrowser.Model.Dlna
{
[XmlAttribute("type")]
public DlnaProfileType Type { get; set; }
+
public ProfileCondition[] Conditions { get; set; }
[XmlAttribute("container")]
diff --git a/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs b/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs
index a20f11503..a579f8464 100644
--- a/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs
+++ b/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -32,7 +33,10 @@ namespace MediaBrowser.Model.Dlna
DlnaFlags.InteractiveTransferMode |
DlnaFlags.DlnaV15;
- string dlnaflags = string.Format(";DLNA.ORG_FLAGS={0}", DlnaMaps.FlagsToString(flagValue));
+ string dlnaflags = string.Format(
+ CultureInfo.InvariantCulture,
+ ";DLNA.ORG_FLAGS={0}",
+ DlnaMaps.FlagsToString(flagValue));
ResponseProfile mediaProfile = _profile.GetImageMediaProfile(container,
width,
@@ -75,11 +79,11 @@ namespace MediaBrowser.Model.Dlna
DlnaFlags.InteractiveTransferMode |
DlnaFlags.DlnaV15;
- //if (isDirectStream)
+ // if (isDirectStream)
//{
// flagValue = flagValue | DlnaFlags.ByteBasedSeek;
//}
- //else if (runtimeTicks.HasValue)
+ // else if (runtimeTicks.HasValue)
//{
// flagValue = flagValue | DlnaFlags.TimeBasedSeek;
//}
@@ -144,11 +148,11 @@ namespace MediaBrowser.Model.Dlna
DlnaFlags.InteractiveTransferMode |
DlnaFlags.DlnaV15;
- //if (isDirectStream)
+ // if (isDirectStream)
//{
// flagValue = flagValue | DlnaFlags.ByteBasedSeek;
//}
- //else if (runtimeTicks.HasValue)
+ // else if (runtimeTicks.HasValue)
//{
// flagValue = flagValue | DlnaFlags.TimeBasedSeek;
//}
diff --git a/MediaBrowser.Model/Dlna/DeviceIdentification.cs b/MediaBrowser.Model/Dlna/DeviceIdentification.cs
index f1699d930..85cc9e3c1 100644
--- a/MediaBrowser.Model/Dlna/DeviceIdentification.cs
+++ b/MediaBrowser.Model/Dlna/DeviceIdentification.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
diff --git a/MediaBrowser.Model/Dlna/DeviceProfile.cs b/MediaBrowser.Model/Dlna/DeviceProfile.cs
index 3813ac5eb..7e921b1fd 100644
--- a/MediaBrowser.Model/Dlna/DeviceProfile.cs
+++ b/MediaBrowser.Model/Dlna/DeviceProfile.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -26,16 +27,25 @@ namespace MediaBrowser.Model.Dlna
public DeviceIdentification Identification { get; set; }
public string FriendlyName { get; set; }
+
public string Manufacturer { get; set; }
+
public string ManufacturerUrl { get; set; }
+
public string ModelName { get; set; }
+
public string ModelDescription { get; set; }
+
public string ModelNumber { get; set; }
+
public string ModelUrl { get; set; }
+
public string SerialNumber { get; set; }
public bool EnableAlbumArtInDidl { get; set; }
+
public bool EnableSingleAlbumArtLimit { get; set; }
+
public bool EnableSingleSubtitleLimit { get; set; }
public string SupportedMediaTypes { get; set; }
@@ -45,15 +55,19 @@ namespace MediaBrowser.Model.Dlna
public string AlbumArtPn { get; set; }
public int MaxAlbumArtWidth { get; set; }
+
public int MaxAlbumArtHeight { get; set; }
public int? MaxIconWidth { get; set; }
+
public int? MaxIconHeight { get; set; }
public long? MaxStreamingBitrate { get; set; }
+
public long? MaxStaticBitrate { get; set; }
public int? MusicStreamingTranscodingBitrate { get; set; }
+
public int? MaxStaticMusicBitrate { get; set; }
/// <summary>
@@ -64,10 +78,13 @@ namespace MediaBrowser.Model.Dlna
public string ProtocolInfo { get; set; }
public int TimelineOffsetSeconds { get; set; }
+
public bool RequiresPlainVideoItems { get; set; }
+
public bool RequiresPlainFolders { get; set; }
public bool EnableMSMediaReceiverRegistrar { get; set; }
+
public bool IgnoreTranscodeByteRangeRequests { get; set; }
public XmlAttribute[] XmlRootAttributes { get; set; }
@@ -87,6 +104,7 @@ namespace MediaBrowser.Model.Dlna
public ContainerProfile[] ContainerProfiles { get; set; }
public CodecProfile[] CodecProfiles { get; set; }
+
public ResponseProfile[] ResponseProfiles { get; set; }
public SubtitleProfile[] SubtitleProfiles { get; set; }
@@ -168,6 +186,7 @@ namespace MediaBrowser.Model.Dlna
return i;
}
+
return null;
}
@@ -208,6 +227,7 @@ namespace MediaBrowser.Model.Dlna
return i;
}
+
return null;
}
@@ -253,6 +273,7 @@ namespace MediaBrowser.Model.Dlna
return i;
}
+
return null;
}
@@ -317,6 +338,7 @@ namespace MediaBrowser.Model.Dlna
return i;
}
+
return null;
}
}
diff --git a/MediaBrowser.Model/Dlna/DeviceProfileInfo.cs b/MediaBrowser.Model/Dlna/DeviceProfileInfo.cs
index 347583965..74c32c523 100644
--- a/MediaBrowser.Model/Dlna/DeviceProfileInfo.cs
+++ b/MediaBrowser.Model/Dlna/DeviceProfileInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.Dlna
diff --git a/MediaBrowser.Model/Dlna/DirectPlayProfile.cs b/MediaBrowser.Model/Dlna/DirectPlayProfile.cs
index b43f8633e..88cb83991 100644
--- a/MediaBrowser.Model/Dlna/DirectPlayProfile.cs
+++ b/MediaBrowser.Model/Dlna/DirectPlayProfile.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System.Xml.Serialization;
diff --git a/MediaBrowser.Model/Dlna/HttpHeaderInfo.cs b/MediaBrowser.Model/Dlna/HttpHeaderInfo.cs
index f23a24084..17c4dffcc 100644
--- a/MediaBrowser.Model/Dlna/HttpHeaderInfo.cs
+++ b/MediaBrowser.Model/Dlna/HttpHeaderInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System.Xml.Serialization;
diff --git a/MediaBrowser.Model/Dlna/ITranscoderSupport.cs b/MediaBrowser.Model/Dlna/ITranscoderSupport.cs
index 7e35cc85b..d9bd094d9 100644
--- a/MediaBrowser.Model/Dlna/ITranscoderSupport.cs
+++ b/MediaBrowser.Model/Dlna/ITranscoderSupport.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.Dlna
@@ -5,7 +6,9 @@ namespace MediaBrowser.Model.Dlna
public interface ITranscoderSupport
{
bool CanEncodeToAudioCodec(string codec);
+
bool CanEncodeToSubtitleCodec(string codec);
+
bool CanExtractSubtitles(string codec);
}
@@ -15,10 +18,12 @@ namespace MediaBrowser.Model.Dlna
{
return true;
}
+
public bool CanEncodeToSubtitleCodec(string codec)
{
return true;
}
+
public bool CanExtractSubtitles(string codec)
{
return true;
diff --git a/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs b/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs
index 4cd318abb..398c5db8c 100644
--- a/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs
+++ b/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -21,28 +22,35 @@ namespace MediaBrowser.Model.Dlna
if (string.Equals(container, "asf", StringComparison.OrdinalIgnoreCase))
{
MediaFormatProfile? val = ResolveVideoASFFormat(videoCodec, audioCodec, width, height);
- return val.HasValue ? new MediaFormatProfile[] { val.Value } : new MediaFormatProfile[] { };
+ return val.HasValue ? new MediaFormatProfile[] { val.Value } : Array.Empty<MediaFormatProfile>();
}
if (string.Equals(container, "mp4", StringComparison.OrdinalIgnoreCase))
{
MediaFormatProfile? val = ResolveVideoMP4Format(videoCodec, audioCodec, width, height);
- return val.HasValue ? new MediaFormatProfile[] { val.Value } : new MediaFormatProfile[] { };
+ return val.HasValue ? new MediaFormatProfile[] { val.Value } : Array.Empty<MediaFormatProfile>();
}
if (string.Equals(container, "avi", StringComparison.OrdinalIgnoreCase))
+ {
return new MediaFormatProfile[] { MediaFormatProfile.AVI };
+ }
if (string.Equals(container, "mkv", StringComparison.OrdinalIgnoreCase))
+ {
return new MediaFormatProfile[] { MediaFormatProfile.MATROSKA };
+ }
if (string.Equals(container, "mpeg2ps", StringComparison.OrdinalIgnoreCase) ||
string.Equals(container, "ts", StringComparison.OrdinalIgnoreCase))
-
+ {
return new MediaFormatProfile[] { MediaFormatProfile.MPEG_PS_NTSC, MediaFormatProfile.MPEG_PS_PAL };
+ }
if (string.Equals(container, "mpeg1video", StringComparison.OrdinalIgnoreCase))
+ {
return new MediaFormatProfile[] { MediaFormatProfile.MPEG1 };
+ }
if (string.Equals(container, "mpeg2ts", StringComparison.OrdinalIgnoreCase) ||
string.Equals(container, "mpegts", StringComparison.OrdinalIgnoreCase) ||
@@ -53,26 +61,32 @@ namespace MediaBrowser.Model.Dlna
}
if (string.Equals(container, "flv", StringComparison.OrdinalIgnoreCase))
+ {
return new MediaFormatProfile[] { MediaFormatProfile.FLV };
+ }
if (string.Equals(container, "wtv", StringComparison.OrdinalIgnoreCase))
+ {
return new MediaFormatProfile[] { MediaFormatProfile.WTV };
+ }
if (string.Equals(container, "3gp", StringComparison.OrdinalIgnoreCase))
{
MediaFormatProfile? val = ResolveVideo3GPFormat(videoCodec, audioCodec);
- return val.HasValue ? new MediaFormatProfile[] { val.Value } : new MediaFormatProfile[] { };
+ return val.HasValue ? new MediaFormatProfile[] { val.Value } : Array.Empty<MediaFormatProfile>();
}
if (string.Equals(container, "ogv", StringComparison.OrdinalIgnoreCase) || string.Equals(container, "ogg", StringComparison.OrdinalIgnoreCase))
+ {
return new MediaFormatProfile[] { MediaFormatProfile.OGV };
+ }
- return new MediaFormatProfile[] { };
+ return Array.Empty<MediaFormatProfile>();
}
private MediaFormatProfile[] ResolveVideoMPEG2TSFormat(string videoCodec, string audioCodec, int? width, int? height, TransportStreamTimestamp timestampType)
{
- string suffix = "";
+ string suffix = string.Empty;
switch (timestampType)
{
@@ -92,22 +106,27 @@ namespace MediaBrowser.Model.Dlna
if (string.Equals(videoCodec, "mpeg2video", StringComparison.OrdinalIgnoreCase))
{
- var list = new List<MediaFormatProfile>();
-
- list.Add(ValueOf("MPEG_TS_SD_NA" + suffix));
- list.Add(ValueOf("MPEG_TS_SD_EU" + suffix));
- list.Add(ValueOf("MPEG_TS_SD_KO" + suffix));
+ var list = new List<MediaFormatProfile>
+ {
+ ValueOf("MPEG_TS_SD_NA" + suffix),
+ ValueOf("MPEG_TS_SD_EU" + suffix),
+ ValueOf("MPEG_TS_SD_KO" + suffix)
+ };
if ((timestampType == TransportStreamTimestamp.Valid) && string.Equals(audioCodec, "aac", StringComparison.OrdinalIgnoreCase))
{
list.Add(MediaFormatProfile.MPEG_TS_JP_T);
}
+
return list.ToArray();
}
+
if (string.Equals(videoCodec, "h264", StringComparison.OrdinalIgnoreCase))
{
if (string.Equals(audioCodec, "lpcm", StringComparison.OrdinalIgnoreCase))
+ {
return new MediaFormatProfile[] { MediaFormatProfile.AVC_TS_HD_50_LPCM_T };
+ }
if (string.Equals(audioCodec, "dts", StringComparison.OrdinalIgnoreCase))
{
@@ -115,6 +134,7 @@ namespace MediaBrowser.Model.Dlna
{
return new MediaFormatProfile[] { MediaFormatProfile.AVC_TS_HD_DTS_ISO };
}
+
return new MediaFormatProfile[] { MediaFormatProfile.AVC_TS_HD_DTS_T };
}
@@ -129,14 +149,20 @@ namespace MediaBrowser.Model.Dlna
}
if (string.Equals(audioCodec, "aac", StringComparison.OrdinalIgnoreCase))
+ {
return new MediaFormatProfile[] { ValueOf(string.Format("AVC_TS_MP_{0}D_AAC_MULT5{1}", resolution, suffix)) };
+ }
if (string.Equals(audioCodec, "mp3", StringComparison.OrdinalIgnoreCase))
+ {
return new MediaFormatProfile[] { ValueOf(string.Format("AVC_TS_MP_{0}D_MPEG1_L3{1}", resolution, suffix)) };
+ }
if (string.IsNullOrEmpty(audioCodec) ||
string.Equals(audioCodec, "ac3", StringComparison.OrdinalIgnoreCase))
+ {
return new MediaFormatProfile[] { ValueOf(string.Format("AVC_TS_MP_{0}D_AC3{1}", resolution, suffix)) };
+ }
}
else if (string.Equals(videoCodec, "vc1", StringComparison.OrdinalIgnoreCase))
{
@@ -146,26 +172,38 @@ namespace MediaBrowser.Model.Dlna
{
return new MediaFormatProfile[] { MediaFormatProfile.VC1_TS_AP_L2_AC3_ISO };
}
+
return new MediaFormatProfile[] { MediaFormatProfile.VC1_TS_AP_L1_AC3_ISO };
}
+
if (string.Equals(audioCodec, "dts", StringComparison.OrdinalIgnoreCase))
{
suffix = string.Equals(suffix, "_ISO", StringComparison.OrdinalIgnoreCase) ? suffix : "_T";
return new MediaFormatProfile[] { ValueOf(string.Format("VC1_TS_HD_DTS{0}", suffix)) };
}
-
}
else if (string.Equals(videoCodec, "mpeg4", StringComparison.OrdinalIgnoreCase) || string.Equals(videoCodec, "msmpeg4", StringComparison.OrdinalIgnoreCase))
{
if (string.Equals(audioCodec, "aac", StringComparison.OrdinalIgnoreCase))
+ {
return new MediaFormatProfile[] { ValueOf(string.Format("MPEG4_P2_TS_ASP_AAC{0}", suffix)) };
+ }
+
if (string.Equals(audioCodec, "mp3", StringComparison.OrdinalIgnoreCase))
+ {
return new MediaFormatProfile[] { ValueOf(string.Format("MPEG4_P2_TS_ASP_MPEG1_L3{0}", suffix)) };
+ }
+
if (string.Equals(audioCodec, "mp2", StringComparison.OrdinalIgnoreCase))
+ {
return new MediaFormatProfile[] { ValueOf(string.Format("MPEG4_P2_TS_ASP_MPEG2_L2{0}", suffix)) };
+ }
+
if (string.Equals(audioCodec, "ac3", StringComparison.OrdinalIgnoreCase))
+ {
return new MediaFormatProfile[] { ValueOf(string.Format("MPEG4_P2_TS_ASP_AC3{0}", suffix)) };
+ }
}
return new MediaFormatProfile[] { };
@@ -181,27 +219,36 @@ namespace MediaBrowser.Model.Dlna
if (string.Equals(videoCodec, "h264", StringComparison.OrdinalIgnoreCase))
{
if (string.Equals(audioCodec, "lpcm", StringComparison.OrdinalIgnoreCase))
+ {
return MediaFormatProfile.AVC_MP4_LPCM;
+ }
+
if (string.IsNullOrEmpty(audioCodec) ||
string.Equals(audioCodec, "ac3", StringComparison.OrdinalIgnoreCase))
{
return MediaFormatProfile.AVC_MP4_MP_SD_AC3;
}
+
if (string.Equals(audioCodec, "mp3", StringComparison.OrdinalIgnoreCase))
{
return MediaFormatProfile.AVC_MP4_MP_SD_MPEG1_L3;
}
+
if (width.HasValue && height.HasValue)
{
if ((width.Value <= 720) && (height.Value <= 576))
{
if (string.Equals(audioCodec, "aac", StringComparison.OrdinalIgnoreCase))
+ {
return MediaFormatProfile.AVC_MP4_MP_SD_AAC_MULT5;
+ }
}
else if ((width.Value <= 1280) && (height.Value <= 720))
{
if (string.Equals(audioCodec, "aac", StringComparison.OrdinalIgnoreCase))
+ {
return MediaFormatProfile.AVC_MP4_MP_HD_720p_AAC;
+ }
}
else if ((width.Value <= 1920) && (height.Value <= 1080))
{
@@ -218,7 +265,10 @@ namespace MediaBrowser.Model.Dlna
if (width.HasValue && height.HasValue && width.Value <= 720 && height.Value <= 576)
{
if (string.IsNullOrEmpty(audioCodec) || string.Equals(audioCodec, "aac", StringComparison.OrdinalIgnoreCase))
+ {
return MediaFormatProfile.MPEG4_P2_MP4_ASP_AAC;
+ }
+
if (string.Equals(audioCodec, "ac3", StringComparison.OrdinalIgnoreCase) || string.Equals(audioCodec, "mp3", StringComparison.OrdinalIgnoreCase))
{
return MediaFormatProfile.MPEG4_P2_MP4_NDSD;
@@ -242,15 +292,22 @@ namespace MediaBrowser.Model.Dlna
if (string.Equals(videoCodec, "h264", StringComparison.OrdinalIgnoreCase))
{
if (string.IsNullOrEmpty(audioCodec) || string.Equals(audioCodec, "aac", StringComparison.OrdinalIgnoreCase))
+ {
return MediaFormatProfile.AVC_3GPP_BL_QCIF15_AAC;
+ }
}
else if (string.Equals(videoCodec, "mpeg4", StringComparison.OrdinalIgnoreCase) ||
string.Equals(videoCodec, "msmpeg4", StringComparison.OrdinalIgnoreCase))
{
if (string.IsNullOrEmpty(audioCodec) || string.Equals(audioCodec, "wma", StringComparison.OrdinalIgnoreCase))
+ {
return MediaFormatProfile.MPEG4_P2_3GPP_SP_L0B_AAC;
+ }
+
if (string.Equals(audioCodec, "amrnb", StringComparison.OrdinalIgnoreCase))
+ {
return MediaFormatProfile.MPEG4_P2_3GPP_SP_L0B_AMR;
+ }
}
else if (string.Equals(videoCodec, "h263", StringComparison.OrdinalIgnoreCase) && string.Equals(audioCodec, "amrnb", StringComparison.OrdinalIgnoreCase))
{
@@ -274,6 +331,7 @@ namespace MediaBrowser.Model.Dlna
{
return MediaFormatProfile.WMVMED_FULL;
}
+
return MediaFormatProfile.WMVMED_PRO;
}
}
@@ -282,6 +340,7 @@ namespace MediaBrowser.Model.Dlna
{
return MediaFormatProfile.WMVHIGH_FULL;
}
+
return MediaFormatProfile.WMVHIGH_PRO;
}
@@ -290,11 +349,19 @@ namespace MediaBrowser.Model.Dlna
if (width.HasValue && height.HasValue)
{
if ((width.Value <= 720) && (height.Value <= 576))
+ {
return MediaFormatProfile.VC1_ASF_AP_L1_WMA;
+ }
+
if ((width.Value <= 1280) && (height.Value <= 720))
+ {
return MediaFormatProfile.VC1_ASF_AP_L2_WMA;
+ }
+
if ((width.Value <= 1920) && (height.Value <= 1080))
+ {
return MediaFormatProfile.VC1_ASF_AP_L3_WMA;
+ }
}
}
else if (string.Equals(videoCodec, "mpeg2video", StringComparison.OrdinalIgnoreCase))
@@ -308,27 +375,41 @@ namespace MediaBrowser.Model.Dlna
public MediaFormatProfile? ResolveAudioFormat(string container, int? bitrate, int? frequency, int? channels)
{
if (string.Equals(container, "asf", StringComparison.OrdinalIgnoreCase))
+ {
return ResolveAudioASFFormat(bitrate);
+ }
if (string.Equals(container, "mp3", StringComparison.OrdinalIgnoreCase))
+ {
return MediaFormatProfile.MP3;
+ }
if (string.Equals(container, "lpcm", StringComparison.OrdinalIgnoreCase))
+ {
return ResolveAudioLPCMFormat(frequency, channels);
+ }
if (string.Equals(container, "mp4", StringComparison.OrdinalIgnoreCase) ||
string.Equals(container, "aac", StringComparison.OrdinalIgnoreCase))
+ {
return ResolveAudioMP4Format(bitrate);
+ }
if (string.Equals(container, "adts", StringComparison.OrdinalIgnoreCase))
+ {
return ResolveAudioADTSFormat(bitrate);
+ }
if (string.Equals(container, "flac", StringComparison.OrdinalIgnoreCase))
+ {
return MediaFormatProfile.FLAC;
+ }
if (string.Equals(container, "oga", StringComparison.OrdinalIgnoreCase) ||
string.Equals(container, "ogg", StringComparison.OrdinalIgnoreCase))
+ {
return MediaFormatProfile.OGG;
+ }
return null;
}
@@ -339,6 +420,7 @@ namespace MediaBrowser.Model.Dlna
{
return MediaFormatProfile.WMA_BASE;
}
+
return MediaFormatProfile.WMA_FULL;
}
@@ -350,14 +432,17 @@ namespace MediaBrowser.Model.Dlna
{
return MediaFormatProfile.LPCM16_44_MONO;
}
+
if (frequency.Value == 44100 && channels.Value == 2)
{
return MediaFormatProfile.LPCM16_44_STEREO;
}
+
if (frequency.Value == 48000 && channels.Value == 1)
{
return MediaFormatProfile.LPCM16_48_MONO;
}
+
if (frequency.Value == 48000 && channels.Value == 2)
{
return MediaFormatProfile.LPCM16_48_STEREO;
@@ -375,6 +460,7 @@ namespace MediaBrowser.Model.Dlna
{
return MediaFormatProfile.AAC_ISO_320;
}
+
return MediaFormatProfile.AAC_ISO;
}
@@ -384,6 +470,7 @@ namespace MediaBrowser.Model.Dlna
{
return MediaFormatProfile.AAC_ADTS_320;
}
+
return MediaFormatProfile.AAC_ADTS;
}
@@ -394,13 +481,19 @@ namespace MediaBrowser.Model.Dlna
return ResolveImageJPGFormat(width, height);
if (string.Equals(container, "png", StringComparison.OrdinalIgnoreCase))
+ {
return ResolveImagePNGFormat(width, height);
+ }
if (string.Equals(container, "gif", StringComparison.OrdinalIgnoreCase))
+ {
return MediaFormatProfile.GIF_LRG;
+ }
if (string.Equals(container, "raw", StringComparison.OrdinalIgnoreCase))
+ {
return MediaFormatProfile.RAW;
+ }
return null;
}
@@ -410,10 +503,14 @@ namespace MediaBrowser.Model.Dlna
if (width.HasValue && height.HasValue)
{
if ((width.Value <= 160) && (height.Value <= 160))
+ {
return MediaFormatProfile.JPEG_TN;
+ }
if ((width.Value <= 640) && (height.Value <= 480))
+ {
return MediaFormatProfile.JPEG_SM;
+ }
if ((width.Value <= 1024) && (height.Value <= 768))
{
@@ -431,7 +528,9 @@ namespace MediaBrowser.Model.Dlna
if (width.HasValue && height.HasValue)
{
if ((width.Value <= 160) && (height.Value <= 160))
+ {
return MediaFormatProfile.PNG_TN;
+ }
}
return MediaFormatProfile.PNG_LRG;
diff --git a/MediaBrowser.Model/Dlna/ProfileCondition.cs b/MediaBrowser.Model/Dlna/ProfileCondition.cs
index 2021038d8..4b39d6875 100644
--- a/MediaBrowser.Model/Dlna/ProfileCondition.cs
+++ b/MediaBrowser.Model/Dlna/ProfileCondition.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System.Xml.Serialization;
@@ -6,18 +7,6 @@ namespace MediaBrowser.Model.Dlna
{
public class ProfileCondition
{
- [XmlAttribute("condition")]
- public ProfileConditionType Condition { get; set; }
-
- [XmlAttribute("property")]
- public ProfileConditionValue Property { get; set; }
-
- [XmlAttribute("value")]
- public string Value { get; set; }
-
- [XmlAttribute("isRequired")]
- public bool IsRequired { get; set; }
-
public ProfileCondition()
{
IsRequired = true;
@@ -26,7 +15,6 @@ namespace MediaBrowser.Model.Dlna
public ProfileCondition(ProfileConditionType condition, ProfileConditionValue property, string value)
: this(condition, property, value, false)
{
-
}
public ProfileCondition(ProfileConditionType condition, ProfileConditionValue property, string value, bool isRequired)
@@ -36,5 +24,17 @@ namespace MediaBrowser.Model.Dlna
Value = value;
IsRequired = isRequired;
}
+
+ [XmlAttribute("condition")]
+ public ProfileConditionType Condition { get; set; }
+
+ [XmlAttribute("property")]
+ public ProfileConditionValue Property { get; set; }
+
+ [XmlAttribute("value")]
+ public string Value { get; set; }
+
+ [XmlAttribute("isRequired")]
+ public bool IsRequired { get; set; }
}
}
diff --git a/MediaBrowser.Model/Dlna/ResolutionConfiguration.cs b/MediaBrowser.Model/Dlna/ResolutionConfiguration.cs
index c26eeec77..30c44fbe0 100644
--- a/MediaBrowser.Model/Dlna/ResolutionConfiguration.cs
+++ b/MediaBrowser.Model/Dlna/ResolutionConfiguration.cs
@@ -5,6 +5,7 @@ namespace MediaBrowser.Model.Dlna
public class ResolutionConfiguration
{
public int MaxWidth { get; set; }
+
public int MaxBitrate { get; set; }
public ResolutionConfiguration(int maxWidth, int maxBitrate)
diff --git a/MediaBrowser.Model/Dlna/ResolutionNormalizer.cs b/MediaBrowser.Model/Dlna/ResolutionNormalizer.cs
index 8235b72d1..102db3b44 100644
--- a/MediaBrowser.Model/Dlna/ResolutionNormalizer.cs
+++ b/MediaBrowser.Model/Dlna/ResolutionNormalizer.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -17,7 +18,8 @@ namespace MediaBrowser.Model.Dlna
new ResolutionConfiguration(3840, 35000000)
};
- public static ResolutionOptions Normalize(int? inputBitrate,
+ public static ResolutionOptions Normalize(
+ int? inputBitrate,
int? unused1,
int? unused2,
int outputBitrate,
@@ -83,6 +85,7 @@ namespace MediaBrowser.Model.Dlna
{
return .5;
}
+
return 1;
}
diff --git a/MediaBrowser.Model/Dlna/ResolutionOptions.cs b/MediaBrowser.Model/Dlna/ResolutionOptions.cs
index 5ea0252cb..774592abc 100644
--- a/MediaBrowser.Model/Dlna/ResolutionOptions.cs
+++ b/MediaBrowser.Model/Dlna/ResolutionOptions.cs
@@ -5,6 +5,7 @@ namespace MediaBrowser.Model.Dlna
public class ResolutionOptions
{
public int? MaxWidth { get; set; }
+
public int? MaxHeight { get; set; }
}
}
diff --git a/MediaBrowser.Model/Dlna/ResponseProfile.cs b/MediaBrowser.Model/Dlna/ResponseProfile.cs
index c264cb936..48f53f06c 100644
--- a/MediaBrowser.Model/Dlna/ResponseProfile.cs
+++ b/MediaBrowser.Model/Dlna/ResponseProfile.cs
@@ -1,5 +1,7 @@
+#nullable disable
#pragma warning disable CS1591
+using System;
using System.Xml.Serialization;
namespace MediaBrowser.Model.Dlna
@@ -28,7 +30,7 @@ namespace MediaBrowser.Model.Dlna
public ResponseProfile()
{
- Conditions = new ProfileCondition[] { };
+ Conditions = Array.Empty<ProfileCondition>();
}
public string[] GetContainers()
diff --git a/MediaBrowser.Model/Dlna/SearchCriteria.cs b/MediaBrowser.Model/Dlna/SearchCriteria.cs
index 394fb9af9..94f5bd3db 100644
--- a/MediaBrowser.Model/Dlna/SearchCriteria.cs
+++ b/MediaBrowser.Model/Dlna/SearchCriteria.cs
@@ -34,9 +34,9 @@ namespace MediaBrowser.Model.Dlna
public SearchCriteria(string search)
{
- if (string.IsNullOrEmpty(search))
+ if (search.Length == 0)
{
- throw new ArgumentNullException(nameof(search));
+ throw new ArgumentException("String can't be empty.", nameof(search));
}
SearchType = SearchType.Unknown;
@@ -48,11 +48,10 @@ namespace MediaBrowser.Model.Dlna
if (subFactors.Length == 3)
{
-
if (string.Equals("upnp:class", subFactors[0], StringComparison.OrdinalIgnoreCase) &&
- (string.Equals("=", subFactors[1]) || string.Equals("derivedfrom", subFactors[1], StringComparison.OrdinalIgnoreCase)))
+ (string.Equals("=", subFactors[1], StringComparison.Ordinal) || string.Equals("derivedfrom", subFactors[1], StringComparison.OrdinalIgnoreCase)))
{
- if (string.Equals("\"object.item.imageItem\"", subFactors[2]) || string.Equals("\"object.item.imageItem.photo\"", subFactors[2], StringComparison.OrdinalIgnoreCase))
+ if (string.Equals("\"object.item.imageItem\"", subFactors[2], StringComparison.Ordinal) || string.Equals("\"object.item.imageItem.photo\"", subFactors[2], StringComparison.OrdinalIgnoreCase))
{
SearchType = SearchType.Image;
}
diff --git a/MediaBrowser.Model/Dlna/SortCriteria.cs b/MediaBrowser.Model/Dlna/SortCriteria.cs
index 3f8985fdc..1f7fa76ad 100644
--- a/MediaBrowser.Model/Dlna/SortCriteria.cs
+++ b/MediaBrowser.Model/Dlna/SortCriteria.cs
@@ -10,7 +10,6 @@ namespace MediaBrowser.Model.Dlna
public SortCriteria(string value)
{
-
}
}
}
diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs
index 58755b171..cfe862f5a 100644
--- a/MediaBrowser.Model/Dlna/StreamBuilder.cs
+++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -108,7 +109,6 @@ namespace MediaBrowser.Model.Dlna
}
return 1;
-
}).ThenBy(i =>
{
switch (i.PlayMethod)
@@ -120,7 +120,6 @@ namespace MediaBrowser.Model.Dlna
default:
return 1;
}
-
}).ThenBy(i =>
{
switch (i.MediaSource.Protocol)
@@ -130,7 +129,6 @@ namespace MediaBrowser.Model.Dlna
default:
return 1;
}
-
}).ThenBy(i =>
{
if (maxBitrate > 0)
@@ -142,7 +140,6 @@ namespace MediaBrowser.Model.Dlna
}
return 0;
-
}).ThenBy(streams.IndexOf);
}
@@ -339,6 +336,7 @@ namespace MediaBrowser.Model.Dlna
{
transcodeReasons.Add(transcodeReason.Value);
}
+
all = false;
break;
}
@@ -386,7 +384,10 @@ namespace MediaBrowser.Model.Dlna
audioCodecProfiles.Add(i);
}
- if (audioCodecProfiles.Count >= 1) break;
+ if (audioCodecProfiles.Count >= 1)
+ {
+ break;
+ }
}
var audioTranscodingConditions = new List<ProfileCondition>();
@@ -629,10 +630,12 @@ namespace MediaBrowser.Model.Dlna
{
playlistItem.MinSegments = transcodingProfile.MinSegments;
}
+
if (transcodingProfile.SegmentLength > 0)
{
playlistItem.SegmentLength = transcodingProfile.SegmentLength;
}
+
playlistItem.SubProtocol = transcodingProfile.Protocol;
if (!string.IsNullOrEmpty(transcodingProfile.MaxAudioChannels)
@@ -779,7 +782,7 @@ namespace MediaBrowser.Model.Dlna
if (!ConditionProcessor.IsVideoConditionSatisfied(applyCondition, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, isInterlaced, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc))
{
- //LogConditionFailure(options.Profile, "VideoCodecProfile.ApplyConditions", applyCondition, item);
+ // LogConditionFailure(options.Profile, "VideoCodecProfile.ApplyConditions", applyCondition, item);
applyConditions = false;
break;
}
@@ -823,7 +826,7 @@ namespace MediaBrowser.Model.Dlna
if (!ConditionProcessor.IsVideoAudioConditionSatisfied(applyCondition, audioChannels, inputAudioBitrate, inputAudioSampleRate, inputAudioBitDepth, audioProfile, isSecondaryAudio))
{
- //LogConditionFailure(options.Profile, "VideoCodecProfile.ApplyConditions", applyCondition, item);
+ // LogConditionFailure(options.Profile, "VideoCodecProfile.ApplyConditions", applyCondition, item);
applyConditions = false;
break;
}
@@ -949,6 +952,7 @@ namespace MediaBrowser.Model.Dlna
{
return (PlayMethod.DirectPlay, new List<TranscodeReason>());
}
+
if (options.ForceDirectStream)
{
return (PlayMethod.DirectStream, new List<TranscodeReason>());
@@ -1044,7 +1048,7 @@ namespace MediaBrowser.Model.Dlna
{
if (!ConditionProcessor.IsVideoConditionSatisfied(applyCondition, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, isInterlaced, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc))
{
- //LogConditionFailure(profile, "VideoCodecProfile.ApplyConditions", applyCondition, mediaSource);
+ // LogConditionFailure(profile, "VideoCodecProfile.ApplyConditions", applyCondition, mediaSource);
applyConditions = false;
break;
}
@@ -1090,7 +1094,7 @@ namespace MediaBrowser.Model.Dlna
{
if (!ConditionProcessor.IsVideoAudioConditionSatisfied(applyCondition, audioChannels, audioBitrate, audioSampleRate, audioBitDepth, audioProfile, isSecondaryAudio))
{
- //LogConditionFailure(profile, "VideoAudioCodecProfile.ApplyConditions", applyCondition, mediaSource);
+ // LogConditionFailure(profile, "VideoAudioCodecProfile.ApplyConditions", applyCondition, mediaSource);
applyConditions = false;
break;
}
@@ -1263,6 +1267,7 @@ namespace MediaBrowser.Model.Dlna
return true;
}
}
+
return false;
}
@@ -1365,14 +1370,17 @@ namespace MediaBrowser.Model.Dlna
{
throw new ArgumentException("ItemId is required");
}
+
if (string.IsNullOrEmpty(options.DeviceId))
{
throw new ArgumentException("DeviceId is required");
}
+
if (options.Profile == null)
{
throw new ArgumentException("Profile is required");
}
+
if (options.MediaSources == null)
{
throw new ArgumentException("MediaSources is required");
@@ -1420,6 +1428,7 @@ namespace MediaBrowser.Model.Dlna
item.AudioBitrate = Math.Max(num, item.AudioBitrate ?? num);
}
}
+
break;
}
case ProfileConditionValue.AudioChannels:
@@ -1454,6 +1463,7 @@ namespace MediaBrowser.Model.Dlna
item.SetOption(qualifier, "audiochannels", Math.Max(num, item.GetTargetAudioChannels(qualifier) ?? num).ToString(CultureInfo.InvariantCulture));
}
}
+
break;
}
case ProfileConditionValue.IsAvc:
@@ -1474,6 +1484,7 @@ namespace MediaBrowser.Model.Dlna
item.RequireAvc = true;
}
}
+
break;
}
case ProfileConditionValue.IsAnamorphic:
@@ -1494,6 +1505,7 @@ namespace MediaBrowser.Model.Dlna
item.RequireNonAnamorphic = true;
}
}
+
break;
}
case ProfileConditionValue.IsInterlaced:
@@ -1524,6 +1536,7 @@ namespace MediaBrowser.Model.Dlna
item.SetOption(qualifier, "deinterlace", "true");
}
}
+
break;
}
case ProfileConditionValue.AudioProfile:
@@ -1569,6 +1582,7 @@ namespace MediaBrowser.Model.Dlna
item.SetOption(qualifier, "maxrefframes", Math.Max(num, item.GetTargetRefFrames(qualifier) ?? num).ToString(CultureInfo.InvariantCulture));
}
}
+
break;
}
case ProfileConditionValue.VideoBitDepth:
@@ -1603,6 +1617,7 @@ namespace MediaBrowser.Model.Dlna
item.SetOption(qualifier, "videobitdepth", Math.Max(num, item.GetTargetVideoBitDepth(qualifier) ?? num).ToString(CultureInfo.InvariantCulture));
}
}
+
break;
}
case ProfileConditionValue.VideoProfile:
@@ -1625,6 +1640,7 @@ namespace MediaBrowser.Model.Dlna
item.SetOption(qualifier, "profile", string.Join(",", values));
}
}
+
break;
}
case ProfileConditionValue.Height:
@@ -1649,6 +1665,7 @@ namespace MediaBrowser.Model.Dlna
item.MaxHeight = Math.Max(num, item.MaxHeight ?? num);
}
}
+
break;
}
case ProfileConditionValue.VideoBitrate:
@@ -1673,6 +1690,7 @@ namespace MediaBrowser.Model.Dlna
item.VideoBitrate = Math.Max(num, item.VideoBitrate ?? num);
}
}
+
break;
}
case ProfileConditionValue.VideoFramerate:
@@ -1697,6 +1715,7 @@ namespace MediaBrowser.Model.Dlna
item.MaxFramerate = Math.Max(num, item.MaxFramerate ?? num);
}
}
+
break;
}
case ProfileConditionValue.VideoLevel:
@@ -1721,6 +1740,7 @@ namespace MediaBrowser.Model.Dlna
item.SetOption(qualifier, "level", Math.Max(num, item.GetTargetVideoLevel(qualifier) ?? num).ToString(CultureInfo.InvariantCulture));
}
}
+
break;
}
case ProfileConditionValue.Width:
@@ -1745,8 +1765,10 @@ namespace MediaBrowser.Model.Dlna
item.MaxWidth = Math.Max(num, item.MaxWidth ?? num);
}
}
+
break;
}
+
default:
break;
}
diff --git a/MediaBrowser.Model/Dlna/StreamInfo.cs b/MediaBrowser.Model/Dlna/StreamInfo.cs
index c9fe679e1..b89e9ce90 100644
--- a/MediaBrowser.Model/Dlna/StreamInfo.cs
+++ b/MediaBrowser.Model/Dlna/StreamInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -68,6 +69,7 @@ namespace MediaBrowser.Model.Dlna
public Guid ItemId { get; set; }
public PlayMethod PlayMethod { get; set; }
+
public EncodingContext Context { get; set; }
public DlnaProfileType MediaType { get; set; }
@@ -79,15 +81,23 @@ namespace MediaBrowser.Model.Dlna
public long StartPositionTicks { get; set; }
public int? SegmentLength { get; set; }
+
public int? MinSegments { get; set; }
+
public bool BreakOnNonKeyFrames { get; set; }
public bool RequireAvc { get; set; }
+
public bool RequireNonAnamorphic { get; set; }
+
public bool CopyTimestamps { get; set; }
+
public bool EnableMpegtsM2TsMode { get; set; }
+
public bool EnableSubtitlesInManifest { get; set; }
+
public string[] AudioCodecs { get; set; }
+
public string[] VideoCodecs { get; set; }
public int? AudioStreamIndex { get; set; }
@@ -95,6 +105,7 @@ namespace MediaBrowser.Model.Dlna
public int? SubtitleStreamIndex { get; set; }
public int? TranscodingMaxAudioChannels { get; set; }
+
public int? GlobalMaxAudioChannels { get; set; }
public int? AudioBitrate { get; set; }
@@ -102,12 +113,15 @@ namespace MediaBrowser.Model.Dlna
public int? VideoBitrate { get; set; }
public int? MaxWidth { get; set; }
+
public int? MaxHeight { get; set; }
public float? MaxFramerate { get; set; }
public DeviceProfile DeviceProfile { get; set; }
+
public string DeviceProfileId { get; set; }
+
public string DeviceId { get; set; }
public long? RunTimeTicks { get; set; }
@@ -119,10 +133,13 @@ namespace MediaBrowser.Model.Dlna
public MediaSourceInfo MediaSource { get; set; }
public string[] SubtitleCodecs { get; set; }
+
public SubtitleDeliveryMethod SubtitleDeliveryMethod { get; set; }
+
public string SubtitleFormat { get; set; }
public string PlaySessionId { get; set; }
+
public TranscodeReason[] TranscodeReasons { get; set; }
public Dictionary<string, string> StreamOptions { get; private set; }
@@ -159,11 +176,13 @@ namespace MediaBrowser.Model.Dlna
{
continue;
}
+
if (string.Equals(pair.Name, "SubtitleStreamIndex", StringComparison.OrdinalIgnoreCase) &&
string.Equals(pair.Value, "-1", StringComparison.OrdinalIgnoreCase))
{
continue;
}
+
if (string.Equals(pair.Name, "Static", StringComparison.OrdinalIgnoreCase) &&
string.Equals(pair.Value, "false", StringComparison.OrdinalIgnoreCase))
{
@@ -464,7 +483,7 @@ namespace MediaBrowser.Model.Dlna
}
/// <summary>
- /// Returns the audio stream that will be used
+ /// Returns the audio stream that will be used.
/// </summary>
public MediaStream TargetAudioStream
{
@@ -480,7 +499,7 @@ namespace MediaBrowser.Model.Dlna
}
/// <summary>
- /// Returns the video stream that will be used
+ /// Returns the video stream that will be used.
/// </summary>
public MediaStream TargetVideoStream
{
@@ -496,7 +515,7 @@ namespace MediaBrowser.Model.Dlna
}
/// <summary>
- /// Predicts the audio sample rate that will be in the output stream
+ /// Predicts the audio sample rate that will be in the output stream.
/// </summary>
public int? TargetAudioSampleRate
{
@@ -508,7 +527,7 @@ namespace MediaBrowser.Model.Dlna
}
/// <summary>
- /// Predicts the audio sample rate that will be in the output stream
+ /// Predicts the audio sample rate that will be in the output stream.
/// </summary>
public int? TargetAudioBitDepth
{
@@ -531,7 +550,7 @@ namespace MediaBrowser.Model.Dlna
}
/// <summary>
- /// Predicts the audio sample rate that will be in the output stream
+ /// Predicts the audio sample rate that will be in the output stream.
/// </summary>
public int? TargetVideoBitDepth
{
@@ -578,7 +597,7 @@ namespace MediaBrowser.Model.Dlna
}
/// <summary>
- /// Predicts the audio sample rate that will be in the output stream
+ /// Predicts the audio sample rate that will be in the output stream.
/// </summary>
public float? TargetFramerate
{
@@ -592,7 +611,7 @@ namespace MediaBrowser.Model.Dlna
}
/// <summary>
- /// Predicts the audio sample rate that will be in the output stream
+ /// Predicts the audio sample rate that will be in the output stream.
/// </summary>
public double? TargetVideoLevel
{
@@ -679,7 +698,7 @@ namespace MediaBrowser.Model.Dlna
}
/// <summary>
- /// Predicts the audio sample rate that will be in the output stream
+ /// Predicts the audio sample rate that will be in the output stream.
/// </summary>
public int? TargetPacketLength
{
@@ -693,7 +712,7 @@ namespace MediaBrowser.Model.Dlna
}
/// <summary>
- /// Predicts the audio sample rate that will be in the output stream
+ /// Predicts the audio sample rate that will be in the output stream.
/// </summary>
public string TargetVideoProfile
{
@@ -731,7 +750,7 @@ namespace MediaBrowser.Model.Dlna
}
/// <summary>
- /// Predicts the audio bitrate that will be in the output stream
+ /// Predicts the audio bitrate that will be in the output stream.
/// </summary>
public int? TargetAudioBitrate
{
@@ -745,7 +764,7 @@ namespace MediaBrowser.Model.Dlna
}
/// <summary>
- /// Predicts the audio channels that will be in the output stream
+ /// Predicts the audio channels that will be in the output stream.
/// </summary>
public int? TargetAudioChannels
{
@@ -786,7 +805,7 @@ namespace MediaBrowser.Model.Dlna
}
/// <summary>
- /// Predicts the audio codec that will be in the output stream
+ /// Predicts the audio codec that will be in the output stream.
/// </summary>
public string[] TargetAudioCodec
{
@@ -839,7 +858,7 @@ namespace MediaBrowser.Model.Dlna
}
/// <summary>
- /// Predicts the audio channels that will be in the output stream
+ /// Predicts the audio channels that will be in the output stream.
/// </summary>
public long? TargetSize
{
@@ -992,6 +1011,7 @@ namespace MediaBrowser.Model.Dlna
{
return GetMediaStreamCount(MediaStreamType.Video, int.MaxValue);
}
+
return GetMediaStreamCount(MediaStreamType.Video, 1);
}
}
@@ -1004,6 +1024,7 @@ namespace MediaBrowser.Model.Dlna
{
return GetMediaStreamCount(MediaStreamType.Audio, int.MaxValue);
}
+
return GetMediaStreamCount(MediaStreamType.Audio, 1);
}
}
diff --git a/MediaBrowser.Model/Dlna/SubtitleDeliveryMethod.cs b/MediaBrowser.Model/Dlna/SubtitleDeliveryMethod.cs
index 7b0204590..e7fe8d6af 100644
--- a/MediaBrowser.Model/Dlna/SubtitleDeliveryMethod.cs
+++ b/MediaBrowser.Model/Dlna/SubtitleDeliveryMethod.cs
@@ -5,22 +5,22 @@ namespace MediaBrowser.Model.Dlna
public enum SubtitleDeliveryMethod
{
/// <summary>
- /// The encode
+ /// The encode.
/// </summary>
Encode = 0,
/// <summary>
- /// The embed
+ /// The embed.
/// </summary>
Embed = 1,
/// <summary>
- /// The external
+ /// The external.
/// </summary>
External = 2,
/// <summary>
- /// The HLS
+ /// The HLS.
/// </summary>
Hls = 3
}
diff --git a/MediaBrowser.Model/Dlna/SubtitleProfile.cs b/MediaBrowser.Model/Dlna/SubtitleProfile.cs
index 9c28019aa..01e3c696b 100644
--- a/MediaBrowser.Model/Dlna/SubtitleProfile.cs
+++ b/MediaBrowser.Model/Dlna/SubtitleProfile.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
diff --git a/MediaBrowser.Model/Dlna/SubtitleStreamInfo.cs b/MediaBrowser.Model/Dlna/SubtitleStreamInfo.cs
index 02b3a198c..2f01836bd 100644
--- a/MediaBrowser.Model/Dlna/SubtitleStreamInfo.cs
+++ b/MediaBrowser.Model/Dlna/SubtitleStreamInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.Dlna
@@ -5,13 +6,21 @@ namespace MediaBrowser.Model.Dlna
public class SubtitleStreamInfo
{
public string Url { get; set; }
+
public string Language { get; set; }
+
public string Name { get; set; }
+
public bool IsForced { get; set; }
+
public string Format { get; set; }
+
public string DisplayTitle { get; set; }
+
public int Index { get; set; }
+
public SubtitleDeliveryMethod DeliveryMethod { get; set; }
+
public bool IsExternalUrl { get; set; }
}
}
diff --git a/MediaBrowser.Model/Dlna/TranscodingProfile.cs b/MediaBrowser.Model/Dlna/TranscodingProfile.cs
index 570ee7baa..f05e31047 100644
--- a/MediaBrowser.Model/Dlna/TranscodingProfile.cs
+++ b/MediaBrowser.Model/Dlna/TranscodingProfile.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System.Xml.Serialization;
diff --git a/MediaBrowser.Model/Dlna/UpnpDeviceInfo.cs b/MediaBrowser.Model/Dlna/UpnpDeviceInfo.cs
index 3dc1fca36..d71013f01 100644
--- a/MediaBrowser.Model/Dlna/UpnpDeviceInfo.cs
+++ b/MediaBrowser.Model/Dlna/UpnpDeviceInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -9,8 +10,11 @@ namespace MediaBrowser.Model.Dlna
public class UpnpDeviceInfo
{
public Uri Location { get; set; }
+
public Dictionary<string, string> Headers { get; set; }
+
public IPAddress LocalIpAddress { get; set; }
+
public int LocalPort { get; set; }
}
}
diff --git a/MediaBrowser.Model/Dlna/VideoOptions.cs b/MediaBrowser.Model/Dlna/VideoOptions.cs
index 5b12fff1c..4194f17c6 100644
--- a/MediaBrowser.Model/Dlna/VideoOptions.cs
+++ b/MediaBrowser.Model/Dlna/VideoOptions.cs
@@ -8,6 +8,7 @@ namespace MediaBrowser.Model.Dlna
public class VideoOptions : AudioOptions
{
public int? AudioStreamIndex { get; set; }
+
public int? SubtitleStreamIndex { get; set; }
}
}
diff --git a/MediaBrowser.Model/Dlna/XmlAttribute.cs b/MediaBrowser.Model/Dlna/XmlAttribute.cs
index 31603a754..3a8939a79 100644
--- a/MediaBrowser.Model/Dlna/XmlAttribute.cs
+++ b/MediaBrowser.Model/Dlna/XmlAttribute.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System.Xml.Serialization;
diff --git a/MediaBrowser.Model/Drawing/DrawingUtils.cs b/MediaBrowser.Model/Drawing/DrawingUtils.cs
index 0be30b0ba..1512c5233 100644
--- a/MediaBrowser.Model/Drawing/DrawingUtils.cs
+++ b/MediaBrowser.Model/Drawing/DrawingUtils.cs
@@ -16,7 +16,8 @@ namespace MediaBrowser.Model.Drawing
/// <param name="maxWidth">A max fixed width, if desired.</param>
/// <param name="maxHeight">A max fixed height, if desired.</param>
/// <returns>A new size object.</returns>
- public static ImageDimensions Resize(ImageDimensions size,
+ public static ImageDimensions Resize(
+ ImageDimensions size,
int width,
int height,
int maxWidth,
@@ -62,7 +63,7 @@ namespace MediaBrowser.Model.Drawing
/// <param name="currentHeight">Height of the current.</param>
/// <param name="currentWidth">Width of the current.</param>
/// <param name="newHeight">The new height.</param>
- /// <returns>the new width</returns>
+ /// <returns>The new width.</returns>
private static int GetNewWidth(int currentHeight, int currentWidth, int newHeight)
=> Convert.ToInt32((double)newHeight / currentHeight * currentWidth);
diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.cs
index 607355d8d..af3d83ade 100644
--- a/MediaBrowser.Model/Dto/BaseItemDto.cs
+++ b/MediaBrowser.Model/Dto/BaseItemDto.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -61,17 +62,23 @@ namespace MediaBrowser.Model.Dto
public DateTime? DateCreated { get; set; }
public DateTime? DateLastMediaAdded { get; set; }
+
public string ExtraType { get; set; }
public int? AirsBeforeSeasonNumber { get; set; }
+
public int? AirsAfterSeasonNumber { get; set; }
+
public int? AirsBeforeEpisodeNumber { get; set; }
+
public bool? CanDelete { get; set; }
+
public bool? CanDownload { get; set; }
public bool? HasSubtitles { get; set; }
public string PreferredMetadataLanguage { get; set; }
+
public string PreferredMetadataCountryCode { get; set; }
/// <summary>
@@ -86,6 +93,7 @@ namespace MediaBrowser.Model.Dto
/// </summary>
/// <value>The name of the sort.</value>
public string SortName { get; set; }
+
public string ForcedSortName { get; set; }
/// <summary>
@@ -145,6 +153,7 @@ namespace MediaBrowser.Model.Dto
/// </summary>
/// <value>The channel identifier.</value>
public Guid ChannelId { get; set; }
+
public string ChannelName { get; set; }
/// <summary>
@@ -212,6 +221,7 @@ namespace MediaBrowser.Model.Dto
/// </summary>
/// <value>The number.</value>
public string Number { get; set; }
+
public string ChannelNumber { get; set; }
/// <summary>
@@ -307,7 +317,7 @@ namespace MediaBrowser.Model.Dto
public int? LocalTrailerCount { get; set; }
/// <summary>
- /// User data for this item based on the user it's being requested for
+ /// User data for this item based on the user it's being requested for.
/// </summary>
/// <value>The user data.</value>
public UserItemDataDto UserData { get; set; }
@@ -466,6 +476,7 @@ namespace MediaBrowser.Model.Dto
/// </summary>
/// <value>The part count.</value>
public int? PartCount { get; set; }
+
public int? MediaSourceCount { get; set; }
/// <summary>
@@ -511,6 +522,13 @@ namespace MediaBrowser.Model.Dto
public string SeriesThumbImageTag { get; set; }
/// <summary>
+ /// Gets or sets the blurhashes for the image tags.
+ /// Maps image type to dictionary mapping image tag to blurhash value.
+ /// </summary>
+ /// <value>The blurhashes.</value>
+ public Dictionary<ImageType, Dictionary<string, string>> ImageBlurHashes { get; set; }
+
+ /// <summary>
/// Gets or sets the series studio.
/// </summary>
/// <value>The series studio.</value>
@@ -574,7 +592,7 @@ namespace MediaBrowser.Model.Dto
/// Gets or sets the locked fields.
/// </summary>
/// <value>The locked fields.</value>
- public MetadataFields[] LockedFields { get; set; }
+ public MetadataField[] LockedFields { get; set; }
/// <summary>
/// Gets or sets the trailer count.
@@ -591,6 +609,7 @@ namespace MediaBrowser.Model.Dto
/// </summary>
/// <value>The series count.</value>
public int? SeriesCount { get; set; }
+
public int? ProgramCount { get; set; }
/// <summary>
/// Gets or sets the episode count.
@@ -607,6 +626,7 @@ namespace MediaBrowser.Model.Dto
/// </summary>
/// <value>The album count.</value>
public int? AlbumCount { get; set; }
+
public int? ArtistCount { get; set; }
/// <summary>
/// Gets or sets the music video count.
@@ -621,18 +641,31 @@ namespace MediaBrowser.Model.Dto
public bool? LockData { get; set; }
public int? Width { get; set; }
+
public int? Height { get; set; }
+
public string CameraMake { get; set; }
+
public string CameraModel { get; set; }
+
public string Software { get; set; }
+
public double? ExposureTime { get; set; }
+
public double? FocalLength { get; set; }
+
public ImageOrientation? ImageOrientation { get; set; }
+
public double? Aperture { get; set; }
+
public double? ShutterSpeed { get; set; }
+
public double? Latitude { get; set; }
+
public double? Longitude { get; set; }
+
public double? Altitude { get; set; }
+
public int? IsoSpeedRating { get; set; }
/// <summary>
diff --git a/MediaBrowser.Model/Dto/BaseItemPerson.cs b/MediaBrowser.Model/Dto/BaseItemPerson.cs
index 5b7eefd70..ddd7667ef 100644
--- a/MediaBrowser.Model/Dto/BaseItemPerson.cs
+++ b/MediaBrowser.Model/Dto/BaseItemPerson.cs
@@ -1,4 +1,7 @@
+#nullable disable
+using System.Collections.Generic;
using System.Text.Json.Serialization;
+using MediaBrowser.Model.Entities;
namespace MediaBrowser.Model.Dto
{
@@ -38,6 +41,12 @@ namespace MediaBrowser.Model.Dto
public string PrimaryImageTag { get; set; }
/// <summary>
+ /// Gets or sets the primary image blurhash.
+ /// </summary>
+ /// <value>The primary image blurhash.</value>
+ public Dictionary<ImageType, Dictionary<string, string>> ImageBlurHashes { get; set; }
+
+ /// <summary>
/// Gets a value indicating whether this instance has primary image.
/// </summary>
/// <value><c>true</c> if this instance has primary image; otherwise, <c>false</c>.</value>
diff --git a/MediaBrowser.Model/Dto/IHasServerId.cs b/MediaBrowser.Model/Dto/IHasServerId.cs
index 8c9798c5c..c754d276c 100644
--- a/MediaBrowser.Model/Dto/IHasServerId.cs
+++ b/MediaBrowser.Model/Dto/IHasServerId.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.Dto
diff --git a/MediaBrowser.Model/Dto/ImageByNameInfo.cs b/MediaBrowser.Model/Dto/ImageByNameInfo.cs
index d2e43634d..06cc3e73c 100644
--- a/MediaBrowser.Model/Dto/ImageByNameInfo.cs
+++ b/MediaBrowser.Model/Dto/ImageByNameInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.Dto
diff --git a/MediaBrowser.Model/Dto/ImageInfo.cs b/MediaBrowser.Model/Dto/ImageInfo.cs
index 57942ac23..2e4b15a18 100644
--- a/MediaBrowser.Model/Dto/ImageInfo.cs
+++ b/MediaBrowser.Model/Dto/ImageInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
using MediaBrowser.Model.Entities;
namespace MediaBrowser.Model.Dto
@@ -20,9 +21,9 @@ namespace MediaBrowser.Model.Dto
public int? ImageIndex { get; set; }
/// <summary>
- /// The image tag
+ /// Gets or sets the image tag.
/// </summary>
- public string ImageTag;
+ public string ImageTag { get; set; }
/// <summary>
/// Gets or sets the path.
@@ -31,6 +32,12 @@ namespace MediaBrowser.Model.Dto
public string Path { get; set; }
/// <summary>
+ /// Gets or sets the blurhash.
+ /// </summary>
+ /// <value>The blurhash.</value>
+ public string BlurHash { get; set; }
+
+ /// <summary>
/// Gets or sets the height.
/// </summary>
/// <value>The height.</value>
diff --git a/MediaBrowser.Model/Dto/ImageOptions.cs b/MediaBrowser.Model/Dto/ImageOptions.cs
index 4e672a007..3f4405f1e 100644
--- a/MediaBrowser.Model/Dto/ImageOptions.cs
+++ b/MediaBrowser.Model/Dto/ImageOptions.cs
@@ -1,3 +1,4 @@
+#nullable disable
using MediaBrowser.Model.Drawing;
using MediaBrowser.Model.Entities;
@@ -9,6 +10,14 @@ namespace MediaBrowser.Model.Dto
public class ImageOptions
{
/// <summary>
+ /// Initializes a new instance of the <see cref="ImageOptions" /> class.
+ /// </summary>
+ public ImageOptions()
+ {
+ EnableImageEnhancers = true;
+ }
+
+ /// <summary>
/// Gets or sets the type of the image.
/// </summary>
/// <value>The type of the image.</value>
@@ -52,7 +61,7 @@ namespace MediaBrowser.Model.Dto
/// <summary>
/// Gets or sets the image tag.
- /// If set this will result in strong, unconditional response caching
+ /// If set this will result in strong, unconditional response caching.
/// </summary>
/// <value>The hash.</value>
public string Tag { get; set; }
@@ -98,13 +107,5 @@ namespace MediaBrowser.Model.Dto
/// </summary>
/// <value>The color of the background.</value>
public string BackgroundColor { get; set; }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="ImageOptions" /> class.
- /// </summary>
- public ImageOptions()
- {
- EnableImageEnhancers = true;
- }
}
}
diff --git a/MediaBrowser.Model/Dto/ItemIndex.cs b/MediaBrowser.Model/Dto/ItemIndex.cs
deleted file mode 100644
index 525576d61..000000000
--- a/MediaBrowser.Model/Dto/ItemIndex.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-namespace MediaBrowser.Model.Dto
-{
- /// <summary>
- /// Class ItemIndex.
- /// </summary>
- public class ItemIndex
- {
- /// <summary>
- /// Gets or sets the name.
- /// </summary>
- /// <value>The name.</value>
- public string Name { get; set; }
-
- /// <summary>
- /// Gets or sets the item count.
- /// </summary>
- /// <value>The item count.</value>
- public int ItemCount { get; set; }
- }
-}
diff --git a/MediaBrowser.Model/Dto/MediaSourceInfo.cs b/MediaBrowser.Model/Dto/MediaSourceInfo.cs
index 29613adbf..be682be23 100644
--- a/MediaBrowser.Model/Dto/MediaSourceInfo.cs
+++ b/MediaBrowser.Model/Dto/MediaSourceInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -12,39 +13,56 @@ namespace MediaBrowser.Model.Dto
public class MediaSourceInfo
{
public MediaProtocol Protocol { get; set; }
+
public string Id { get; set; }
public string Path { get; set; }
public string EncoderPath { get; set; }
+
public MediaProtocol? EncoderProtocol { get; set; }
public MediaSourceType Type { get; set; }
public string Container { get; set; }
+
public long? Size { get; set; }
public string Name { get; set; }
/// <summary>
- /// Differentiate internet url vs local network
+ /// Differentiate internet url vs local network.
/// </summary>
public bool IsRemote { get; set; }
public string ETag { get; set; }
+
public long? RunTimeTicks { get; set; }
+
public bool ReadAtNativeFramerate { get; set; }
+
public bool IgnoreDts { get; set; }
+
public bool IgnoreIndex { get; set; }
+
public bool GenPtsInput { get; set; }
+
public bool SupportsTranscoding { get; set; }
+
public bool SupportsDirectStream { get; set; }
+
public bool SupportsDirectPlay { get; set; }
+
public bool IsInfiniteStream { get; set; }
+
public bool RequiresOpening { get; set; }
+
public string OpenToken { get; set; }
+
public bool RequiresClosing { get; set; }
+
public string LiveStreamId { get; set; }
+
public int? BufferMs { get; set; }
public bool RequiresLooping { get; set; }
@@ -66,10 +84,13 @@ namespace MediaBrowser.Model.Dto
public int? Bitrate { get; set; }
public TransportStreamTimestamp? Timestamp { get; set; }
+
public Dictionary<string, string> RequiredHttpHeaders { get; set; }
public string TranscodingUrl { get; set; }
+
public string TranscodingSubProtocol { get; set; }
+
public string TranscodingContainer { get; set; }
public int? AnalyzeDurationMs { get; set; }
@@ -117,6 +138,7 @@ namespace MediaBrowser.Model.Dto
public TranscodeReason[] TranscodeReasons { get; set; }
public int? DefaultAudioStreamIndex { get; set; }
+
public int? DefaultSubtitleStreamIndex { get; set; }
public MediaStream GetDefaultAudioStream(int? defaultIndex)
diff --git a/MediaBrowser.Model/Dto/MetadataEditorInfo.cs b/MediaBrowser.Model/Dto/MetadataEditorInfo.cs
index 21d8a31f2..e4f38d6af 100644
--- a/MediaBrowser.Model/Dto/MetadataEditorInfo.cs
+++ b/MediaBrowser.Model/Dto/MetadataEditorInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -10,11 +11,15 @@ namespace MediaBrowser.Model.Dto
public class MetadataEditorInfo
{
public ParentalRating[] ParentalRatingOptions { get; set; }
+
public CountryInfo[] Countries { get; set; }
+
public CultureDto[] Cultures { get; set; }
+
public ExternalIdInfo[] ExternalIdInfos { get; set; }
public string ContentType { get; set; }
+
public NameValuePair[] ContentTypeOptions { get; set; }
public MetadataEditorInfo()
diff --git a/MediaBrowser.Model/Dto/NameIdPair.cs b/MediaBrowser.Model/Dto/NameIdPair.cs
index 1b4800863..45c2fb35d 100644
--- a/MediaBrowser.Model/Dto/NameIdPair.cs
+++ b/MediaBrowser.Model/Dto/NameIdPair.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -22,6 +23,7 @@ namespace MediaBrowser.Model.Dto
public class NameGuidPair
{
public string Name { get; set; }
+
public Guid Id { get; set; }
}
}
diff --git a/MediaBrowser.Model/Dto/NameValuePair.cs b/MediaBrowser.Model/Dto/NameValuePair.cs
index 74040c2cb..e71ff3c21 100644
--- a/MediaBrowser.Model/Dto/NameValuePair.cs
+++ b/MediaBrowser.Model/Dto/NameValuePair.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.Dto
@@ -6,7 +7,6 @@ namespace MediaBrowser.Model.Dto
{
public NameValuePair()
{
-
}
public NameValuePair(string name, string value)
diff --git a/MediaBrowser.Model/Dto/PublicUserDto.cs b/MediaBrowser.Model/Dto/PublicUserDto.cs
deleted file mode 100644
index b6bfaf2e9..000000000
--- a/MediaBrowser.Model/Dto/PublicUserDto.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-using System;
-
-namespace MediaBrowser.Model.Dto
-{
- /// <summary>
- /// Class PublicUserDto. Its goal is to show only public information about a user
- /// </summary>
- public class PublicUserDto : IItemDto
- {
- /// <summary>
- /// Gets or sets the name.
- /// </summary>
- /// <value>The name.</value>
- public string Name { get; set; }
-
- /// <summary>
- /// Gets or sets the primary image tag.
- /// </summary>
- /// <value>The primary image tag.</value>
- public string PrimaryImageTag { get; set; }
-
- /// <summary>
- /// Gets or sets a value indicating whether this instance has password.
- /// </summary>
- /// <value><c>true</c> if this instance has password; otherwise, <c>false</c>.</value>
- public bool HasPassword { get; set; }
-
- /// <summary>
- /// Gets or sets a value indicating whether this instance has configured password.
- /// Note that in this case this method should not be here, but it is necessary when changing password at the
- /// first login.
- /// </summary>
- /// <value><c>true</c> if this instance has configured password; otherwise, <c>false</c>.</value>
- public bool HasConfiguredPassword { get; set; }
-
- /// <summary>
- /// Gets or sets the primary image aspect ratio.
- /// </summary>
- /// <value>The primary image aspect ratio.</value>
- public double? PrimaryImageAspectRatio { get; set; }
-
- /// <inheritdoc />
- public override string ToString()
- {
- return Name ?? base.ToString();
- }
- }
-}
diff --git a/MediaBrowser.Model/Dto/RecommendationDto.cs b/MediaBrowser.Model/Dto/RecommendationDto.cs
index bc97dd6f1..107f41540 100644
--- a/MediaBrowser.Model/Dto/RecommendationDto.cs
+++ b/MediaBrowser.Model/Dto/RecommendationDto.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
diff --git a/MediaBrowser.Model/Dto/UserDto.cs b/MediaBrowser.Model/Dto/UserDto.cs
index d36706c38..40222c9dc 100644
--- a/MediaBrowser.Model/Dto/UserDto.cs
+++ b/MediaBrowser.Model/Dto/UserDto.cs
@@ -1,3 +1,4 @@
+#nullable disable
using System;
using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Users;
diff --git a/MediaBrowser.Model/Dto/UserItemDataDto.cs b/MediaBrowser.Model/Dto/UserItemDataDto.cs
index 92f06c973..adb2cd2ab 100644
--- a/MediaBrowser.Model/Dto/UserItemDataDto.cs
+++ b/MediaBrowser.Model/Dto/UserItemDataDto.cs
@@ -1,3 +1,4 @@
+#nullable disable
using System;
namespace MediaBrowser.Model.Dto
diff --git a/MediaBrowser.Model/Entities/ChapterInfo.cs b/MediaBrowser.Model/Entities/ChapterInfo.cs
index bea7ec1db..45554c3dc 100644
--- a/MediaBrowser.Model/Entities/ChapterInfo.cs
+++ b/MediaBrowser.Model/Entities/ChapterInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
diff --git a/MediaBrowser.Model/Entities/DisplayPreferences.cs b/MediaBrowser.Model/Entities/DisplayPreferences.cs
index 2cd8bd306..7e5c5be3b 100644
--- a/MediaBrowser.Model/Entities/DisplayPreferences.cs
+++ b/MediaBrowser.Model/Entities/DisplayPreferences.cs
@@ -1,3 +1,4 @@
+#nullable disable
using System.Collections.Generic;
namespace MediaBrowser.Model.Entities
@@ -103,7 +104,7 @@ namespace MediaBrowser.Model.Entities
public bool ShowSidebar { get; set; }
/// <summary>
- /// Gets or sets the client
+ /// Gets or sets the client.
/// </summary>
public string Client { get; set; }
}
diff --git a/MediaBrowser.Model/Entities/IHasProviderIds.cs b/MediaBrowser.Model/Entities/IHasProviderIds.cs
index c117efde9..1310f68ae 100644
--- a/MediaBrowser.Model/Entities/IHasProviderIds.cs
+++ b/MediaBrowser.Model/Entities/IHasProviderIds.cs
@@ -3,7 +3,7 @@ using System.Collections.Generic;
namespace MediaBrowser.Model.Entities
{
/// <summary>
- /// Since BaseItem and DTOBaseItem both have ProviderIds, this interface helps avoid code repition by using extension methods.
+ /// Since BaseItem and DTOBaseItem both have ProviderIds, this interface helps avoid code repetition by using extension methods.
/// </summary>
public interface IHasProviderIds
{
diff --git a/MediaBrowser.Model/Entities/ImageType.cs b/MediaBrowser.Model/Entities/ImageType.cs
index d89a4b3ad..6ea9ee419 100644
--- a/MediaBrowser.Model/Entities/ImageType.cs
+++ b/MediaBrowser.Model/Entities/ImageType.cs
@@ -63,6 +63,11 @@ namespace MediaBrowser.Model.Entities
/// <summary>
/// The box rear.
/// </summary>
- BoxRear = 11
+ BoxRear = 11,
+
+ /// <summary>
+ /// The user profile image.
+ /// </summary>
+ Profile = 12
}
}
diff --git a/MediaBrowser.Model/Entities/LibraryUpdateInfo.cs b/MediaBrowser.Model/Entities/LibraryUpdateInfo.cs
index b98c00240..6dd6653dc 100644
--- a/MediaBrowser.Model/Entities/LibraryUpdateInfo.cs
+++ b/MediaBrowser.Model/Entities/LibraryUpdateInfo.cs
@@ -5,15 +5,29 @@ using System;
namespace MediaBrowser.Model.Entities
{
/// <summary>
- /// Class LibraryUpdateInfo
+ /// Class LibraryUpdateInfo.
/// </summary>
public class LibraryUpdateInfo
{
/// <summary>
+ /// Initializes a new instance of the <see cref="LibraryUpdateInfo"/> class.
+ /// </summary>
+ public LibraryUpdateInfo()
+ {
+ FoldersAddedTo = Array.Empty<string>();
+ FoldersRemovedFrom = Array.Empty<string>();
+ ItemsAdded = Array.Empty<string>();
+ ItemsRemoved = Array.Empty<string>();
+ ItemsUpdated = Array.Empty<string>();
+ CollectionFolders = Array.Empty<string>();
+ }
+
+ /// <summary>
/// Gets or sets the folders added to.
/// </summary>
/// <value>The folders added to.</value>
public string[] FoldersAddedTo { get; set; }
+
/// <summary>
/// Gets or sets the folders removed from.
/// </summary>
@@ -41,18 +55,5 @@ namespace MediaBrowser.Model.Entities
public string[] CollectionFolders { get; set; }
public bool IsEmpty => FoldersAddedTo.Length == 0 && FoldersRemovedFrom.Length == 0 && ItemsAdded.Length == 0 && ItemsRemoved.Length == 0 && ItemsUpdated.Length == 0 && CollectionFolders.Length == 0;
-
- /// <summary>
- /// Initializes a new instance of the <see cref="LibraryUpdateInfo"/> class.
- /// </summary>
- public LibraryUpdateInfo()
- {
- FoldersAddedTo = Array.Empty<string>();
- FoldersRemovedFrom = Array.Empty<string>();
- ItemsAdded = Array.Empty<string>();
- ItemsRemoved = Array.Empty<string>();
- ItemsUpdated = Array.Empty<string>();
- CollectionFolders = Array.Empty<string>();
- }
}
}
diff --git a/MediaBrowser.Model/Entities/MediaAttachment.cs b/MediaBrowser.Model/Entities/MediaAttachment.cs
index 167be18c9..34e3eabc9 100644
--- a/MediaBrowser.Model/Entities/MediaAttachment.cs
+++ b/MediaBrowser.Model/Entities/MediaAttachment.cs
@@ -1,3 +1,4 @@
+#nullable disable
namespace MediaBrowser.Model.Entities
{
/// <summary>
diff --git a/MediaBrowser.Model/Entities/MediaStream.cs b/MediaBrowser.Model/Entities/MediaStream.cs
index ac33f1da4..7a488005e 100644
--- a/MediaBrowser.Model/Entities/MediaStream.cs
+++ b/MediaBrowser.Model/Entities/MediaStream.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -12,7 +13,7 @@ using MediaBrowser.Model.MediaInfo;
namespace MediaBrowser.Model.Entities
{
/// <summary>
- /// Class MediaStream
+ /// Class MediaStream.
/// </summary>
public class MediaStream
{
@@ -113,7 +114,7 @@ namespace MediaBrowser.Model.Entities
{
if (Type == MediaStreamType.Audio)
{
- //if (!string.IsNullOrEmpty(Title))
+ // if (!string.IsNullOrEmpty(Title))
//{
// return AddLanguageIfNeeded(Title);
//}
@@ -124,6 +125,7 @@ namespace MediaBrowser.Model.Entities
{
attributes.Add(StringHelper.FirstToUpper(Language));
}
+
if (!string.IsNullOrEmpty(Codec) && !string.Equals(Codec, "dca", StringComparison.OrdinalIgnoreCase))
{
attributes.Add(AudioCodec.GetFriendlyName(Codec));
@@ -141,6 +143,7 @@ namespace MediaBrowser.Model.Entities
{
attributes.Add(Channels.Value.ToString(CultureInfo.InvariantCulture) + " ch");
}
+
if (IsDefault)
{
attributes.Add("Default");
@@ -207,7 +210,6 @@ namespace MediaBrowser.Model.Entities
if (Type == MediaStreamType.Video)
{
-
}
return null;
@@ -227,30 +229,37 @@ namespace MediaBrowser.Model.Entities
{
return "4K";
}
+
if (width >= 2500)
{
if (i.IsInterlaced)
{
return "1440i";
}
+
return "1440p";
}
+
if (width >= 1900 || height >= 1000)
{
if (i.IsInterlaced)
{
return "1080i";
}
+
return "1080p";
}
+
if (width >= 1260 || height >= 700)
{
if (i.IsInterlaced)
{
return "720i";
}
+
return "720p";
}
+
if (width >= 700 || height >= 440)
{
@@ -258,11 +267,13 @@ namespace MediaBrowser.Model.Entities
{
return "480i";
}
+
return "480p";
}
return "SD";
}
+
return null;
}
@@ -410,7 +421,10 @@ namespace MediaBrowser.Model.Entities
{
get
{
- if (Type != MediaStreamType.Subtitle) return false;
+ if (Type != MediaStreamType.Subtitle)
+ {
+ return false;
+ }
if (string.IsNullOrEmpty(Codec) && !IsExternal)
{
@@ -448,6 +462,7 @@ namespace MediaBrowser.Model.Entities
{
return false;
}
+
if (string.Equals(fromCodec, "ssa", StringComparison.OrdinalIgnoreCase))
{
return false;
@@ -458,6 +473,7 @@ namespace MediaBrowser.Model.Entities
{
return false;
}
+
if (string.Equals(toCodec, "ssa", StringComparison.OrdinalIgnoreCase))
{
return false;
diff --git a/MediaBrowser.Model/Entities/MediaUrl.cs b/MediaBrowser.Model/Entities/MediaUrl.cs
index e44143755..80ceaa765 100644
--- a/MediaBrowser.Model/Entities/MediaUrl.cs
+++ b/MediaBrowser.Model/Entities/MediaUrl.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.Entities
@@ -5,6 +6,7 @@ namespace MediaBrowser.Model.Entities
public class MediaUrl
{
public string Url { get; set; }
+
public string Name { get; set; }
}
}
diff --git a/MediaBrowser.Model/Entities/MetadataFields.cs b/MediaBrowser.Model/Entities/MetadataFields.cs
index d64d4f4da..2cc6c8e33 100644
--- a/MediaBrowser.Model/Entities/MetadataFields.cs
+++ b/MediaBrowser.Model/Entities/MetadataFields.cs
@@ -3,7 +3,7 @@ namespace MediaBrowser.Model.Entities
/// <summary>
/// Enum MetadataFields.
/// </summary>
- public enum MetadataFields
+ public enum MetadataField
{
/// <summary>
/// The cast.
diff --git a/MediaBrowser.Model/Entities/MetadataProviders.cs b/MediaBrowser.Model/Entities/MetadataProvider.cs
index 1a44a1661..7fecf67b8 100644
--- a/MediaBrowser.Model/Entities/MetadataProviders.cs
+++ b/MediaBrowser.Model/Entities/MetadataProvider.cs
@@ -3,28 +3,28 @@
namespace MediaBrowser.Model.Entities
{
/// <summary>
- /// Enum MetadataProviders
+ /// Enum MetadataProviders.
/// </summary>
- public enum MetadataProviders
+ public enum MetadataProvider
{
/// <summary>
- /// The imdb
+ /// The imdb.
/// </summary>
Imdb = 2,
/// <summary>
- /// The TMDB
+ /// The TMDB.
/// </summary>
Tmdb = 3,
/// <summary>
- /// The TVDB
+ /// The TVDB.
/// </summary>
Tvdb = 4,
/// <summary>
- /// The tvcom
+ /// The tvcom.
/// </summary>
Tvcom = 5,
/// <summary>
- /// Tmdb Collection Id
+ /// Tmdb Collection Id.
/// </summary>
TmdbCollection = 7,
MusicBrainzAlbum = 8,
diff --git a/MediaBrowser.Model/Entities/PackageReviewInfo.cs b/MediaBrowser.Model/Entities/PackageReviewInfo.cs
index a034de8ba..5b22b34ac 100644
--- a/MediaBrowser.Model/Entities/PackageReviewInfo.cs
+++ b/MediaBrowser.Model/Entities/PackageReviewInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -7,34 +8,33 @@ namespace MediaBrowser.Model.Entities
public class PackageReviewInfo
{
/// <summary>
- /// The package id (database key) for this review
+ /// Gets or sets the package id (database key) for this review.
/// </summary>
public int id { get; set; }
/// <summary>
- /// The rating value
+ /// Gets or sets the rating value.
/// </summary>
public int rating { get; set; }
/// <summary>
- /// Whether or not this review recommends this item
+ /// Gets or sets whether or not this review recommends this item.
/// </summary>
public bool recommend { get; set; }
/// <summary>
- /// A short description of the review
+ /// Gets or sets a short description of the review.
/// </summary>
public string title { get; set; }
/// <summary>
- /// A full review
+ /// Gets or sets the full review.
/// </summary>
public string review { get; set; }
/// <summary>
- /// Time of review
+ /// Gets or sets the time of review.
/// </summary>
public DateTime timestamp { get; set; }
-
}
}
diff --git a/MediaBrowser.Model/Entities/ParentalRating.cs b/MediaBrowser.Model/Entities/ParentalRating.cs
index 4b37bd64a..17b2868a3 100644
--- a/MediaBrowser.Model/Entities/ParentalRating.cs
+++ b/MediaBrowser.Model/Entities/ParentalRating.cs
@@ -1,12 +1,23 @@
+#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.Entities
{
/// <summary>
- /// Class ParentalRating
+ /// Class ParentalRating.
/// </summary>
public class ParentalRating
{
+ public ParentalRating()
+ {
+ }
+
+ public ParentalRating(string name, int value)
+ {
+ Name = name;
+ Value = value;
+ }
+
/// <summary>
/// Gets or sets the name.
/// </summary>
@@ -18,16 +29,5 @@ namespace MediaBrowser.Model.Entities
/// </summary>
/// <value>The value.</value>
public int Value { get; set; }
-
- public ParentalRating()
- {
-
- }
-
- public ParentalRating(string name, int value)
- {
- Name = name;
- Value = value;
- }
}
}
diff --git a/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs b/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs
index 922eb4ca7..9c11fe0ad 100644
--- a/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs
+++ b/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs
@@ -14,7 +14,7 @@ namespace MediaBrowser.Model.Entities
/// <param name="instance">The instance.</param>
/// <param name="provider">The provider.</param>
/// <returns><c>true</c> if [has provider identifier] [the specified instance]; otherwise, <c>false</c>.</returns>
- public static bool HasProviderId(this IHasProviderIds instance, MetadataProviders provider)
+ public static bool HasProviderId(this IHasProviderIds instance, MetadataProvider provider)
{
return !string.IsNullOrEmpty(instance.GetProviderId(provider.ToString()));
}
@@ -25,7 +25,7 @@ namespace MediaBrowser.Model.Entities
/// <param name="instance">The instance.</param>
/// <param name="provider">The provider.</param>
/// <returns>System.String.</returns>
- public static string GetProviderId(this IHasProviderIds instance, MetadataProviders provider)
+ public static string? GetProviderId(this IHasProviderIds instance, MetadataProvider provider)
{
return instance.GetProviderId(provider.ToString());
}
@@ -36,7 +36,7 @@ namespace MediaBrowser.Model.Entities
/// <param name="instance">The instance.</param>
/// <param name="name">The name.</param>
/// <returns>System.String.</returns>
- public static string GetProviderId(this IHasProviderIds instance, string name)
+ public static string? GetProviderId(this IHasProviderIds instance, string name)
{
if (instance == null)
{
@@ -94,7 +94,7 @@ namespace MediaBrowser.Model.Entities
/// <param name="instance">The instance.</param>
/// <param name="provider">The provider.</param>
/// <param name="value">The value.</param>
- public static void SetProviderId(this IHasProviderIds instance, MetadataProviders provider, string value)
+ public static void SetProviderId(this IHasProviderIds instance, MetadataProvider provider, string value)
{
instance.SetProviderId(provider.ToString(), value);
}
diff --git a/MediaBrowser.Model/Entities/VirtualFolderInfo.cs b/MediaBrowser.Model/Entities/VirtualFolderInfo.cs
index dd30c9c84..f2bc6f25e 100644
--- a/MediaBrowser.Model/Entities/VirtualFolderInfo.cs
+++ b/MediaBrowser.Model/Entities/VirtualFolderInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -6,7 +7,7 @@ using MediaBrowser.Model.Configuration;
namespace MediaBrowser.Model.Entities
{
/// <summary>
- /// Used to hold information about a user's list of configured virtual folders
+ /// Used to hold information about a user's list of configured virtual folders.
/// </summary>
public class VirtualFolderInfo
{
@@ -51,6 +52,7 @@ namespace MediaBrowser.Model.Entities
public string PrimaryImageItemId { get; set; }
public double? RefreshProgress { get; set; }
+
public string RefreshStatus { get; set; }
}
}
diff --git a/MediaBrowser.Model/Events/GenericEventArgs.cs b/MediaBrowser.Model/Events/GenericEventArgs.cs
index 1ef0b25c9..44f60f811 100644
--- a/MediaBrowser.Model/Events/GenericEventArgs.cs
+++ b/MediaBrowser.Model/Events/GenericEventArgs.cs
@@ -22,12 +22,5 @@ namespace MediaBrowser.Model.Events
{
Argument = arg;
}
-
- /// <summary>
- /// Initializes a new instance of the <see cref="GenericEventArgs{T}"/> class.
- /// </summary>
- public GenericEventArgs()
- {
- }
}
}
diff --git a/MediaBrowser.Model/Extensions/ListHelper.cs b/MediaBrowser.Model/Extensions/ListHelper.cs
new file mode 100644
index 000000000..b893a3509
--- /dev/null
+++ b/MediaBrowser.Model/Extensions/ListHelper.cs
@@ -0,0 +1,29 @@
+#nullable disable
+#pragma warning disable CS1591
+
+using System;
+
+namespace MediaBrowser.Model.Extensions
+{
+ // TODO: @bond remove
+ public static class ListHelper
+ {
+ public static bool ContainsIgnoreCase(string[] list, string value)
+ {
+ if (value == null)
+ {
+ throw new ArgumentNullException(nameof(value));
+ }
+
+ foreach (var item in list)
+ {
+ if (string.Equals(item, value, StringComparison.OrdinalIgnoreCase))
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+ }
+}
diff --git a/MediaBrowser.Model/Extensions/StringHelper.cs b/MediaBrowser.Model/Extensions/StringHelper.cs
index f819a295c..8ffa3c4ba 100644
--- a/MediaBrowser.Model/Extensions/StringHelper.cs
+++ b/MediaBrowser.Model/Extensions/StringHelper.cs
@@ -12,9 +12,9 @@ namespace MediaBrowser.Model.Extensions
/// <returns>The string with the first character as uppercase.</returns>
public static string FirstToUpper(string str)
{
- if (string.IsNullOrEmpty(str))
+ if (str.Length == 0)
{
- return string.Empty;
+ return str;
}
if (char.IsUpper(str[0]))
diff --git a/MediaBrowser.Model/Globalization/CountryInfo.cs b/MediaBrowser.Model/Globalization/CountryInfo.cs
index 72362f4f3..6f6979316 100644
--- a/MediaBrowser.Model/Globalization/CountryInfo.cs
+++ b/MediaBrowser.Model/Globalization/CountryInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
namespace MediaBrowser.Model.Globalization
{
/// <summary>
diff --git a/MediaBrowser.Model/Globalization/CultureDto.cs b/MediaBrowser.Model/Globalization/CultureDto.cs
index f415840b0..6af4a872c 100644
--- a/MediaBrowser.Model/Globalization/CultureDto.cs
+++ b/MediaBrowser.Model/Globalization/CultureDto.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
diff --git a/MediaBrowser.Model/Globalization/ILocalizationManager.cs b/MediaBrowser.Model/Globalization/ILocalizationManager.cs
index 613bfca69..baefeb39c 100644
--- a/MediaBrowser.Model/Globalization/ILocalizationManager.cs
+++ b/MediaBrowser.Model/Globalization/ILocalizationManager.cs
@@ -1,3 +1,4 @@
+#nullable disable
using System.Collections.Generic;
using System.Globalization;
using MediaBrowser.Model.Entities;
diff --git a/MediaBrowser.Model/Globalization/LocalizationOption.cs b/MediaBrowser.Model/Globalization/LocalizationOption.cs
index 00caf5e11..81f47d978 100644
--- a/MediaBrowser.Model/Globalization/LocalizationOption.cs
+++ b/MediaBrowser.Model/Globalization/LocalizationOption.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.Globalization
@@ -11,6 +12,7 @@ namespace MediaBrowser.Model.Globalization
}
public string Name { get; set; }
+
public string Value { get; set; }
}
}
diff --git a/MediaBrowser.Model/IO/FileSystemEntryInfo.cs b/MediaBrowser.Model/IO/FileSystemEntryInfo.cs
index a197f0fbe..36ff5d041 100644
--- a/MediaBrowser.Model/IO/FileSystemEntryInfo.cs
+++ b/MediaBrowser.Model/IO/FileSystemEntryInfo.cs
@@ -1,26 +1,39 @@
namespace MediaBrowser.Model.IO
{
/// <summary>
- /// Class FileSystemEntryInfo
+ /// Class FileSystemEntryInfo.
/// </summary>
public class FileSystemEntryInfo
{
/// <summary>
- /// Gets or sets the name.
+ /// Initializes a new instance of the <see cref="FileSystemEntryInfo" /> class.
+ /// </summary>
+ /// <param name="name">The filename.</param>
+ /// <param name="path">The file path.</param>
+ /// <param name="type">The file type.</param>
+ public FileSystemEntryInfo(string name, string path, FileSystemEntryType type)
+ {
+ Name = name;
+ Path = path;
+ Type = type;
+ }
+
+ /// <summary>
+ /// Gets the name.
/// </summary>
/// <value>The name.</value>
- public string Name { get; set; }
+ public string Name { get; }
/// <summary>
- /// Gets or sets the path.
+ /// Gets the path.
/// </summary>
/// <value>The path.</value>
- public string Path { get; set; }
+ public string Path { get; }
/// <summary>
- /// Gets or sets the type.
+ /// Gets the type.
/// </summary>
/// <value>The type.</value>
- public FileSystemEntryType Type { get; set; }
+ public FileSystemEntryType Type { get; }
}
}
diff --git a/MediaBrowser.Model/IO/FileSystemMetadata.cs b/MediaBrowser.Model/IO/FileSystemMetadata.cs
index 4b9102392..b23119d08 100644
--- a/MediaBrowser.Model/IO/FileSystemMetadata.cs
+++ b/MediaBrowser.Model/IO/FileSystemMetadata.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
diff --git a/MediaBrowser.Model/IO/IFileSystem.cs b/MediaBrowser.Model/IO/IFileSystem.cs
index 53f23a8e0..bba69d4b4 100644
--- a/MediaBrowser.Model/IO/IFileSystem.cs
+++ b/MediaBrowser.Model/IO/IFileSystem.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
diff --git a/MediaBrowser.Model/IO/IIsoManager.cs b/MediaBrowser.Model/IO/IIsoManager.cs
index 8b6af019d..299bb0a21 100644
--- a/MediaBrowser.Model/IO/IIsoManager.cs
+++ b/MediaBrowser.Model/IO/IIsoManager.cs
@@ -16,7 +16,6 @@ namespace MediaBrowser.Model.IO
/// <param name="isoPath">The iso path.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>IsoMount.</returns>
- /// <exception cref="ArgumentNullException">isoPath</exception>
/// <exception cref="IOException">Unable to create mount.</exception>
Task<IIsoMount> Mount(string isoPath, CancellationToken cancellationToken);
diff --git a/MediaBrowser.Model/IO/IIsoMount.cs b/MediaBrowser.Model/IO/IIsoMount.cs
index 72ec673ee..ea65d976a 100644
--- a/MediaBrowser.Model/IO/IIsoMount.cs
+++ b/MediaBrowser.Model/IO/IIsoMount.cs
@@ -8,7 +8,7 @@ namespace MediaBrowser.Model.IO
public interface IIsoMount : IDisposable
{
/// <summary>
- /// Gets or sets the iso path.
+ /// Gets the iso path.
/// </summary>
/// <value>The iso path.</value>
string IsoPath { get; }
diff --git a/MediaBrowser.Model/IO/IIsoMounter.cs b/MediaBrowser.Model/IO/IIsoMounter.cs
index 83fdb5fd6..0d257395a 100644
--- a/MediaBrowser.Model/IO/IIsoMounter.cs
+++ b/MediaBrowser.Model/IO/IIsoMounter.cs
@@ -10,6 +10,12 @@ namespace MediaBrowser.Model.IO
public interface IIsoMounter
{
/// <summary>
+ /// Gets the name.
+ /// </summary>
+ /// <value>The name.</value>
+ string Name { get; }
+
+ /// <summary>
/// Mounts the specified iso path.
/// </summary>
/// <param name="isoPath">The iso path.</param>
@@ -25,11 +31,5 @@ namespace MediaBrowser.Model.IO
/// <param name="path">The path.</param>
/// <returns><c>true</c> if this instance can mount the specified path; otherwise, <c>false</c>.</returns>
bool CanMount(string path);
-
- /// <summary>
- /// Gets the name.
- /// </summary>
- /// <value>The name.</value>
- string Name { get; }
}
}
diff --git a/MediaBrowser.Model/IO/IStreamHelper.cs b/MediaBrowser.Model/IO/IStreamHelper.cs
index e348cd725..af5ba5b17 100644
--- a/MediaBrowser.Model/IO/IStreamHelper.cs
+++ b/MediaBrowser.Model/IO/IStreamHelper.cs
@@ -14,6 +14,7 @@ namespace MediaBrowser.Model.IO
Task CopyToAsync(Stream source, Stream destination, int bufferSize, int emptyReadLimit, CancellationToken cancellationToken);
Task<int> CopyToAsync(Stream source, Stream destination, CancellationToken cancellationToken);
+
Task CopyToAsync(Stream source, Stream destination, long copyLength, CancellationToken cancellationToken);
Task CopyUntilCancelled(Stream source, Stream target, int bufferSize, CancellationToken cancellationToken);
diff --git a/MediaBrowser.Model/IO/IZipClient.cs b/MediaBrowser.Model/IO/IZipClient.cs
index 83e8a018d..2daa54f22 100644
--- a/MediaBrowser.Model/IO/IZipClient.cs
+++ b/MediaBrowser.Model/IO/IZipClient.cs
@@ -5,7 +5,7 @@ using System.IO;
namespace MediaBrowser.Model.IO
{
/// <summary>
- /// Interface IZipClient
+ /// Interface IZipClient.
/// </summary>
public interface IZipClient
{
diff --git a/MediaBrowser.Model/Library/UserViewQuery.cs b/MediaBrowser.Model/Library/UserViewQuery.cs
index a538efd25..8a49b6863 100644
--- a/MediaBrowser.Model/Library/UserViewQuery.cs
+++ b/MediaBrowser.Model/Library/UserViewQuery.cs
@@ -6,6 +6,12 @@ namespace MediaBrowser.Model.Library
{
public class UserViewQuery
{
+ public UserViewQuery()
+ {
+ IncludeExternalContent = true;
+ PresetViews = Array.Empty<string>();
+ }
+
/// <summary>
/// Gets or sets the user identifier.
/// </summary>
@@ -25,11 +31,5 @@ namespace MediaBrowser.Model.Library
public bool IncludeHidden { get; set; }
public string[] PresetViews { get; set; }
-
- public UserViewQuery()
- {
- IncludeExternalContent = true;
- PresetViews = Array.Empty<string>();
- }
}
}
diff --git a/MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs b/MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs
index 064ce6520..07e76d960 100644
--- a/MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs
+++ b/MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -123,6 +124,7 @@ namespace MediaBrowser.Model.LiveTv
/// </summary>
/// <value><c>true</c> if this instance is post padding required; otherwise, <c>false</c>.</value>
public bool IsPostPaddingRequired { get; set; }
+
public KeepUntil KeepUntil { get; set; }
}
}
diff --git a/MediaBrowser.Model/LiveTv/ChannelType.cs b/MediaBrowser.Model/LiveTv/ChannelType.cs
index b6974cb08..f4c55cb6d 100644
--- a/MediaBrowser.Model/LiveTv/ChannelType.cs
+++ b/MediaBrowser.Model/LiveTv/ChannelType.cs
@@ -6,7 +6,7 @@ namespace MediaBrowser.Model.LiveTv
public enum ChannelType
{
/// <summary>
- /// The TV
+ /// The TV.
/// </summary>
TV,
diff --git a/MediaBrowser.Model/LiveTv/GuideInfo.cs b/MediaBrowser.Model/LiveTv/GuideInfo.cs
index a224d73b7..b1cc8cfdf 100644
--- a/MediaBrowser.Model/LiveTv/GuideInfo.cs
+++ b/MediaBrowser.Model/LiveTv/GuideInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
diff --git a/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs b/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs
index 8154fbd0e..2b2377fda 100644
--- a/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs
+++ b/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -53,7 +54,7 @@ namespace MediaBrowser.Model.LiveTv
public int? StartIndex { get; set; }
/// <summary>
- /// The maximum number of items to return
+ /// The maximum number of items to return.
/// </summary>
/// <value>The limit.</value>
public int? Limit { get; set; }
@@ -63,16 +64,17 @@ namespace MediaBrowser.Model.LiveTv
/// </summary>
/// <value><c>true</c> if [add current program]; otherwise, <c>false</c>.</value>
public bool AddCurrentProgram { get; set; }
+
public bool EnableUserData { get; set; }
/// <summary>
- /// Used to specific whether to return news or not
+ /// Used to specific whether to return news or not.
/// </summary>
/// <remarks>If set to null, all programs will be returned</remarks>
public bool? IsNews { get; set; }
/// <summary>
- /// Used to specific whether to return movies or not
+ /// Used to specific whether to return movies or not.
/// </summary>
/// <remarks>If set to null, all programs will be returned</remarks>
public bool? IsMovie { get; set; }
@@ -87,12 +89,13 @@ namespace MediaBrowser.Model.LiveTv
/// </summary>
/// <value><c>null</c> if [is sports] contains no value, <c>true</c> if [is sports]; otherwise, <c>false</c>.</value>
public bool? IsSports { get; set; }
+
public bool? IsSeries { get; set; }
public string[] SortBy { get; set; }
/// <summary>
- /// The sort order to return results with
+ /// The sort order to return results with.
/// </summary>
/// <value>The sort order.</value>
public SortOrder? SortOrder { get; set; }
diff --git a/MediaBrowser.Model/LiveTv/LiveTvInfo.cs b/MediaBrowser.Model/LiveTv/LiveTvInfo.cs
index 85b77af24..9767509d0 100644
--- a/MediaBrowser.Model/LiveTv/LiveTvInfo.cs
+++ b/MediaBrowser.Model/LiveTv/LiveTvInfo.cs
@@ -6,6 +6,12 @@ namespace MediaBrowser.Model.LiveTv
{
public class LiveTvInfo
{
+ public LiveTvInfo()
+ {
+ Services = Array.Empty<LiveTvServiceInfo>();
+ EnabledUsers = Array.Empty<string>();
+ }
+
/// <summary>
/// Gets or sets the services.
/// </summary>
@@ -23,11 +29,5 @@ namespace MediaBrowser.Model.LiveTv
/// </summary>
/// <value>The enabled users.</value>
public string[] EnabledUsers { get; set; }
-
- public LiveTvInfo()
- {
- Services = Array.Empty<LiveTvServiceInfo>();
- EnabledUsers = Array.Empty<string>();
- }
}
}
diff --git a/MediaBrowser.Model/LiveTv/LiveTvOptions.cs b/MediaBrowser.Model/LiveTv/LiveTvOptions.cs
index dc8e0f91b..789de3198 100644
--- a/MediaBrowser.Model/LiveTv/LiveTvOptions.cs
+++ b/MediaBrowser.Model/LiveTv/LiveTvOptions.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -8,21 +9,29 @@ namespace MediaBrowser.Model.LiveTv
public class LiveTvOptions
{
public int? GuideDays { get; set; }
+
public string RecordingPath { get; set; }
+
public string MovieRecordingPath { get; set; }
+
public string SeriesRecordingPath { get; set; }
+
public bool EnableRecordingSubfolders { get; set; }
+
public bool EnableOriginalAudioWithEncodedRecordings { get; set; }
public TunerHostInfo[] TunerHosts { get; set; }
+
public ListingsProviderInfo[] ListingProviders { get; set; }
public int PrePaddingSeconds { get; set; }
+
public int PostPaddingSeconds { get; set; }
public string[] MediaLocationsCreated { get; set; }
public string RecordingPostProcessor { get; set; }
+
public string RecordingPostProcessorArguments { get; set; }
public LiveTvOptions()
@@ -37,15 +46,25 @@ namespace MediaBrowser.Model.LiveTv
public class TunerHostInfo
{
public string Id { get; set; }
+
public string Url { get; set; }
+
public string Type { get; set; }
+
public string DeviceId { get; set; }
+
public string FriendlyName { get; set; }
+
public bool ImportFavoritesOnly { get; set; }
+
public bool AllowHWTranscoding { get; set; }
+
public bool EnableStreamLooping { get; set; }
+
public string Source { get; set; }
+
public int TunerCount { get; set; }
+
public string UserAgent { get; set; }
public TunerHostInfo()
@@ -57,23 +76,39 @@ namespace MediaBrowser.Model.LiveTv
public class ListingsProviderInfo
{
public string Id { get; set; }
+
public string Type { get; set; }
+
public string Username { get; set; }
+
public string Password { get; set; }
+
public string ListingsId { get; set; }
+
public string ZipCode { get; set; }
+
public string Country { get; set; }
+
public string Path { get; set; }
public string[] EnabledTuners { get; set; }
+
public bool EnableAllTuners { get; set; }
+
public string[] NewsCategories { get; set; }
+
public string[] SportsCategories { get; set; }
+
public string[] KidsCategories { get; set; }
+
public string[] MovieCategories { get; set; }
+
public NameValuePair[] ChannelMappings { get; set; }
+
public string MoviePrefix { get; set; }
+
public string PreferredLanguage { get; set; }
+
public string UserAgent { get; set; }
public ListingsProviderInfo()
diff --git a/MediaBrowser.Model/LiveTv/LiveTvServiceInfo.cs b/MediaBrowser.Model/LiveTv/LiveTvServiceInfo.cs
index 09e900643..856f638c5 100644
--- a/MediaBrowser.Model/LiveTv/LiveTvServiceInfo.cs
+++ b/MediaBrowser.Model/LiveTv/LiveTvServiceInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
diff --git a/MediaBrowser.Model/LiveTv/RecordingQuery.cs b/MediaBrowser.Model/LiveTv/RecordingQuery.cs
index c75092b79..69e7db470 100644
--- a/MediaBrowser.Model/LiveTv/RecordingQuery.cs
+++ b/MediaBrowser.Model/LiveTv/RecordingQuery.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -36,7 +37,7 @@ namespace MediaBrowser.Model.LiveTv
public int? StartIndex { get; set; }
/// <summary>
- /// The maximum number of items to return
+ /// The maximum number of items to return.
/// </summary>
/// <value>The limit.</value>
public int? Limit { get; set; }
@@ -60,18 +61,27 @@ namespace MediaBrowser.Model.LiveTv
public string SeriesTimerId { get; set; }
/// <summary>
- /// Fields to return within the items, in addition to basic information
+ /// Fields to return within the items, in addition to basic information.
/// </summary>
/// <value>The fields.</value>
public ItemFields[] Fields { get; set; }
+
public bool? EnableImages { get; set; }
+
public bool? IsLibraryItem { get; set; }
+
public bool? IsNews { get; set; }
+
public bool? IsMovie { get; set; }
+
public bool? IsSeries { get; set; }
+
public bool? IsKids { get; set; }
+
public bool? IsSports { get; set; }
+
public int? ImageTypeLimit { get; set; }
+
public ImageType[] EnableImageTypes { get; set; }
public bool EnableTotalRecordCount { get; set; }
diff --git a/MediaBrowser.Model/LiveTv/SeriesTimerInfoDto.cs b/MediaBrowser.Model/LiveTv/SeriesTimerInfoDto.cs
index 29f417489..90422d19c 100644
--- a/MediaBrowser.Model/LiveTv/SeriesTimerInfoDto.cs
+++ b/MediaBrowser.Model/LiveTv/SeriesTimerInfoDto.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
diff --git a/MediaBrowser.Model/LiveTv/SeriesTimerQuery.cs b/MediaBrowser.Model/LiveTv/SeriesTimerQuery.cs
index bb553a576..b899a464b 100644
--- a/MediaBrowser.Model/LiveTv/SeriesTimerQuery.cs
+++ b/MediaBrowser.Model/LiveTv/SeriesTimerQuery.cs
@@ -7,10 +7,10 @@ namespace MediaBrowser.Model.LiveTv
public class SeriesTimerQuery
{
/// <summary>
- /// Gets or sets the sort by - SortName, Priority
+ /// Gets or sets the sort by - SortName, Priority.
/// </summary>
/// <value>The sort by.</value>
- public string SortBy { get; set; }
+ public string? SortBy { get; set; }
/// <summary>
/// Gets or sets the sort order.
diff --git a/MediaBrowser.Model/LiveTv/TimerInfoDto.cs b/MediaBrowser.Model/LiveTv/TimerInfoDto.cs
index a1fbc5177..0b9b4141a 100644
--- a/MediaBrowser.Model/LiveTv/TimerInfoDto.cs
+++ b/MediaBrowser.Model/LiveTv/TimerInfoDto.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using MediaBrowser.Model.Dto;
@@ -40,6 +41,5 @@ namespace MediaBrowser.Model.LiveTv
/// </summary>
/// <value>The program information.</value>
public BaseItemDto ProgramInfo { get; set; }
-
}
}
diff --git a/MediaBrowser.Model/LiveTv/TimerQuery.cs b/MediaBrowser.Model/LiveTv/TimerQuery.cs
index 1ef6dd67e..367c45b9d 100644
--- a/MediaBrowser.Model/LiveTv/TimerQuery.cs
+++ b/MediaBrowser.Model/LiveTv/TimerQuery.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.LiveTv
diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj
index 5c6e313e0..83bd0c07e 100644
--- a/MediaBrowser.Model/MediaBrowser.Model.csproj
+++ b/MediaBrowser.Model/MediaBrowser.Model.csproj
@@ -17,13 +17,15 @@
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TreatWarningsAsErrors Condition=" '$(Configuration)' == 'Release' ">true</TreatWarningsAsErrors>
+ <Nullable>enable</Nullable>
+ <LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
- <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.1.3" />
+ <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.1.5" />
<PackageReference Include="System.Globalization" Version="4.3.0" />
- <PackageReference Include="System.Text.Json" Version="4.7.1" />
+ <PackageReference Include="System.Text.Json" Version="4.7.2" />
</ItemGroup>
<ItemGroup>
diff --git a/MediaBrowser.Model/MediaInfo/AudioCodec.cs b/MediaBrowser.Model/MediaInfo/AudioCodec.cs
index dcb6fa270..8b17757b8 100644
--- a/MediaBrowser.Model/MediaInfo/AudioCodec.cs
+++ b/MediaBrowser.Model/MediaInfo/AudioCodec.cs
@@ -10,9 +10,9 @@ namespace MediaBrowser.Model.MediaInfo
public static string GetFriendlyName(string codec)
{
- if (string.IsNullOrEmpty(codec))
+ if (codec.Length == 0)
{
- return string.Empty;
+ return codec;
}
switch (codec.ToLowerInvariant())
diff --git a/MediaBrowser.Model/MediaInfo/BlurayDiscInfo.cs b/MediaBrowser.Model/MediaInfo/BlurayDiscInfo.cs
index 29ba10dbb..83f982a5c 100644
--- a/MediaBrowser.Model/MediaInfo/BlurayDiscInfo.cs
+++ b/MediaBrowser.Model/MediaInfo/BlurayDiscInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using MediaBrowser.Model.Entities;
diff --git a/MediaBrowser.Model/MediaInfo/LiveStreamRequest.cs b/MediaBrowser.Model/MediaInfo/LiveStreamRequest.cs
index 52348f802..83bda5d56 100644
--- a/MediaBrowser.Model/MediaInfo/LiveStreamRequest.cs
+++ b/MediaBrowser.Model/MediaInfo/LiveStreamRequest.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -7,21 +8,6 @@ namespace MediaBrowser.Model.MediaInfo
{
public class LiveStreamRequest
{
- public string OpenToken { get; set; }
- public Guid UserId { get; set; }
- public string PlaySessionId { get; set; }
- public long? MaxStreamingBitrate { get; set; }
- public long? StartTimeTicks { get; set; }
- public int? AudioStreamIndex { get; set; }
- public int? SubtitleStreamIndex { get; set; }
- public int? MaxAudioChannels { get; set; }
- public Guid ItemId { get; set; }
- public DeviceProfile DeviceProfile { get; set; }
-
- public bool EnableDirectPlay { get; set; }
- public bool EnableDirectStream { get; set; }
- public MediaProtocol[] DirectPlayProtocols { get; set; }
-
public LiveStreamRequest()
{
EnableDirectPlay = true;
@@ -38,12 +24,37 @@ namespace MediaBrowser.Model.MediaInfo
DirectPlayProtocols = new MediaProtocol[] { MediaProtocol.Http };
- var videoOptions = options as VideoOptions;
- if (videoOptions != null)
+ if (options is VideoOptions videoOptions)
{
AudioStreamIndex = videoOptions.AudioStreamIndex;
SubtitleStreamIndex = videoOptions.SubtitleStreamIndex;
}
}
+
+ public string OpenToken { get; set; }
+
+ public Guid UserId { get; set; }
+
+ public string PlaySessionId { get; set; }
+
+ public long? MaxStreamingBitrate { get; set; }
+
+ public long? StartTimeTicks { get; set; }
+
+ public int? AudioStreamIndex { get; set; }
+
+ public int? SubtitleStreamIndex { get; set; }
+
+ public int? MaxAudioChannels { get; set; }
+
+ public Guid ItemId { get; set; }
+
+ public DeviceProfile DeviceProfile { get; set; }
+
+ public bool EnableDirectPlay { get; set; }
+
+ public bool EnableDirectStream { get; set; }
+
+ public MediaProtocol[] DirectPlayProtocols { get; set; }
}
}
diff --git a/MediaBrowser.Model/MediaInfo/LiveStreamResponse.cs b/MediaBrowser.Model/MediaInfo/LiveStreamResponse.cs
index 45b8fcce9..f017c1a11 100644
--- a/MediaBrowser.Model/MediaInfo/LiveStreamResponse.cs
+++ b/MediaBrowser.Model/MediaInfo/LiveStreamResponse.cs
@@ -6,6 +6,11 @@ namespace MediaBrowser.Model.MediaInfo
{
public class LiveStreamResponse
{
- public MediaSourceInfo MediaSource { get; set; }
+ public LiveStreamResponse(MediaSourceInfo mediaSource)
+ {
+ MediaSource = mediaSource;
+ }
+
+ public MediaSourceInfo MediaSource { get; }
}
}
diff --git a/MediaBrowser.Model/MediaInfo/MediaInfo.cs b/MediaBrowser.Model/MediaInfo/MediaInfo.cs
index ad174f15d..472055c22 100644
--- a/MediaBrowser.Model/MediaInfo/MediaInfo.cs
+++ b/MediaBrowser.Model/MediaInfo/MediaInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -34,13 +35,21 @@ namespace MediaBrowser.Model.MediaInfo
/// </summary>
/// <value>The studios.</value>
public string[] Studios { get; set; }
+
public string[] Genres { get; set; }
+
public string ShowName { get; set; }
+
public int? IndexNumber { get; set; }
+
public int? ParentIndexNumber { get; set; }
+
public int? ProductionYear { get; set; }
+
public DateTime? PremiereDate { get; set; }
+
public BaseItemPerson[] People { get; set; }
+
public Dictionary<string, string> ProviderIds { get; set; }
/// <summary>
diff --git a/MediaBrowser.Model/MediaInfo/PlaybackInfoRequest.cs b/MediaBrowser.Model/MediaInfo/PlaybackInfoRequest.cs
index a2f163422..321685677 100644
--- a/MediaBrowser.Model/MediaInfo/PlaybackInfoRequest.cs
+++ b/MediaBrowser.Model/MediaInfo/PlaybackInfoRequest.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -28,11 +29,17 @@ namespace MediaBrowser.Model.MediaInfo
public DeviceProfile DeviceProfile { get; set; }
public bool EnableDirectPlay { get; set; }
+
public bool EnableDirectStream { get; set; }
+
public bool EnableTranscoding { get; set; }
+
public bool AllowVideoStreamCopy { get; set; }
+
public bool AllowAudioStreamCopy { get; set; }
+
public bool IsPlayback { get; set; }
+
public bool AutoOpenLiveStream { get; set; }
public MediaProtocol[] DirectPlayProtocols { get; set; }
diff --git a/MediaBrowser.Model/MediaInfo/PlaybackInfoResponse.cs b/MediaBrowser.Model/MediaInfo/PlaybackInfoResponse.cs
index 440818c3e..273350182 100644
--- a/MediaBrowser.Model/MediaInfo/PlaybackInfoResponse.cs
+++ b/MediaBrowser.Model/MediaInfo/PlaybackInfoResponse.cs
@@ -20,7 +20,7 @@ namespace MediaBrowser.Model.MediaInfo
/// Gets or sets the play session identifier.
/// </summary>
/// <value>The play session identifier.</value>
- public string PlaySessionId { get; set; }
+ public string? PlaySessionId { get; set; }
/// <summary>
/// Gets or sets the error code.
diff --git a/MediaBrowser.Model/MediaInfo/SubtitleTrackEvent.cs b/MediaBrowser.Model/MediaInfo/SubtitleTrackEvent.cs
index 5b0ccb28a..72bb3d9c6 100644
--- a/MediaBrowser.Model/MediaInfo/SubtitleTrackEvent.cs
+++ b/MediaBrowser.Model/MediaInfo/SubtitleTrackEvent.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.MediaInfo
@@ -5,8 +6,11 @@ namespace MediaBrowser.Model.MediaInfo
public class SubtitleTrackEvent
{
public string Id { get; set; }
+
public string Text { get; set; }
+
public long StartPositionTicks { get; set; }
+
public long EndPositionTicks { get; set; }
}
}
diff --git a/MediaBrowser.Model/Net/EndPointInfo.cs b/MediaBrowser.Model/Net/EndPointInfo.cs
index f5ac3d169..034734a9e 100644
--- a/MediaBrowser.Model/Net/EndPointInfo.cs
+++ b/MediaBrowser.Model/Net/EndPointInfo.cs
@@ -5,6 +5,7 @@ namespace MediaBrowser.Model.Net
public class EndPointInfo
{
public bool IsLocal { get; set; }
+
public bool IsInNetwork { get; set; }
}
}
diff --git a/MediaBrowser.Model/Net/HttpException.cs b/MediaBrowser.Model/Net/HttpException.cs
index 4b15e30f0..48ff5d51c 100644
--- a/MediaBrowser.Model/Net/HttpException.cs
+++ b/MediaBrowser.Model/Net/HttpException.cs
@@ -28,7 +28,6 @@ namespace MediaBrowser.Model.Net
public HttpException(string message, Exception innerException)
: base(message, innerException)
{
-
}
/// <summary>
diff --git a/MediaBrowser.Model/Net/ISocket.cs b/MediaBrowser.Model/Net/ISocket.cs
index 2bfbfcb20..5b6ed92df 100644
--- a/MediaBrowser.Model/Net/ISocket.cs
+++ b/MediaBrowser.Model/Net/ISocket.cs
@@ -17,6 +17,7 @@ namespace MediaBrowser.Model.Net
Task<SocketReceiveResult> ReceiveAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken);
IAsyncResult BeginReceive(byte[] buffer, int offset, int count, AsyncCallback callback);
+
SocketReceiveResult EndReceive(IAsyncResult result);
/// <summary>
diff --git a/MediaBrowser.Model/Net/MimeTypes.cs b/MediaBrowser.Model/Net/MimeTypes.cs
index b491a015c..771ca84f7 100644
--- a/MediaBrowser.Model/Net/MimeTypes.cs
+++ b/MediaBrowser.Model/Net/MimeTypes.cs
@@ -8,12 +8,12 @@ using System.Linq;
namespace MediaBrowser.Model.Net
{
/// <summary>
- /// Class MimeTypes
+ /// Class MimeTypes.
/// </summary>
public static class MimeTypes
{
/// <summary>
- /// Any extension in this list is considered a video file
+ /// Any extension in this list is considered a video file.
/// </summary>
private static readonly HashSet<string> _videoFileExtensions = new HashSet<string>(StringComparer.OrdinalIgnoreCase)
{
@@ -100,6 +100,7 @@ namespace MediaBrowser.Model.Net
{ ".ssa", "text/x-ssa" },
{ ".css", "text/css" },
{ ".csv", "text/csv" },
+ { ".edl", "text/plain" },
{ ".rtf", "text/rtf" },
{ ".txt", "text/plain" },
{ ".vtt", "text/vtt" },
@@ -162,16 +163,16 @@ namespace MediaBrowser.Model.Net
return dict;
}
- public static string GetMimeType(string path) => GetMimeType(path, true);
+ public static string? GetMimeType(string path) => GetMimeType(path, true);
/// <summary>
/// Gets the type of the MIME.
/// </summary>
- public static string GetMimeType(string path, bool enableStreamDefault)
+ public static string? GetMimeType(string path, bool enableStreamDefault)
{
- if (string.IsNullOrEmpty(path))
+ if (path.Length == 0)
{
- throw new ArgumentNullException(nameof(path));
+ throw new ArgumentException("String can't be empty.", nameof(path));
}
var ext = Path.GetExtension(path);
@@ -209,11 +210,11 @@ namespace MediaBrowser.Model.Net
return enableStreamDefault ? "application/octet-stream" : null;
}
- public static string ToExtension(string mimeType)
+ public static string? ToExtension(string mimeType)
{
- if (string.IsNullOrEmpty(mimeType))
+ if (mimeType.Length == 0)
{
- throw new ArgumentNullException(nameof(mimeType));
+ throw new ArgumentException("String can't be empty.", nameof(mimeType));
}
// handle text/html; charset=UTF-8
diff --git a/MediaBrowser.Model/Net/NetworkShare.cs b/MediaBrowser.Model/Net/NetworkShare.cs
index 744c6ec14..6344cbe21 100644
--- a/MediaBrowser.Model/Net/NetworkShare.cs
+++ b/MediaBrowser.Model/Net/NetworkShare.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.Net
@@ -5,27 +6,27 @@ namespace MediaBrowser.Model.Net
public class NetworkShare
{
/// <summary>
- /// The name of the computer that this share belongs to
+ /// The name of the computer that this share belongs to.
/// </summary>
public string Server { get; set; }
/// <summary>
- /// Share name
+ /// Share name.
/// </summary>
public string Name { get; set; }
/// <summary>
- /// Local path
+ /// Local path.
/// </summary>
public string Path { get; set; }
/// <summary>
- /// Share type
+ /// Share type.
/// </summary>
public NetworkShareType ShareType { get; set; }
/// <summary>
- /// Comment
+ /// Comment.
/// </summary>
public string Remark { get; set; }
}
diff --git a/MediaBrowser.Model/Net/SocketReceiveResult.cs b/MediaBrowser.Model/Net/SocketReceiveResult.cs
index 141ae1608..54139fe9c 100644
--- a/MediaBrowser.Model/Net/SocketReceiveResult.cs
+++ b/MediaBrowser.Model/Net/SocketReceiveResult.cs
@@ -1,4 +1,4 @@
-#pragma warning disable CS1591
+#nullable disable
using System.Net;
@@ -10,12 +10,12 @@ namespace MediaBrowser.Model.Net
public sealed class SocketReceiveResult
{
/// <summary>
- /// The buffer to place received data into.
+ /// Gets or sets the buffer to place received data into.
/// </summary>
public byte[] Buffer { get; set; }
/// <summary>
- /// The number of bytes received.
+ /// Gets or sets the number of bytes received.
/// </summary>
public int ReceivedBytes { get; set; }
@@ -23,6 +23,10 @@ namespace MediaBrowser.Model.Net
/// The <see cref="IPEndPoint"/> the data was received from.
/// </summary>
public IPEndPoint RemoteEndPoint { get; set; }
+
+ /// <summary>
+ /// The local <see cref="IPAddress"/>.
+ /// </summary>
public IPAddress LocalIPAddress { get; set; }
}
}
diff --git a/MediaBrowser.Model/Net/WebSocketMessage.cs b/MediaBrowser.Model/Net/WebSocketMessage.cs
index 03f03e4cc..660eebeda 100644
--- a/MediaBrowser.Model/Net/WebSocketMessage.cs
+++ b/MediaBrowser.Model/Net/WebSocketMessage.cs
@@ -1,4 +1,4 @@
-
+#nullable disable
#pragma warning disable CS1591
using System;
diff --git a/MediaBrowser.Model/Notifications/NotificationOption.cs b/MediaBrowser.Model/Notifications/NotificationOption.cs
index 4fb724515..ea363d9b1 100644
--- a/MediaBrowser.Model/Notifications/NotificationOption.cs
+++ b/MediaBrowser.Model/Notifications/NotificationOption.cs
@@ -6,10 +6,19 @@ namespace MediaBrowser.Model.Notifications
{
public class NotificationOption
{
+ public NotificationOption(string type)
+ {
+ Type = type;
+
+ DisabledServices = Array.Empty<string>();
+ DisabledMonitorUsers = Array.Empty<string>();
+ SendToUsers = Array.Empty<string>();
+ }
+
public string Type { get; set; }
/// <summary>
- /// User Ids to not monitor (it's opt out)
+ /// User Ids to not monitor (it's opt out).
/// </summary>
public string[] DisabledMonitorUsers { get; set; }
@@ -35,12 +44,5 @@ namespace MediaBrowser.Model.Notifications
/// </summary>
/// <value>The send to user mode.</value>
public SendToUserType SendToUserMode { get; set; }
-
- public NotificationOption()
- {
- DisabledServices = Array.Empty<string>();
- DisabledMonitorUsers = Array.Empty<string>();
- SendToUsers = Array.Empty<string>();
- }
}
}
diff --git a/MediaBrowser.Model/Notifications/NotificationOptions.cs b/MediaBrowser.Model/Notifications/NotificationOptions.cs
index 9c54bd70e..239a3777e 100644
--- a/MediaBrowser.Model/Notifications/NotificationOptions.cs
+++ b/MediaBrowser.Model/Notifications/NotificationOptions.cs
@@ -1,7 +1,11 @@
+#nullable disable
#pragma warning disable CS1591
using System;
+using Jellyfin.Data.Enums;
+using MediaBrowser.Model.Extensions;
using System.Linq;
+using Jellyfin.Data.Entities;
using MediaBrowser.Model.Users;
namespace MediaBrowser.Model.Notifications
@@ -14,63 +18,53 @@ namespace MediaBrowser.Model.Notifications
{
Options = new[]
{
- new NotificationOption
+ new NotificationOption(NotificationType.TaskFailed.ToString())
{
- Type = NotificationType.TaskFailed.ToString(),
Enabled = true,
SendToUserMode = SendToUserType.Admins
},
- new NotificationOption
+ new NotificationOption(NotificationType.ServerRestartRequired.ToString())
{
- Type = NotificationType.ServerRestartRequired.ToString(),
Enabled = true,
SendToUserMode = SendToUserType.Admins
},
- new NotificationOption
+ new NotificationOption(NotificationType.ApplicationUpdateAvailable.ToString())
{
- Type = NotificationType.ApplicationUpdateAvailable.ToString(),
Enabled = true,
SendToUserMode = SendToUserType.Admins
},
- new NotificationOption
+ new NotificationOption(NotificationType.ApplicationUpdateInstalled.ToString())
{
- Type = NotificationType.ApplicationUpdateInstalled.ToString(),
Enabled = true,
SendToUserMode = SendToUserType.Admins
},
- new NotificationOption
+ new NotificationOption(NotificationType.PluginUpdateInstalled.ToString())
{
- Type = NotificationType.PluginUpdateInstalled.ToString(),
Enabled = true,
SendToUserMode = SendToUserType.Admins
},
- new NotificationOption
+ new NotificationOption(NotificationType.PluginUninstalled.ToString())
{
- Type = NotificationType.PluginUninstalled.ToString(),
Enabled = true,
SendToUserMode = SendToUserType.Admins
},
- new NotificationOption
+ new NotificationOption(NotificationType.InstallationFailed.ToString())
{
- Type = NotificationType.InstallationFailed.ToString(),
Enabled = true,
SendToUserMode = SendToUserType.Admins
},
- new NotificationOption
+ new NotificationOption(NotificationType.PluginInstalled.ToString())
{
- Type = NotificationType.PluginInstalled.ToString(),
Enabled = true,
SendToUserMode = SendToUserType.Admins
},
- new NotificationOption
+ new NotificationOption(NotificationType.PluginError.ToString())
{
- Type = NotificationType.PluginError.ToString(),
Enabled = true,
SendToUserMode = SendToUserType.Admins
},
- new NotificationOption
+ new NotificationOption(NotificationType.UserLockedOut.ToString())
{
- Type = NotificationType.UserLockedOut.ToString(),
Enabled = true,
SendToUserMode = SendToUserType.Admins
}
@@ -113,7 +107,7 @@ namespace MediaBrowser.Model.Notifications
!opt.DisabledMonitorUsers.Contains(userId.ToString(""), StringComparer.OrdinalIgnoreCase);
}
- public bool IsEnabledToSendToUser(string type, string userId, UserPolicy userPolicy)
+ public bool IsEnabledToSendToUser(string type, string userId, User user)
{
NotificationOption opt = GetOptions(type);
@@ -124,7 +118,7 @@ namespace MediaBrowser.Model.Notifications
return true;
}
- if (opt.SendToUserMode == SendToUserType.Admins && userPolicy.IsAdministrator)
+ if (opt.SendToUserMode == SendToUserType.Admins && user.HasPermission(PermissionKind.IsAdministrator))
{
return true;
}
diff --git a/MediaBrowser.Model/Notifications/NotificationRequest.cs b/MediaBrowser.Model/Notifications/NotificationRequest.cs
index ffcfab24f..febc2bc09 100644
--- a/MediaBrowser.Model/Notifications/NotificationRequest.cs
+++ b/MediaBrowser.Model/Notifications/NotificationRequest.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
diff --git a/MediaBrowser.Model/Notifications/NotificationTypeInfo.cs b/MediaBrowser.Model/Notifications/NotificationTypeInfo.cs
index bfa163b40..402fbe81a 100644
--- a/MediaBrowser.Model/Notifications/NotificationTypeInfo.cs
+++ b/MediaBrowser.Model/Notifications/NotificationTypeInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.Notifications
diff --git a/MediaBrowser.Model/Playlists/PlaylistCreationRequest.cs b/MediaBrowser.Model/Playlists/PlaylistCreationRequest.cs
index b7003c4c8..ef435b21e 100644
--- a/MediaBrowser.Model/Playlists/PlaylistCreationRequest.cs
+++ b/MediaBrowser.Model/Playlists/PlaylistCreationRequest.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
diff --git a/MediaBrowser.Model/Playlists/PlaylistCreationResult.cs b/MediaBrowser.Model/Playlists/PlaylistCreationResult.cs
index 4f2067b98..f3a1518ed 100644
--- a/MediaBrowser.Model/Playlists/PlaylistCreationResult.cs
+++ b/MediaBrowser.Model/Playlists/PlaylistCreationResult.cs
@@ -4,6 +4,11 @@ namespace MediaBrowser.Model.Playlists
{
public class PlaylistCreationResult
{
- public string Id { get; set; }
+ public PlaylistCreationResult(string id)
+ {
+ Id = id;
+ }
+
+ public string Id { get; }
}
}
diff --git a/MediaBrowser.Model/Playlists/PlaylistItemQuery.cs b/MediaBrowser.Model/Playlists/PlaylistItemQuery.cs
deleted file mode 100644
index 324a38e70..000000000
--- a/MediaBrowser.Model/Playlists/PlaylistItemQuery.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-#pragma warning disable CS1591
-
-using MediaBrowser.Model.Querying;
-
-namespace MediaBrowser.Model.Playlists
-{
- public class PlaylistItemQuery
- {
- /// <summary>
- /// Gets or sets the identifier.
- /// </summary>
- /// <value>The identifier.</value>
- public string Id { get; set; }
-
- /// <summary>
- /// Gets or sets the user identifier.
- /// </summary>
- /// <value>The user identifier.</value>
- public string UserId { get; set; }
-
- /// <summary>
- /// Gets or sets the start index.
- /// </summary>
- /// <value>The start index.</value>
- public int? StartIndex { get; set; }
-
- /// <summary>
- /// Gets or sets the limit.
- /// </summary>
- /// <value>The limit.</value>
- public int? Limit { get; set; }
-
- /// <summary>
- /// Gets or sets the fields.
- /// </summary>
- /// <value>The fields.</value>
- public ItemFields[] Fields { get; set; }
- }
-}
diff --git a/MediaBrowser.Model/Plugins/PluginInfo.cs b/MediaBrowser.Model/Plugins/PluginInfo.cs
index 9ff9ea457..dd215192f 100644
--- a/MediaBrowser.Model/Plugins/PluginInfo.cs
+++ b/MediaBrowser.Model/Plugins/PluginInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
namespace MediaBrowser.Model.Plugins
{
/// <summary>
@@ -34,6 +35,12 @@ namespace MediaBrowser.Model.Plugins
/// </summary>
/// <value>The unique id.</value>
public string Id { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether the plugin can be uninstalled.
+ /// </summary>
+ public bool CanUninstall { get; set; }
+
/// <summary>
/// Gets or sets the image URL.
/// </summary>
diff --git a/MediaBrowser.Model/Plugins/PluginPageInfo.cs b/MediaBrowser.Model/Plugins/PluginPageInfo.cs
index eb6a1527d..ca72e19ee 100644
--- a/MediaBrowser.Model/Plugins/PluginPageInfo.cs
+++ b/MediaBrowser.Model/Plugins/PluginPageInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.Plugins
diff --git a/MediaBrowser.Model/Providers/ExternalUrl.cs b/MediaBrowser.Model/Providers/ExternalUrl.cs
index d4f4fa840..9467a2b00 100644
--- a/MediaBrowser.Model/Providers/ExternalUrl.cs
+++ b/MediaBrowser.Model/Providers/ExternalUrl.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.Providers
diff --git a/MediaBrowser.Model/Providers/ImageProviderInfo.cs b/MediaBrowser.Model/Providers/ImageProviderInfo.cs
index a22ec3c07..19af81c85 100644
--- a/MediaBrowser.Model/Providers/ImageProviderInfo.cs
+++ b/MediaBrowser.Model/Providers/ImageProviderInfo.cs
@@ -1,6 +1,3 @@
-#pragma warning disable CS1591
-
-using System;
using MediaBrowser.Model.Entities;
namespace MediaBrowser.Model.Providers
@@ -11,16 +8,25 @@ namespace MediaBrowser.Model.Providers
public class ImageProviderInfo
{
/// <summary>
- /// Gets or sets the name.
+ /// Initializes a new instance of the <see cref="ImageProviderInfo" /> class.
/// </summary>
- /// <value>The name.</value>
- public string Name { get; set; }
-
- public ImageType[] SupportedImages { get; set; }
-
- public ImageProviderInfo()
+ /// <param name="name">The name of the image provider.</param>
+ /// <param name="supportedImages">The image types supported by the image provider.</param>
+ public ImageProviderInfo(string name, ImageType[] supportedImages)
{
- SupportedImages = Array.Empty<ImageType>();
+ Name = name;
+ SupportedImages = supportedImages;
}
+
+ /// <summary>
+ /// Gets the name.
+ /// </summary>
+ /// <value>The name.</value>
+ public string Name { get; }
+
+ /// <summary>
+ /// Gets the supported image types.
+ /// </summary>
+ public ImageType[] SupportedImages { get; }
}
}
diff --git a/MediaBrowser.Model/Providers/RemoteImageInfo.cs b/MediaBrowser.Model/Providers/RemoteImageInfo.cs
index ee2b9d8fd..78ab6c706 100644
--- a/MediaBrowser.Model/Providers/RemoteImageInfo.cs
+++ b/MediaBrowser.Model/Providers/RemoteImageInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
diff --git a/MediaBrowser.Model/Providers/RemoteImageQuery.cs b/MediaBrowser.Model/Providers/RemoteImageQuery.cs
index 2873c1003..b7fad87ab 100644
--- a/MediaBrowser.Model/Providers/RemoteImageQuery.cs
+++ b/MediaBrowser.Model/Providers/RemoteImageQuery.cs
@@ -6,7 +6,12 @@ namespace MediaBrowser.Model.Providers
{
public class RemoteImageQuery
{
- public string ProviderName { get; set; }
+ public RemoteImageQuery(string providerName)
+ {
+ ProviderName = providerName;
+ }
+
+ public string ProviderName { get; }
public ImageType? ImageType { get; set; }
diff --git a/MediaBrowser.Model/Providers/RemoteImageResult.cs b/MediaBrowser.Model/Providers/RemoteImageResult.cs
index 5ca00f770..e6067ee6e 100644
--- a/MediaBrowser.Model/Providers/RemoteImageResult.cs
+++ b/MediaBrowser.Model/Providers/RemoteImageResult.cs
@@ -1,3 +1,4 @@
+#nullable disable
namespace MediaBrowser.Model.Providers
{
/// <summary>
diff --git a/MediaBrowser.Model/Providers/RemoteSearchResult.cs b/MediaBrowser.Model/Providers/RemoteSearchResult.cs
index 161e04821..989741c01 100644
--- a/MediaBrowser.Model/Providers/RemoteSearchResult.cs
+++ b/MediaBrowser.Model/Providers/RemoteSearchResult.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -8,23 +9,34 @@ namespace MediaBrowser.Model.Providers
{
public class RemoteSearchResult : IHasProviderIds
{
+ public RemoteSearchResult()
+ {
+ ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
+ Artists = Array.Empty<RemoteSearchResult>();
+ }
+
/// <summary>
/// Gets or sets the name.
/// </summary>
/// <value>The name.</value>
public string Name { get; set; }
+
/// <summary>
/// Gets or sets the provider ids.
/// </summary>
/// <value>The provider ids.</value>
public Dictionary<string, string> ProviderIds { get; set; }
+
/// <summary>
/// Gets or sets the year.
/// </summary>
/// <value>The year.</value>
public int? ProductionYear { get; set; }
+
public int? IndexNumber { get; set; }
+
public int? IndexNumberEnd { get; set; }
+
public int? ParentIndexNumber { get; set; }
public DateTime? PremiereDate { get; set; }
@@ -32,15 +44,12 @@ namespace MediaBrowser.Model.Providers
public string ImageUrl { get; set; }
public string SearchProviderName { get; set; }
+
public string Overview { get; set; }
public RemoteSearchResult AlbumArtist { get; set; }
+
public RemoteSearchResult[] Artists { get; set; }
- public RemoteSearchResult()
- {
- ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
- Artists = new RemoteSearchResult[] { };
- }
}
}
diff --git a/MediaBrowser.Model/Providers/RemoteSubtitleInfo.cs b/MediaBrowser.Model/Providers/RemoteSubtitleInfo.cs
index 06f29df3f..a8d88d8a1 100644
--- a/MediaBrowser.Model/Providers/RemoteSubtitleInfo.cs
+++ b/MediaBrowser.Model/Providers/RemoteSubtitleInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -7,15 +8,25 @@ namespace MediaBrowser.Model.Providers
public class RemoteSubtitleInfo
{
public string ThreeLetterISOLanguageName { get; set; }
+
public string Id { get; set; }
+
public string ProviderName { get; set; }
+
public string Name { get; set; }
+
public string Format { get; set; }
+
public string Author { get; set; }
+
public string Comment { get; set; }
+
public DateTime? DateCreated { get; set; }
+
public float? CommunityRating { get; set; }
+
public int? DownloadCount { get; set; }
+
public bool? IsHashMatch { get; set; }
}
}
diff --git a/MediaBrowser.Model/Providers/SubtitleOptions.cs b/MediaBrowser.Model/Providers/SubtitleOptions.cs
index 9e6049246..5702c460b 100644
--- a/MediaBrowser.Model/Providers/SubtitleOptions.cs
+++ b/MediaBrowser.Model/Providers/SubtitleOptions.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -7,13 +8,19 @@ namespace MediaBrowser.Model.Providers
public class SubtitleOptions
{
public bool SkipIfEmbeddedSubtitlesPresent { get; set; }
+
public bool SkipIfAudioTrackMatches { get; set; }
+
public string[] DownloadLanguages { get; set; }
+
public bool DownloadMovieSubtitles { get; set; }
+
public bool DownloadEpisodeSubtitles { get; set; }
public string OpenSubtitlesUsername { get; set; }
+
public string OpenSubtitlesPasswordHash { get; set; }
+
public bool IsOpenSubtitleVipAccount { get; set; }
public bool RequirePerfectMatch { get; set; }
diff --git a/MediaBrowser.Model/Providers/SubtitleProviderInfo.cs b/MediaBrowser.Model/Providers/SubtitleProviderInfo.cs
index fca93d176..7a7e7b9ec 100644
--- a/MediaBrowser.Model/Providers/SubtitleProviderInfo.cs
+++ b/MediaBrowser.Model/Providers/SubtitleProviderInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.Providers
@@ -5,6 +6,7 @@ namespace MediaBrowser.Model.Providers
public class SubtitleProviderInfo
{
public string Name { get; set; }
+
public string Id { get; set; }
}
}
diff --git a/MediaBrowser.Model/Querying/AllThemeMediaResult.cs b/MediaBrowser.Model/Querying/AllThemeMediaResult.cs
index a264c6178..6b503ba6b 100644
--- a/MediaBrowser.Model/Querying/AllThemeMediaResult.cs
+++ b/MediaBrowser.Model/Querying/AllThemeMediaResult.cs
@@ -1,15 +1,10 @@
+#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.Querying
{
public class AllThemeMediaResult
{
- public ThemeMediaResult ThemeVideosResult { get; set; }
-
- public ThemeMediaResult ThemeSongsResult { get; set; }
-
- public ThemeMediaResult SoundtrackSongsResult { get; set; }
-
public AllThemeMediaResult()
{
ThemeVideosResult = new ThemeMediaResult();
@@ -18,5 +13,11 @@ namespace MediaBrowser.Model.Querying
SoundtrackSongsResult = new ThemeMediaResult();
}
+
+ public ThemeMediaResult ThemeVideosResult { get; set; }
+
+ public ThemeMediaResult ThemeSongsResult { get; set; }
+
+ public ThemeMediaResult SoundtrackSongsResult { get; set; }
}
}
diff --git a/MediaBrowser.Model/Querying/EpisodeQuery.cs b/MediaBrowser.Model/Querying/EpisodeQuery.cs
index 6fb4df676..13b1a0dcb 100644
--- a/MediaBrowser.Model/Querying/EpisodeQuery.cs
+++ b/MediaBrowser.Model/Querying/EpisodeQuery.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
diff --git a/MediaBrowser.Model/Querying/ItemCountsQuery.cs b/MediaBrowser.Model/Querying/ItemCountsQuery.cs
deleted file mode 100644
index f113cf380..000000000
--- a/MediaBrowser.Model/Querying/ItemCountsQuery.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-namespace MediaBrowser.Model.Querying
-{
- /// <summary>
- /// Class ItemCountsQuery.
- /// </summary>
- public class ItemCountsQuery
- {
- /// <summary>
- /// Gets or sets the user id.
- /// </summary>
- /// <value>The user id.</value>
- public string UserId { get; set; }
-
- /// <summary>
- /// Gets or sets a value indicating whether this instance is favorite.
- /// </summary>
- /// <value><c>null</c> if [is favorite] contains no value, <c>true</c> if [is favorite]; otherwise, <c>false</c>.</value>
- public bool? IsFavorite { get; set; }
- }
-}
diff --git a/MediaBrowser.Model/Querying/ItemFields.cs b/MediaBrowser.Model/Querying/ItemFields.cs
index d7cc5ebbe..731d22aaf 100644
--- a/MediaBrowser.Model/Querying/ItemFields.cs
+++ b/MediaBrowser.Model/Querying/ItemFields.cs
@@ -8,198 +8,198 @@ namespace MediaBrowser.Model.Querying
public enum ItemFields
{
/// <summary>
- /// The air time
+ /// The air time.
/// </summary>
AirTime,
/// <summary>
- /// The can delete
+ /// The can delete.
/// </summary>
CanDelete,
/// <summary>
- /// The can download
+ /// The can download.
/// </summary>
CanDownload,
/// <summary>
- /// The channel information
+ /// The channel information.
/// </summary>
ChannelInfo,
/// <summary>
- /// The chapters
+ /// The chapters.
/// </summary>
Chapters,
ChildCount,
/// <summary>
- /// The cumulative run time ticks
+ /// The cumulative run time ticks.
/// </summary>
CumulativeRunTimeTicks,
/// <summary>
- /// The custom rating
+ /// The custom rating.
/// </summary>
CustomRating,
/// <summary>
- /// The date created of the item
+ /// The date created of the item.
/// </summary>
DateCreated,
/// <summary>
- /// The date last media added
+ /// The date last media added.
/// </summary>
DateLastMediaAdded,
/// <summary>
- /// Item display preferences
+ /// Item display preferences.
/// </summary>
DisplayPreferencesId,
/// <summary>
- /// The etag
+ /// The etag.
/// </summary>
Etag,
/// <summary>
- /// The external urls
+ /// The external urls.
/// </summary>
ExternalUrls,
/// <summary>
- /// Genres
+ /// Genres.
/// </summary>
Genres,
/// <summary>
- /// The home page URL
+ /// The home page URL.
/// </summary>
HomePageUrl,
/// <summary>
- /// The item counts
+ /// The item counts.
/// </summary>
ItemCounts,
/// <summary>
- /// The media source count
+ /// The media source count.
/// </summary>
MediaSourceCount,
/// <summary>
- /// The media versions
+ /// The media versions.
/// </summary>
MediaSources,
OriginalTitle,
/// <summary>
- /// The item overview
+ /// The item overview.
/// </summary>
Overview,
/// <summary>
- /// The id of the item's parent
+ /// The id of the item's parent.
/// </summary>
ParentId,
/// <summary>
- /// The physical path of the item
+ /// The physical path of the item.
/// </summary>
Path,
/// <summary>
- /// The list of people for the item
+ /// The list of people for the item.
/// </summary>
People,
PlayAccess,
/// <summary>
- /// The production locations
+ /// The production locations.
/// </summary>
ProductionLocations,
/// <summary>
- /// Imdb, tmdb, etc
+ /// Imdb, tmdb, etc.
/// </summary>
ProviderIds,
/// <summary>
- /// The aspect ratio of the primary image
+ /// The aspect ratio of the primary image.
/// </summary>
PrimaryImageAspectRatio,
RecursiveItemCount,
/// <summary>
- /// The settings
+ /// The settings.
/// </summary>
Settings,
/// <summary>
- /// The screenshot image tags
+ /// The screenshot image tags.
/// </summary>
ScreenshotImageTags,
SeriesPrimaryImage,
/// <summary>
- /// The series studio
+ /// The series studio.
/// </summary>
SeriesStudio,
/// <summary>
- /// The sort name of the item
+ /// The sort name of the item.
/// </summary>
SortName,
/// <summary>
- /// The special episode numbers
+ /// The special episode numbers.
/// </summary>
SpecialEpisodeNumbers,
/// <summary>
- /// The studios of the item
+ /// The studios of the item.
/// </summary>
Studios,
BasicSyncInfo,
/// <summary>
- /// The synchronize information
+ /// The synchronize information.
/// </summary>
SyncInfo,
/// <summary>
- /// The taglines of the item
+ /// The taglines of the item.
/// </summary>
Taglines,
/// <summary>
- /// The tags
+ /// The tags.
/// </summary>
Tags,
/// <summary>
- /// The trailer url of the item
+ /// The trailer url of the item.
/// </summary>
RemoteTrailers,
/// <summary>
- /// The media streams
+ /// The media streams.
/// </summary>
MediaStreams,
/// <summary>
- /// The season user data
+ /// The season user data.
/// </summary>
SeasonUserData,
/// <summary>
- /// The service name
+ /// The service name.
/// </summary>
ServiceName,
ThemeSongIds,
diff --git a/MediaBrowser.Model/Querying/ItemSortBy.cs b/MediaBrowser.Model/Querying/ItemSortBy.cs
index 15b60ad84..0b846bb96 100644
--- a/MediaBrowser.Model/Querying/ItemSortBy.cs
+++ b/MediaBrowser.Model/Querying/ItemSortBy.cs
@@ -3,78 +3,104 @@
namespace MediaBrowser.Model.Querying
{
/// <summary>
- /// These represent sort orders that are known by the core
+ /// These represent sort orders that are known by the core.
/// </summary>
public static class ItemSortBy
{
public const string AiredEpisodeOrder = "AiredEpisodeOrder";
+
/// <summary>
- /// The album
+ /// The album.
/// </summary>
public const string Album = "Album";
+
/// <summary>
- /// The album artist
+ /// The album artist.
/// </summary>
public const string AlbumArtist = "AlbumArtist";
+
/// <summary>
- /// The artist
+ /// The artist.
/// </summary>
public const string Artist = "Artist";
+
/// <summary>
- /// The date created
+ /// The date created.
/// </summary>
public const string DateCreated = "DateCreated";
+
/// <summary>
- /// The official rating
+ /// The official rating.
/// </summary>
public const string OfficialRating = "OfficialRating";
+
/// <summary>
- /// The date played
+ /// The date played.
/// </summary>
public const string DatePlayed = "DatePlayed";
+
/// <summary>
- /// The premiere date
+ /// The premiere date.
/// </summary>
public const string PremiereDate = "PremiereDate";
+
public const string StartDate = "StartDate";
+
/// <summary>
- /// The sort name
+ /// The sort name.
/// </summary>
public const string SortName = "SortName";
+
public const string Name = "Name";
+
/// <summary>
- /// The random
+ /// The random.
/// </summary>
public const string Random = "Random";
+
/// <summary>
- /// The runtime
+ /// The runtime.
/// </summary>
public const string Runtime = "Runtime";
+
/// <summary>
- /// The community rating
+ /// The community rating.
/// </summary>
public const string CommunityRating = "CommunityRating";
+
/// <summary>
- /// The production year
+ /// The production year.
/// </summary>
public const string ProductionYear = "ProductionYear";
+
/// <summary>
- /// The play count
+ /// The play count.
/// </summary>
public const string PlayCount = "PlayCount";
+
/// <summary>
- /// The critic rating
+ /// The critic rating.
/// </summary>
public const string CriticRating = "CriticRating";
+
public const string IsFolder = "IsFolder";
+
public const string IsUnplayed = "IsUnplayed";
+
public const string IsPlayed = "IsPlayed";
+
public const string SeriesSortName = "SeriesSortName";
+
public const string VideoBitRate = "VideoBitRate";
+
public const string AirTime = "AirTime";
+
public const string Studio = "Studio";
+
public const string IsFavoriteOrLiked = "IsFavoriteOrLiked";
+
public const string DateLastContentAdded = "DateLastContentAdded";
+
public const string SeriesDatePlayed = "SeriesDatePlayed";
}
}
diff --git a/MediaBrowser.Model/Querying/LatestItemsQuery.cs b/MediaBrowser.Model/Querying/LatestItemsQuery.cs
index 84e29e76a..7954ef4b4 100644
--- a/MediaBrowser.Model/Querying/LatestItemsQuery.cs
+++ b/MediaBrowser.Model/Querying/LatestItemsQuery.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -7,8 +8,13 @@ namespace MediaBrowser.Model.Querying
{
public class LatestItemsQuery
{
+ public LatestItemsQuery()
+ {
+ EnableImageTypes = Array.Empty<ImageType>();
+ }
+
/// <summary>
- /// The user to localize search results for
+ /// The user to localize search results for.
/// </summary>
/// <value>The user id.</value>
public Guid UserId { get; set; }
@@ -26,13 +32,13 @@ namespace MediaBrowser.Model.Querying
public int? StartIndex { get; set; }
/// <summary>
- /// The maximum number of items to return
+ /// The maximum number of items to return.
/// </summary>
/// <value>The limit.</value>
public int? Limit { get; set; }
/// <summary>
- /// Fields to return within the items, in addition to basic information
+ /// Fields to return within the items, in addition to basic information.
/// </summary>
/// <value>The fields.</value>
public ItemFields[] Fields { get; set; }
@@ -54,25 +60,23 @@ namespace MediaBrowser.Model.Querying
/// </summary>
/// <value><c>true</c> if [group items]; otherwise, <c>false</c>.</value>
public bool GroupItems { get; set; }
+
/// <summary>
/// Gets or sets a value indicating whether [enable images].
/// </summary>
/// <value><c>null</c> if [enable images] contains no value, <c>true</c> if [enable images]; otherwise, <c>false</c>.</value>
public bool? EnableImages { get; set; }
+
/// <summary>
/// Gets or sets the image type limit.
/// </summary>
/// <value>The image type limit.</value>
public int? ImageTypeLimit { get; set; }
+
/// <summary>
/// Gets or sets the enable image types.
/// </summary>
/// <value>The enable image types.</value>
public ImageType[] EnableImageTypes { get; set; }
-
- public LatestItemsQuery()
- {
- EnableImageTypes = new ImageType[] { };
- }
}
}
diff --git a/MediaBrowser.Model/Querying/MovieRecommendationQuery.cs b/MediaBrowser.Model/Querying/MovieRecommendationQuery.cs
index 93de0a8cd..1c8875890 100644
--- a/MediaBrowser.Model/Querying/MovieRecommendationQuery.cs
+++ b/MediaBrowser.Model/Querying/MovieRecommendationQuery.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
diff --git a/MediaBrowser.Model/Querying/NextUpQuery.cs b/MediaBrowser.Model/Querying/NextUpQuery.cs
index 1543aea16..ee13ffc16 100644
--- a/MediaBrowser.Model/Querying/NextUpQuery.cs
+++ b/MediaBrowser.Model/Querying/NextUpQuery.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -32,13 +33,13 @@ namespace MediaBrowser.Model.Querying
public int? StartIndex { get; set; }
/// <summary>
- /// The maximum number of items to return
+ /// The maximum number of items to return.
/// </summary>
/// <value>The limit.</value>
public int? Limit { get; set; }
/// <summary>
- /// Fields to return within the items, in addition to basic information
+ /// Fields to return within the items, in addition to basic information.
/// </summary>
/// <value>The fields.</value>
public ItemFields[] Fields { get; set; }
diff --git a/MediaBrowser.Model/Querying/QueryFilters.cs b/MediaBrowser.Model/Querying/QueryFilters.cs
index 8d879c174..6e4d25181 100644
--- a/MediaBrowser.Model/Querying/QueryFilters.cs
+++ b/MediaBrowser.Model/Querying/QueryFilters.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -8,8 +9,11 @@ namespace MediaBrowser.Model.Querying
public class QueryFiltersLegacy
{
public string[] Genres { get; set; }
+
public string[] Tags { get; set; }
+
public string[] OfficialRatings { get; set; }
+
public int[] Years { get; set; }
public QueryFiltersLegacy()
@@ -20,9 +24,11 @@ namespace MediaBrowser.Model.Querying
Years = Array.Empty<int>();
}
}
+
public class QueryFilters
{
public NameGuidPair[] Genres { get; set; }
+
public string[] Tags { get; set; }
public QueryFilters()
diff --git a/MediaBrowser.Model/Querying/QueryResult.cs b/MediaBrowser.Model/Querying/QueryResult.cs
index 266f1c7e6..490f48b84 100644
--- a/MediaBrowser.Model/Querying/QueryResult.cs
+++ b/MediaBrowser.Model/Querying/QueryResult.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -14,7 +15,7 @@ namespace MediaBrowser.Model.Querying
public IReadOnlyList<T> Items { get; set; }
/// <summary>
- /// The total number of records available
+ /// The total number of records available.
/// </summary>
/// <value>The total record count.</value>
public int TotalRecordCount { get; set; }
diff --git a/MediaBrowser.Model/Querying/ThemeMediaResult.cs b/MediaBrowser.Model/Querying/ThemeMediaResult.cs
index bae954d78..5afedeeaf 100644
--- a/MediaBrowser.Model/Querying/ThemeMediaResult.cs
+++ b/MediaBrowser.Model/Querying/ThemeMediaResult.cs
@@ -4,7 +4,7 @@ using MediaBrowser.Model.Dto;
namespace MediaBrowser.Model.Querying
{
/// <summary>
- /// Class ThemeMediaResult
+ /// Class ThemeMediaResult.
/// </summary>
public class ThemeMediaResult : QueryResult<BaseItemDto>
{
diff --git a/MediaBrowser.Model/Querying/UpcomingEpisodesQuery.cs b/MediaBrowser.Model/Querying/UpcomingEpisodesQuery.cs
index 123d0fad2..12d537492 100644
--- a/MediaBrowser.Model/Querying/UpcomingEpisodesQuery.cs
+++ b/MediaBrowser.Model/Querying/UpcomingEpisodesQuery.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using MediaBrowser.Model.Entities;
@@ -25,13 +26,13 @@ namespace MediaBrowser.Model.Querying
public int? StartIndex { get; set; }
/// <summary>
- /// The maximum number of items to return
+ /// The maximum number of items to return.
/// </summary>
/// <value>The limit.</value>
public int? Limit { get; set; }
/// <summary>
- /// Fields to return within the items, in addition to basic information
+ /// Fields to return within the items, in addition to basic information.
/// </summary>
/// <value>The fields.</value>
public ItemFields[] Fields { get; set; }
diff --git a/MediaBrowser.Model/Search/SearchHint.cs b/MediaBrowser.Model/Search/SearchHint.cs
index 6e52314fa..983dbd2bc 100644
--- a/MediaBrowser.Model/Search/SearchHint.cs
+++ b/MediaBrowser.Model/Search/SearchHint.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -99,6 +100,7 @@ namespace MediaBrowser.Model.Search
public string MediaType { get; set; }
public DateTime? StartDate { get; set; }
+
public DateTime? EndDate { get; set; }
/// <summary>
diff --git a/MediaBrowser.Model/Search/SearchHintResult.cs b/MediaBrowser.Model/Search/SearchHintResult.cs
index 3c4fbec9e..92ba4139e 100644
--- a/MediaBrowser.Model/Search/SearchHintResult.cs
+++ b/MediaBrowser.Model/Search/SearchHintResult.cs
@@ -1,3 +1,4 @@
+#nullable disable
namespace MediaBrowser.Model.Search
{
/// <summary>
diff --git a/MediaBrowser.Model/Search/SearchQuery.cs b/MediaBrowser.Model/Search/SearchQuery.cs
index 8a018312e..01ad319a4 100644
--- a/MediaBrowser.Model/Search/SearchQuery.cs
+++ b/MediaBrowser.Model/Search/SearchQuery.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -7,7 +8,7 @@ namespace MediaBrowser.Model.Search
public class SearchQuery
{
/// <summary>
- /// The user to localize search results for
+ /// The user to localize search results for.
/// </summary>
/// <value>The user id.</value>
public Guid UserId { get; set; }
@@ -25,20 +26,27 @@ namespace MediaBrowser.Model.Search
public int? StartIndex { get; set; }
/// <summary>
- /// The maximum number of items to return
+ /// The maximum number of items to return.
/// </summary>
/// <value>The limit.</value>
public int? Limit { get; set; }
public bool IncludePeople { get; set; }
+
public bool IncludeMedia { get; set; }
+
public bool IncludeGenres { get; set; }
+
public bool IncludeStudios { get; set; }
+
public bool IncludeArtists { get; set; }
public string[] MediaTypes { get; set; }
+
public string[] IncludeItemTypes { get; set; }
+
public string[] ExcludeItemTypes { get; set; }
+
public string ParentId { get; set; }
public bool? IsMovie { get; set; }
diff --git a/MediaBrowser.Model/Serialization/IJsonSerializer.cs b/MediaBrowser.Model/Serialization/IJsonSerializer.cs
index 6223bb559..09b6ff9b5 100644
--- a/MediaBrowser.Model/Serialization/IJsonSerializer.cs
+++ b/MediaBrowser.Model/Serialization/IJsonSerializer.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
diff --git a/MediaBrowser.Model/Serialization/IXmlSerializer.cs b/MediaBrowser.Model/Serialization/IXmlSerializer.cs
index 1edd98fad..16d126ac7 100644
--- a/MediaBrowser.Model/Serialization/IXmlSerializer.cs
+++ b/MediaBrowser.Model/Serialization/IXmlSerializer.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
diff --git a/MediaBrowser.Model/Services/ApiMemberAttribute.cs b/MediaBrowser.Model/Services/ApiMemberAttribute.cs
index 8e50836f4..63f3ecd55 100644
--- a/MediaBrowser.Model/Services/ApiMemberAttribute.cs
+++ b/MediaBrowser.Model/Services/ApiMemberAttribute.cs
@@ -1,3 +1,4 @@
+#nullable disable
using System;
namespace MediaBrowser.Model.Services
@@ -57,7 +58,7 @@ namespace MediaBrowser.Model.Services
public string Route { get; set; }
/// <summary>
- /// Whether to exclude this property from being included in the ModelSchema
+ /// Whether to exclude this property from being included in the ModelSchema.
/// </summary>
public bool ExcludeInSchema { get; set; }
}
diff --git a/MediaBrowser.Model/Services/IHasRequestFilter.cs b/MediaBrowser.Model/Services/IHasRequestFilter.cs
index 3e49e9872..b83d3b075 100644
--- a/MediaBrowser.Model/Services/IHasRequestFilter.cs
+++ b/MediaBrowser.Model/Services/IHasRequestFilter.cs
@@ -7,7 +7,7 @@ namespace MediaBrowser.Model.Services
public interface IHasRequestFilter
{
/// <summary>
- /// Order in which Request Filters are executed.
+ /// Gets the order in which Request Filters are executed.
/// &lt;0 Executed before global request filters.
/// &gt;0 Executed after global request filters.
/// </summary>
diff --git a/MediaBrowser.Model/Services/IHttpRequest.cs b/MediaBrowser.Model/Services/IHttpRequest.cs
index 4dccd2d68..3ea65195c 100644
--- a/MediaBrowser.Model/Services/IHttpRequest.cs
+++ b/MediaBrowser.Model/Services/IHttpRequest.cs
@@ -5,12 +5,12 @@ namespace MediaBrowser.Model.Services
public interface IHttpRequest : IRequest
{
/// <summary>
- /// The HTTP Verb
+ /// Gets the HTTP Verb.
/// </summary>
string HttpMethod { get; }
/// <summary>
- /// The value of the Accept HTTP Request Header
+ /// Gets the value of the Accept HTTP Request Header.
/// </summary>
string Accept { get; }
}
diff --git a/MediaBrowser.Model/Services/IHttpResult.cs b/MediaBrowser.Model/Services/IHttpResult.cs
index b153f15ec..abc581d8e 100644
--- a/MediaBrowser.Model/Services/IHttpResult.cs
+++ b/MediaBrowser.Model/Services/IHttpResult.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System.Net;
@@ -7,27 +8,27 @@ namespace MediaBrowser.Model.Services
public interface IHttpResult : IHasHeaders
{
/// <summary>
- /// The HTTP Response Status
+ /// The HTTP Response Status.
/// </summary>
int Status { get; set; }
/// <summary>
- /// The HTTP Response Status Code
+ /// The HTTP Response Status Code.
/// </summary>
HttpStatusCode StatusCode { get; set; }
/// <summary>
- /// The HTTP Response ContentType
+ /// The HTTP Response ContentType.
/// </summary>
string ContentType { get; set; }
/// <summary>
- /// Response DTO
+ /// Response DTO.
/// </summary>
object Response { get; set; }
/// <summary>
- /// Holds the request call context
+ /// Holds the request call context.
/// </summary>
IRequest RequestContext { get; set; }
}
diff --git a/MediaBrowser.Model/Services/IRequest.cs b/MediaBrowser.Model/Services/IRequest.cs
index 3f4edced6..8bc1d3668 100644
--- a/MediaBrowser.Model/Services/IRequest.cs
+++ b/MediaBrowser.Model/Services/IRequest.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -22,7 +23,7 @@ namespace MediaBrowser.Model.Services
string Verb { get; }
/// <summary>
- /// The request ContentType
+ /// The request ContentType.
/// </summary>
string ContentType { get; }
@@ -31,7 +32,7 @@ namespace MediaBrowser.Model.Services
string UserAgent { get; }
/// <summary>
- /// The expected Response ContentType for this request
+ /// The expected Response ContentType for this request.
/// </summary>
string ResponseContentType { get; set; }
@@ -54,7 +55,7 @@ namespace MediaBrowser.Model.Services
string RemoteIp { get; }
/// <summary>
- /// The value of the Authorization Header used to send the Api Key, null if not available
+ /// The value of the Authorization Header used to send the Api Key, null if not available.
/// </summary>
string Authorization { get; }
@@ -67,7 +68,7 @@ namespace MediaBrowser.Model.Services
long ContentLength { get; }
/// <summary>
- /// The value of the Referrer, null if not available
+ /// The value of the Referrer, null if not available.
/// </summary>
Uri UrlReferrer { get; }
}
@@ -75,9 +76,13 @@ namespace MediaBrowser.Model.Services
public interface IHttpFile
{
string Name { get; }
+
string FileName { get; }
+
long ContentLength { get; }
+
string ContentType { get; }
+
Stream InputStream { get; }
}
diff --git a/MediaBrowser.Model/Services/IRequiresRequestStream.cs b/MediaBrowser.Model/Services/IRequiresRequestStream.cs
index 622626edc..3e5f2da42 100644
--- a/MediaBrowser.Model/Services/IRequiresRequestStream.cs
+++ b/MediaBrowser.Model/Services/IRequiresRequestStream.cs
@@ -7,7 +7,7 @@ namespace MediaBrowser.Model.Services
public interface IRequiresRequestStream
{
/// <summary>
- /// The raw Http Request Input Stream
+ /// The raw Http Request Input Stream.
/// </summary>
Stream RequestStream { get; set; }
}
diff --git a/MediaBrowser.Model/Services/IService.cs b/MediaBrowser.Model/Services/IService.cs
index a26d39455..5233f57ab 100644
--- a/MediaBrowser.Model/Services/IService.cs
+++ b/MediaBrowser.Model/Services/IService.cs
@@ -8,6 +8,8 @@ namespace MediaBrowser.Model.Services
}
public interface IReturn { }
+
public interface IReturn<T> : IReturn { }
+
public interface IReturnVoid : IReturn { }
}
diff --git a/MediaBrowser.Model/Services/QueryParamCollection.cs b/MediaBrowser.Model/Services/QueryParamCollection.cs
index 19e9e53e7..bdb0cabdf 100644
--- a/MediaBrowser.Model/Services/QueryParamCollection.cs
+++ b/MediaBrowser.Model/Services/QueryParamCollection.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -19,11 +20,6 @@ namespace MediaBrowser.Model.Services
return StringComparison.OrdinalIgnoreCase;
}
- private static StringComparer GetStringComparer()
- {
- return StringComparer.OrdinalIgnoreCase;
- }
-
/// <summary>
/// Adds a new query parameter.
/// </summary>
@@ -128,8 +124,8 @@ namespace MediaBrowser.Model.Services
/// Gets or sets a query parameter value by name. A query may contain multiple values of the same name
/// (i.e. "x=1&amp;x=2"), in which case the value is an array, which works for both getting and setting.
/// </summary>
- /// <param name="name">The query parameter name</param>
- /// <returns>The query parameter value or array of values</returns>
+ /// <param name="name">The query parameter name.</param>
+ /// <returns>The query parameter value or array of values.</returns>
public string this[string name]
{
get => Get(name);
diff --git a/MediaBrowser.Model/Services/RouteAttribute.cs b/MediaBrowser.Model/Services/RouteAttribute.cs
index 197ba05e5..f8bf51112 100644
--- a/MediaBrowser.Model/Services/RouteAttribute.cs
+++ b/MediaBrowser.Model/Services/RouteAttribute.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -127,9 +128,21 @@ namespace MediaBrowser.Model.Services
public override bool Equals(object obj)
{
- if (ReferenceEquals(null, obj)) return false;
- if (ReferenceEquals(this, obj)) return true;
- if (obj.GetType() != this.GetType()) return false;
+ if (ReferenceEquals(null, obj))
+ {
+ return false;
+ }
+
+ if (ReferenceEquals(this, obj))
+ {
+ return true;
+ }
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
return Equals((RouteAttribute)obj);
}
diff --git a/MediaBrowser.Model/Session/BrowseRequest.cs b/MediaBrowser.Model/Session/BrowseRequest.cs
index f485d680e..1c997d584 100644
--- a/MediaBrowser.Model/Session/BrowseRequest.cs
+++ b/MediaBrowser.Model/Session/BrowseRequest.cs
@@ -1,3 +1,4 @@
+#nullable disable
namespace MediaBrowser.Model.Session
{
/// <summary>
diff --git a/MediaBrowser.Model/Session/ClientCapabilities.cs b/MediaBrowser.Model/Session/ClientCapabilities.cs
index 5da4998e8..d3878ca30 100644
--- a/MediaBrowser.Model/Session/ClientCapabilities.cs
+++ b/MediaBrowser.Model/Session/ClientCapabilities.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -12,15 +13,19 @@ namespace MediaBrowser.Model.Session
public string[] SupportedCommands { get; set; }
public bool SupportsMediaControl { get; set; }
+
public bool SupportsContentUploading { get; set; }
+
public string MessageCallbackUrl { get; set; }
public bool SupportsPersistentIdentifier { get; set; }
+
public bool SupportsSync { get; set; }
public DeviceProfile DeviceProfile { get; set; }
public string AppStoreUrl { get; set; }
+
public string IconUrl { get; set; }
public ClientCapabilities()
diff --git a/MediaBrowser.Model/Session/GeneralCommand.cs b/MediaBrowser.Model/Session/GeneralCommand.cs
index 980e1f88b..9794bd292 100644
--- a/MediaBrowser.Model/Session/GeneralCommand.cs
+++ b/MediaBrowser.Model/Session/GeneralCommand.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
diff --git a/MediaBrowser.Model/Session/MessageCommand.cs b/MediaBrowser.Model/Session/MessageCommand.cs
index 473a7bccc..09abfbb3f 100644
--- a/MediaBrowser.Model/Session/MessageCommand.cs
+++ b/MediaBrowser.Model/Session/MessageCommand.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.Session
diff --git a/MediaBrowser.Model/Session/PlayRequest.cs b/MediaBrowser.Model/Session/PlayRequest.cs
index bdb2b2439..d57bed171 100644
--- a/MediaBrowser.Model/Session/PlayRequest.cs
+++ b/MediaBrowser.Model/Session/PlayRequest.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -6,7 +7,7 @@ using MediaBrowser.Model.Services;
namespace MediaBrowser.Model.Session
{
/// <summary>
- /// Class PlayRequest
+ /// Class PlayRequest.
/// </summary>
public class PlayRequest
{
@@ -18,7 +19,7 @@ namespace MediaBrowser.Model.Session
public Guid[] ItemIds { get; set; }
/// <summary>
- /// Gets or sets the start position ticks that the first item should be played at
+ /// Gets or sets the start position ticks that the first item should be played at.
/// </summary>
/// <value>The start position ticks.</value>
[ApiMember(Name = "StartPositionTicks", Description = "The starting position of the first item.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "POST")]
@@ -38,8 +39,11 @@ namespace MediaBrowser.Model.Session
public Guid ControllingUserId { get; set; }
public int? SubtitleStreamIndex { get; set; }
+
public int? AudioStreamIndex { get; set; }
+
public string MediaSourceId { get; set; }
+
public int? StartIndex { get; set; }
}
}
diff --git a/MediaBrowser.Model/Session/PlaybackProgressInfo.cs b/MediaBrowser.Model/Session/PlaybackProgressInfo.cs
index 5687ba84b..21bcabf1d 100644
--- a/MediaBrowser.Model/Session/PlaybackProgressInfo.cs
+++ b/MediaBrowser.Model/Session/PlaybackProgressInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -104,6 +105,7 @@ namespace MediaBrowser.Model.Session
public RepeatMode RepeatMode { get; set; }
public QueueItem[] NowPlayingQueue { get; set; }
+
public string PlaylistItemId { get; set; }
}
@@ -117,6 +119,7 @@ namespace MediaBrowser.Model.Session
public class QueueItem
{
public Guid Id { get; set; }
+
public string PlaylistItemId { get; set; }
}
}
diff --git a/MediaBrowser.Model/Session/PlaybackStopInfo.cs b/MediaBrowser.Model/Session/PlaybackStopInfo.cs
index f8cfacc20..aa29bb249 100644
--- a/MediaBrowser.Model/Session/PlaybackStopInfo.cs
+++ b/MediaBrowser.Model/Session/PlaybackStopInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -61,6 +62,7 @@ namespace MediaBrowser.Model.Session
public string NextMediaType { get; set; }
public string PlaylistItemId { get; set; }
+
public QueueItem[] NowPlayingQueue { get; set; }
}
}
diff --git a/MediaBrowser.Model/Session/PlayerStateInfo.cs b/MediaBrowser.Model/Session/PlayerStateInfo.cs
index 0f9956873..0f10605ea 100644
--- a/MediaBrowser.Model/Session/PlayerStateInfo.cs
+++ b/MediaBrowser.Model/Session/PlayerStateInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.Session
diff --git a/MediaBrowser.Model/Session/PlaystateRequest.cs b/MediaBrowser.Model/Session/PlaystateRequest.cs
index 493a8063a..ba2c024b7 100644
--- a/MediaBrowser.Model/Session/PlaystateRequest.cs
+++ b/MediaBrowser.Model/Session/PlaystateRequest.cs
@@ -12,6 +12,6 @@ namespace MediaBrowser.Model.Session
/// Gets or sets the controlling user identifier.
/// </summary>
/// <value>The controlling user identifier.</value>
- public string ControllingUserId { get; set; }
+ public string? ControllingUserId { get; set; }
}
}
diff --git a/MediaBrowser.Model/Session/SessionUserInfo.cs b/MediaBrowser.Model/Session/SessionUserInfo.cs
index 42a56b92b..4d6f35efc 100644
--- a/MediaBrowser.Model/Session/SessionUserInfo.cs
+++ b/MediaBrowser.Model/Session/SessionUserInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
using System;
namespace MediaBrowser.Model.Session
@@ -12,6 +13,7 @@ namespace MediaBrowser.Model.Session
/// </summary>
/// <value>The user identifier.</value>
public Guid UserId { get; set; }
+
/// <summary>
/// Gets or sets the name of the user.
/// </summary>
diff --git a/MediaBrowser.Model/Session/TranscodingInfo.cs b/MediaBrowser.Model/Session/TranscodingInfo.cs
index 8f4e688f0..e832c2f6f 100644
--- a/MediaBrowser.Model/Session/TranscodingInfo.cs
+++ b/MediaBrowser.Model/Session/TranscodingInfo.cs
@@ -1,28 +1,39 @@
+#nullable disable
#pragma warning disable CS1591
+using System;
+
namespace MediaBrowser.Model.Session
{
public class TranscodingInfo
{
public string AudioCodec { get; set; }
+
public string VideoCodec { get; set; }
+
public string Container { get; set; }
+
public bool IsVideoDirect { get; set; }
+
public bool IsAudioDirect { get; set; }
+
public int? Bitrate { get; set; }
public float? Framerate { get; set; }
+
public double? CompletionPercentage { get; set; }
public int? Width { get; set; }
+
public int? Height { get; set; }
+
public int? AudioChannels { get; set; }
public TranscodeReason[] TranscodeReasons { get; set; }
public TranscodingInfo()
{
- TranscodeReasons = new TranscodeReason[] { };
+ TranscodeReasons = Array.Empty<TranscodeReason>();
}
}
diff --git a/MediaBrowser.Model/Session/UserDataChangeInfo.cs b/MediaBrowser.Model/Session/UserDataChangeInfo.cs
index 0872eb4b1..0fd24edcc 100644
--- a/MediaBrowser.Model/Session/UserDataChangeInfo.cs
+++ b/MediaBrowser.Model/Session/UserDataChangeInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
using MediaBrowser.Model.Dto;
namespace MediaBrowser.Model.Session
diff --git a/MediaBrowser.Model/Sync/SyncCategory.cs b/MediaBrowser.Model/Sync/SyncCategory.cs
index 215ac301e..80ad5f56e 100644
--- a/MediaBrowser.Model/Sync/SyncCategory.cs
+++ b/MediaBrowser.Model/Sync/SyncCategory.cs
@@ -5,15 +5,15 @@ namespace MediaBrowser.Model.Sync
public enum SyncCategory
{
/// <summary>
- /// The latest
+ /// The latest.
/// </summary>
Latest = 0,
/// <summary>
- /// The next up
+ /// The next up.
/// </summary>
NextUp = 1,
/// <summary>
- /// The resume
+ /// The resume.
/// </summary>
Resume = 2
}
diff --git a/MediaBrowser.Model/Sync/SyncJob.cs b/MediaBrowser.Model/Sync/SyncJob.cs
index 30bf27f38..b9290b6e8 100644
--- a/MediaBrowser.Model/Sync/SyncJob.cs
+++ b/MediaBrowser.Model/Sync/SyncJob.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -121,7 +122,9 @@ namespace MediaBrowser.Model.Sync
public int ItemCount { get; set; }
public string ParentName { get; set; }
+
public string PrimaryImageItemId { get; set; }
+
public string PrimaryImageTag { get; set; }
public SyncJob()
diff --git a/MediaBrowser.Model/Sync/SyncTarget.cs b/MediaBrowser.Model/Sync/SyncTarget.cs
index 20a0c8cc7..9e6bbbc00 100644
--- a/MediaBrowser.Model/Sync/SyncTarget.cs
+++ b/MediaBrowser.Model/Sync/SyncTarget.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.Sync
diff --git a/MediaBrowser.Model/SyncPlay/GroupInfoView.cs b/MediaBrowser.Model/SyncPlay/GroupInfoView.cs
new file mode 100644
index 000000000..f4c685998
--- /dev/null
+++ b/MediaBrowser.Model/SyncPlay/GroupInfoView.cs
@@ -0,0 +1,42 @@
+#nullable disable
+
+using System.Collections.Generic;
+
+namespace MediaBrowser.Model.SyncPlay
+{
+ /// <summary>
+ /// Class GroupInfoView.
+ /// </summary>
+ public class GroupInfoView
+ {
+ /// <summary>
+ /// Gets or sets the group identifier.
+ /// </summary>
+ /// <value>The group identifier.</value>
+ public string GroupId { get; set; }
+
+ /// <summary>
+ /// Gets or sets the playing item id.
+ /// </summary>
+ /// <value>The playing item id.</value>
+ public string PlayingItemId { get; set; }
+
+ /// <summary>
+ /// Gets or sets the playing item name.
+ /// </summary>
+ /// <value>The playing item name.</value>
+ public string PlayingItemName { get; set; }
+
+ /// <summary>
+ /// Gets or sets the position ticks.
+ /// </summary>
+ /// <value>The position ticks.</value>
+ public long PositionTicks { get; set; }
+
+ /// <summary>
+ /// Gets or sets the participants.
+ /// </summary>
+ /// <value>The participants.</value>
+ public IReadOnlyList<string> Participants { get; set; }
+ }
+}
diff --git a/MediaBrowser.Model/SyncPlay/GroupUpdate.cs b/MediaBrowser.Model/SyncPlay/GroupUpdate.cs
new file mode 100644
index 000000000..8c7208211
--- /dev/null
+++ b/MediaBrowser.Model/SyncPlay/GroupUpdate.cs
@@ -0,0 +1,28 @@
+#nullable disable
+
+namespace MediaBrowser.Model.SyncPlay
+{
+ /// <summary>
+ /// Class GroupUpdate.
+ /// </summary>
+ public class GroupUpdate<T>
+ {
+ /// <summary>
+ /// Gets or sets the group identifier.
+ /// </summary>
+ /// <value>The group identifier.</value>
+ public string GroupId { get; set; }
+
+ /// <summary>
+ /// Gets or sets the update type.
+ /// </summary>
+ /// <value>The update type.</value>
+ public GroupUpdateType Type { get; set; }
+
+ /// <summary>
+ /// Gets or sets the data.
+ /// </summary>
+ /// <value>The data.</value>
+ public T Data { get; set; }
+ }
+}
diff --git a/MediaBrowser.Model/SyncPlay/GroupUpdateType.cs b/MediaBrowser.Model/SyncPlay/GroupUpdateType.cs
new file mode 100644
index 000000000..c749f7b13
--- /dev/null
+++ b/MediaBrowser.Model/SyncPlay/GroupUpdateType.cs
@@ -0,0 +1,63 @@
+namespace MediaBrowser.Model.SyncPlay
+{
+ /// <summary>
+ /// Enum GroupUpdateType.
+ /// </summary>
+ public enum GroupUpdateType
+ {
+ /// <summary>
+ /// The user-joined update. Tells members of a group about a new user.
+ /// </summary>
+ UserJoined,
+
+ /// <summary>
+ /// The user-left update. Tells members of a group that a user left.
+ /// </summary>
+ UserLeft,
+
+ /// <summary>
+ /// The group-joined update. Tells a user that the group has been joined.
+ /// </summary>
+ GroupJoined,
+
+ /// <summary>
+ /// The group-left update. Tells a user that the group has been left.
+ /// </summary>
+ GroupLeft,
+
+ /// <summary>
+ /// The group-wait update. Tells members of the group that a user is buffering.
+ /// </summary>
+ GroupWait,
+
+ /// <summary>
+ /// The prepare-session update. Tells a user to load some content.
+ /// </summary>
+ PrepareSession,
+
+ /// <summary>
+ /// The not-in-group error. Tells a user that they don't belong to a group.
+ /// </summary>
+ NotInGroup,
+
+ /// <summary>
+ /// The group-does-not-exist error. Sent when trying to join a non-existing group.
+ /// </summary>
+ GroupDoesNotExist,
+
+ /// <summary>
+ /// The create-group-denied error. Sent when a user tries to create a group without required permissions.
+ /// </summary>
+ CreateGroupDenied,
+
+ /// <summary>
+ /// The join-group-denied error. Sent when a user tries to join a group without required permissions.
+ /// </summary>
+ JoinGroupDenied,
+
+ /// <summary>
+ /// The library-access-denied error. Sent when a user tries to join a group without required access to the library.
+ /// </summary>
+ LibraryAccessDenied
+ }
+}
diff --git a/MediaBrowser.Model/SyncPlay/JoinGroupRequest.cs b/MediaBrowser.Model/SyncPlay/JoinGroupRequest.cs
new file mode 100644
index 000000000..d67b6bd55
--- /dev/null
+++ b/MediaBrowser.Model/SyncPlay/JoinGroupRequest.cs
@@ -0,0 +1,22 @@
+using System;
+
+namespace MediaBrowser.Model.SyncPlay
+{
+ /// <summary>
+ /// Class JoinGroupRequest.
+ /// </summary>
+ public class JoinGroupRequest
+ {
+ /// <summary>
+ /// Gets or sets the Group id.
+ /// </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/PlaybackRequest.cs b/MediaBrowser.Model/SyncPlay/PlaybackRequest.cs
new file mode 100644
index 000000000..9de23194e
--- /dev/null
+++ b/MediaBrowser.Model/SyncPlay/PlaybackRequest.cs
@@ -0,0 +1,34 @@
+using System;
+
+namespace MediaBrowser.Model.SyncPlay
+{
+ /// <summary>
+ /// Class PlaybackRequest.
+ /// </summary>
+ public class PlaybackRequest
+ {
+ /// <summary>
+ /// Gets or sets the request type.
+ /// </summary>
+ /// <value>The request type.</value>
+ public PlaybackRequestType Type { get; set; }
+
+ /// <summary>
+ /// Gets or sets when the request has been made by the client.
+ /// </summary>
+ /// <value>The date of the request.</value>
+ public DateTime? When { get; set; }
+
+ /// <summary>
+ /// Gets or sets the position ticks.
+ /// </summary>
+ /// <value>The position ticks.</value>
+ public long? PositionTicks { get; set; }
+
+ /// <summary>
+ /// Gets or sets the ping time.
+ /// </summary>
+ /// <value>The ping time.</value>
+ public long? Ping { get; set; }
+ }
+}
diff --git a/MediaBrowser.Model/SyncPlay/PlaybackRequestType.cs b/MediaBrowser.Model/SyncPlay/PlaybackRequestType.cs
new file mode 100644
index 000000000..671f4e01f
--- /dev/null
+++ b/MediaBrowser.Model/SyncPlay/PlaybackRequestType.cs
@@ -0,0 +1,38 @@
+namespace MediaBrowser.Model.SyncPlay
+{
+ /// <summary>
+ /// Enum PlaybackRequestType.
+ /// </summary>
+ public enum PlaybackRequestType
+ {
+ /// <summary>
+ /// A user is requesting a play command for the group.
+ /// </summary>
+ Play = 0,
+
+ /// <summary>
+ /// A user is requesting a pause command for the group.
+ /// </summary>
+ Pause = 1,
+
+ /// <summary>
+ /// A user is requesting a seek command for the group.
+ /// </summary>
+ Seek = 2,
+
+ /// <summary>
+ /// A user is signaling that playback is buffering.
+ /// </summary>
+ Buffering = 3,
+
+ /// <summary>
+ /// A user is signaling that playback resumed.
+ /// </summary>
+ BufferingDone = 4,
+
+ /// <summary>
+ /// A user is reporting its ping.
+ /// </summary>
+ UpdatePing = 5
+ }
+}
diff --git a/MediaBrowser.Model/SyncPlay/SendCommand.cs b/MediaBrowser.Model/SyncPlay/SendCommand.cs
new file mode 100644
index 000000000..0f0be0152
--- /dev/null
+++ b/MediaBrowser.Model/SyncPlay/SendCommand.cs
@@ -0,0 +1,40 @@
+#nullable disable
+
+namespace MediaBrowser.Model.SyncPlay
+{
+ /// <summary>
+ /// Class SendCommand.
+ /// </summary>
+ public class SendCommand
+ {
+ /// <summary>
+ /// Gets or sets the group identifier.
+ /// </summary>
+ /// <value>The group identifier.</value>
+ public string GroupId { get; set; }
+
+ /// <summary>
+ /// Gets or sets the UTC time when to execute the command.
+ /// </summary>
+ /// <value>The UTC time when to execute the command.</value>
+ public string When { get; set; }
+
+ /// <summary>
+ /// Gets or sets the position ticks.
+ /// </summary>
+ /// <value>The position ticks.</value>
+ public long? PositionTicks { get; set; }
+
+ /// <summary>
+ /// Gets or sets the command.
+ /// </summary>
+ /// <value>The command.</value>
+ public SendCommandType Command { get; set; }
+
+ /// <summary>
+ /// Gets or sets the UTC time when this command has been emitted.
+ /// </summary>
+ /// <value>The UTC time when this command has been emitted.</value>
+ public string EmittedAt { get; set; }
+ }
+}
diff --git a/MediaBrowser.Model/SyncPlay/SendCommandType.cs b/MediaBrowser.Model/SyncPlay/SendCommandType.cs
new file mode 100644
index 000000000..86dec9e90
--- /dev/null
+++ b/MediaBrowser.Model/SyncPlay/SendCommandType.cs
@@ -0,0 +1,23 @@
+namespace MediaBrowser.Model.SyncPlay
+{
+ /// <summary>
+ /// Enum SendCommandType.
+ /// </summary>
+ public enum SendCommandType
+ {
+ /// <summary>
+ /// The play command. Instructs users to start playback.
+ /// </summary>
+ Play = 0,
+
+ /// <summary>
+ /// The pause command. Instructs users to pause playback.
+ /// </summary>
+ Pause = 1,
+
+ /// <summary>
+ /// The seek command. Instructs users to seek to a specified time.
+ /// </summary>
+ Seek = 2
+ }
+}
diff --git a/MediaBrowser.Model/SyncPlay/UtcTimeResponse.cs b/MediaBrowser.Model/SyncPlay/UtcTimeResponse.cs
new file mode 100644
index 000000000..8ec5eaab3
--- /dev/null
+++ b/MediaBrowser.Model/SyncPlay/UtcTimeResponse.cs
@@ -0,0 +1,22 @@
+#nullable disable
+
+namespace MediaBrowser.Model.SyncPlay
+{
+ /// <summary>
+ /// Class UtcTimeResponse.
+ /// </summary>
+ public class UtcTimeResponse
+ {
+ /// <summary>
+ /// Gets or sets the UTC time when request has been received.
+ /// </summary>
+ /// <value>The UTC time when request has been received.</value>
+ public string RequestReceptionTime { get; set; }
+
+ /// <summary>
+ /// Gets or sets the UTC time when response has been sent.
+ /// </summary>
+ /// <value>The UTC time when response has been sent.</value>
+ public string ResponseTransmissionTime { get; set; }
+ }
+}
diff --git a/MediaBrowser.Model/System/LogFile.cs b/MediaBrowser.Model/System/LogFile.cs
index a2b701664..aec910c92 100644
--- a/MediaBrowser.Model/System/LogFile.cs
+++ b/MediaBrowser.Model/System/LogFile.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
diff --git a/MediaBrowser.Model/System/PublicSystemInfo.cs b/MediaBrowser.Model/System/PublicSystemInfo.cs
index 1775470b5..b6196a43f 100644
--- a/MediaBrowser.Model/System/PublicSystemInfo.cs
+++ b/MediaBrowser.Model/System/PublicSystemInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.System
diff --git a/MediaBrowser.Model/System/SystemInfo.cs b/MediaBrowser.Model/System/SystemInfo.cs
index f2c5aa1e3..18ca74ee3 100644
--- a/MediaBrowser.Model/System/SystemInfo.cs
+++ b/MediaBrowser.Model/System/SystemInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -22,7 +23,7 @@ namespace MediaBrowser.Model.System
};
/// <summary>
- /// Class SystemInfo
+ /// Class SystemInfo.
/// </summary>
public class SystemInfo : PublicSystemInfo
{
@@ -32,7 +33,6 @@ namespace MediaBrowser.Model.System
/// <value>The display name of the operating system.</value>
public string OperatingSystemDisplayName { get; set; }
-
/// <summary>
/// Get or sets the package name.
/// </summary>
diff --git a/MediaBrowser.Model/System/WakeOnLanInfo.cs b/MediaBrowser.Model/System/WakeOnLanInfo.cs
index 534ad19ec..b2cbe737d 100644
--- a/MediaBrowser.Model/System/WakeOnLanInfo.cs
+++ b/MediaBrowser.Model/System/WakeOnLanInfo.cs
@@ -8,35 +8,20 @@ namespace MediaBrowser.Model.System
public class WakeOnLanInfo
{
/// <summary>
- /// Returns the MAC address of the device.
- /// </summary>
- /// <value>The MAC address.</value>
- public string MacAddress { get; set; }
-
- /// <summary>
- /// Returns the wake-on-LAN port.
- /// </summary>
- /// <value>The wake-on-LAN port.</value>
- public int Port { get; set; }
-
- /// <summary>
/// Initializes a new instance of the <see cref="WakeOnLanInfo" /> class.
/// </summary>
/// <param name="macAddress">The MAC address.</param>
- public WakeOnLanInfo(PhysicalAddress macAddress)
+ public WakeOnLanInfo(PhysicalAddress macAddress) : this(macAddress.ToString())
{
- MacAddress = macAddress.ToString();
- Port = 9;
}
/// <summary>
/// Initializes a new instance of the <see cref="WakeOnLanInfo" /> class.
/// </summary>
/// <param name="macAddress">The MAC address.</param>
- public WakeOnLanInfo(string macAddress)
+ public WakeOnLanInfo(string macAddress) : this()
{
MacAddress = macAddress;
- Port = 9;
}
/// <summary>
@@ -46,5 +31,17 @@ namespace MediaBrowser.Model.System
{
Port = 9;
}
+
+ /// <summary>
+ /// Gets the MAC address of the device.
+ /// </summary>
+ /// <value>The MAC address.</value>
+ public string? MacAddress { get; set; }
+
+ /// <summary>
+ /// Gets or sets the wake-on-LAN port.
+ /// </summary>
+ /// <value>The wake-on-LAN port.</value>
+ public int Port { get; set; }
}
}
diff --git a/MediaBrowser.Model/Tasks/IScheduledTask.cs b/MediaBrowser.Model/Tasks/IScheduledTask.cs
index ed160e176..bf87088e4 100644
--- a/MediaBrowser.Model/Tasks/IScheduledTask.cs
+++ b/MediaBrowser.Model/Tasks/IScheduledTask.cs
@@ -1,5 +1,3 @@
-#pragma warning disable CS1591
-
using System;
using System.Collections.Generic;
using System.Threading;
@@ -8,16 +6,19 @@ using System.Threading.Tasks;
namespace MediaBrowser.Model.Tasks
{
/// <summary>
- /// Interface IScheduledTaskWorker
+ /// Interface IScheduledTaskWorker.
/// </summary>
public interface IScheduledTask
{
/// <summary>
- /// Gets the name of the task
+ /// Gets the name of the task.
/// </summary>
/// <value>The name.</value>
string Name { get; }
+ /// <summary>
+ /// Gets the key of the task.
+ /// </summary>
string Key { get; }
/// <summary>
@@ -33,7 +34,7 @@ namespace MediaBrowser.Model.Tasks
string Category { get; }
/// <summary>
- /// Executes the task
+ /// Executes the task.
/// </summary>
/// <param name="cancellationToken">The cancellation token.</param>
/// <param name="progress">The progress.</param>
diff --git a/MediaBrowser.Model/Tasks/IScheduledTaskWorker.cs b/MediaBrowser.Model/Tasks/IScheduledTaskWorker.cs
index 4dd1bb5d0..b08acba2c 100644
--- a/MediaBrowser.Model/Tasks/IScheduledTaskWorker.cs
+++ b/MediaBrowser.Model/Tasks/IScheduledTaskWorker.cs
@@ -1,3 +1,4 @@
+#nullable disable
using System;
using MediaBrowser.Model.Events;
@@ -56,7 +57,7 @@ namespace MediaBrowser.Model.Tasks
double? CurrentProgress { get; }
/// <summary>
- /// Gets the triggers that define when the task will run
+ /// Gets the triggers that define when the task will run.
/// </summary>
/// <value>The triggers.</value>
/// <exception cref="ArgumentNullException">value</exception>
diff --git a/MediaBrowser.Model/Tasks/ITaskManager.cs b/MediaBrowser.Model/Tasks/ITaskManager.cs
index 4a7f579ec..363773ff7 100644
--- a/MediaBrowser.Model/Tasks/ITaskManager.cs
+++ b/MediaBrowser.Model/Tasks/ITaskManager.cs
@@ -10,7 +10,7 @@ namespace MediaBrowser.Model.Tasks
public interface ITaskManager : IDisposable
{
/// <summary>
- /// Gets the list of Scheduled Tasks
+ /// Gets the list of Scheduled Tasks.
/// </summary>
/// <value>The scheduled tasks.</value>
IScheduledTaskWorker[] ScheduledTasks { get; }
diff --git a/MediaBrowser.Model/Tasks/ScheduledTaskHelpers.cs b/MediaBrowser.Model/Tasks/ScheduledTaskHelpers.cs
index ca0743cca..9063903ae 100644
--- a/MediaBrowser.Model/Tasks/ScheduledTaskHelpers.cs
+++ b/MediaBrowser.Model/Tasks/ScheduledTaskHelpers.cs
@@ -14,9 +14,7 @@ namespace MediaBrowser.Model.Tasks
{
var isHidden = false;
- var configurableTask = task.ScheduledTask as IConfigurableScheduledTask;
-
- if (configurableTask != null)
+ if (task.ScheduledTask is IConfigurableScheduledTask configurableTask)
{
isHidden = configurableTask.IsHidden;
}
diff --git a/MediaBrowser.Model/Tasks/TaskCompletionEventArgs.cs b/MediaBrowser.Model/Tasks/TaskCompletionEventArgs.cs
index cc6c2b62b..48950667e 100644
--- a/MediaBrowser.Model/Tasks/TaskCompletionEventArgs.cs
+++ b/MediaBrowser.Model/Tasks/TaskCompletionEventArgs.cs
@@ -6,8 +6,14 @@ namespace MediaBrowser.Model.Tasks
{
public class TaskCompletionEventArgs : EventArgs
{
- public IScheduledTaskWorker Task { get; set; }
+ public TaskCompletionEventArgs(IScheduledTaskWorker task, TaskResult result)
+ {
+ Task = task;
+ Result = result;
+ }
- public TaskResult Result { get; set; }
+ public IScheduledTaskWorker Task { get; }
+
+ public TaskResult Result { get; }
}
}
diff --git a/MediaBrowser.Model/Tasks/TaskInfo.cs b/MediaBrowser.Model/Tasks/TaskInfo.cs
index 5144c035a..77100dfe7 100644
--- a/MediaBrowser.Model/Tasks/TaskInfo.cs
+++ b/MediaBrowser.Model/Tasks/TaskInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
using System;
namespace MediaBrowser.Model.Tasks
diff --git a/MediaBrowser.Model/Tasks/TaskResult.cs b/MediaBrowser.Model/Tasks/TaskResult.cs
index c6f92e7ed..31001aeb2 100644
--- a/MediaBrowser.Model/Tasks/TaskResult.cs
+++ b/MediaBrowser.Model/Tasks/TaskResult.cs
@@ -1,3 +1,4 @@
+#nullable disable
using System;
namespace MediaBrowser.Model.Tasks
diff --git a/MediaBrowser.Model/Tasks/TaskTriggerInfo.cs b/MediaBrowser.Model/Tasks/TaskTriggerInfo.cs
index 699e0ea3a..5aeaffc2b 100644
--- a/MediaBrowser.Model/Tasks/TaskTriggerInfo.cs
+++ b/MediaBrowser.Model/Tasks/TaskTriggerInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
diff --git a/MediaBrowser.Model/Updates/InstallationInfo.cs b/MediaBrowser.Model/Updates/InstallationInfo.cs
index e0d450d06..a6d80dba6 100644
--- a/MediaBrowser.Model/Updates/InstallationInfo.cs
+++ b/MediaBrowser.Model/Updates/InstallationInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
using System;
namespace MediaBrowser.Model.Updates
@@ -11,7 +12,7 @@ namespace MediaBrowser.Model.Updates
/// Gets or sets the guid.
/// </summary>
/// <value>The guid.</value>
- public string Guid { get; set; }
+ public Guid Guid { get; set; }
/// <summary>
/// Gets or sets the name.
@@ -23,6 +24,24 @@ namespace MediaBrowser.Model.Updates
/// Gets or sets the version.
/// </summary>
/// <value>The version.</value>
- public string Version { get; set; }
+ public Version Version { get; set; }
+
+ /// <summary>
+ /// Gets or sets the changelog for this version.
+ /// </summary>
+ /// <value>The changelog.</value>
+ public string Changelog { get; set; }
+
+ /// <summary>
+ /// Gets or sets the source URL.
+ /// </summary>
+ /// <value>The source URL.</value>
+ public string SourceUrl { get; set; }
+
+ /// <summary>
+ /// Gets or sets a checksum for the binary.
+ /// </summary>
+ /// <value>The checksum.</value>
+ public string Checksum { get; set; }
}
}
diff --git a/MediaBrowser.Model/Updates/PackageInfo.cs b/MediaBrowser.Model/Updates/PackageInfo.cs
index f5aa8b6fa..d9eb1386e 100644
--- a/MediaBrowser.Model/Updates/PackageInfo.cs
+++ b/MediaBrowser.Model/Updates/PackageInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
using System;
using System.Collections.Generic;
diff --git a/MediaBrowser.Model/Updates/RepositoryInfo.cs b/MediaBrowser.Model/Updates/RepositoryInfo.cs
new file mode 100644
index 000000000..bd42e77f0
--- /dev/null
+++ b/MediaBrowser.Model/Updates/RepositoryInfo.cs
@@ -0,0 +1,20 @@
+namespace MediaBrowser.Model.Updates
+{
+ /// <summary>
+ /// Class RepositoryInfo.
+ /// </summary>
+ public class RepositoryInfo
+ {
+ /// <summary>
+ /// Gets or sets the name.
+ /// </summary>
+ /// <value>The name.</value>
+ public string? Name { get; set; }
+
+ /// <summary>
+ /// Gets or sets the URL.
+ /// </summary>
+ /// <value>The URL.</value>
+ public string? Url { get; set; }
+ }
+}
diff --git a/MediaBrowser.Model/Updates/VersionInfo.cs b/MediaBrowser.Model/Updates/VersionInfo.cs
index fe5826ad2..a4aa0e75f 100644
--- a/MediaBrowser.Model/Updates/VersionInfo.cs
+++ b/MediaBrowser.Model/Updates/VersionInfo.cs
@@ -1,3 +1,5 @@
+#nullable disable
+
using System;
namespace MediaBrowser.Model.Updates
@@ -8,22 +10,10 @@ namespace MediaBrowser.Model.Updates
public class VersionInfo
{
/// <summary>
- /// Gets or sets the name.
- /// </summary>
- /// <value>The name.</value>
- public string name { get; set; }
-
- /// <summary>
- /// Gets or sets the guid.
- /// </summary>
- /// <value>The guid.</value>
- public string guid { get; set; }
-
- /// <summary>
/// Gets or sets the version.
/// </summary>
/// <value>The version.</value>
- public Version version { get; set; }
+ public string version { get; set; }
/// <summary>
/// Gets or sets the changelog for this version.
@@ -50,9 +40,9 @@ namespace MediaBrowser.Model.Updates
public string checksum { get; set; }
/// <summary>
- /// Gets or sets the target filename for the downloaded binary.
+ /// Gets or sets a timestamp of when the binary was built.
/// </summary>
- /// <value>The target filename.</value>
- public string filename { get; set; }
+ /// <value>The timestamp.</value>
+ public string timestamp { get; set; }
}
}
diff --git a/MediaBrowser.Model/Users/ForgotPasswordResult.cs b/MediaBrowser.Model/Users/ForgotPasswordResult.cs
index 368c642e8..6bb13d4c9 100644
--- a/MediaBrowser.Model/Users/ForgotPasswordResult.cs
+++ b/MediaBrowser.Model/Users/ForgotPasswordResult.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
diff --git a/MediaBrowser.Model/Users/PinRedeemResult.cs b/MediaBrowser.Model/Users/PinRedeemResult.cs
index ab868cad4..7e4553bac 100644
--- a/MediaBrowser.Model/Users/PinRedeemResult.cs
+++ b/MediaBrowser.Model/Users/PinRedeemResult.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.Users
diff --git a/MediaBrowser.Model/Users/UserAction.cs b/MediaBrowser.Model/Users/UserAction.cs
index f6bb6451b..7646db4a8 100644
--- a/MediaBrowser.Model/Users/UserAction.cs
+++ b/MediaBrowser.Model/Users/UserAction.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -7,11 +8,17 @@ namespace MediaBrowser.Model.Users
public class UserAction
{
public string Id { get; set; }
+
public string ServerId { get; set; }
+
public Guid UserId { get; set; }
+
public Guid ItemId { get; set; }
+
public UserActionType Type { get; set; }
+
public DateTime Date { get; set; }
+
public long? PositionTicks { get; set; }
}
}
diff --git a/MediaBrowser.Model/Users/UserPolicy.cs b/MediaBrowser.Model/Users/UserPolicy.cs
index ae2b3fd4e..caf2e0f54 100644
--- a/MediaBrowser.Model/Users/UserPolicy.cs
+++ b/MediaBrowser.Model/Users/UserPolicy.cs
@@ -1,7 +1,10 @@
+#nullable disable
#pragma warning disable CS1591
using System;
-using MediaBrowser.Model.Configuration;
+using System.Xml.Serialization;
+using Jellyfin.Data.Enums;
+using AccessSchedule = Jellyfin.Data.Entities.AccessSchedule;
namespace MediaBrowser.Model.Users
{
@@ -32,24 +35,37 @@ namespace MediaBrowser.Model.Users
public int? MaxParentalRating { get; set; }
public string[] BlockedTags { get; set; }
+
public bool EnableUserPreferenceAccess { get; set; }
+
public AccessSchedule[] AccessSchedules { get; set; }
+
public UnratedItem[] BlockUnratedItems { get; set; }
+
public bool EnableRemoteControlOfOtherUsers { get; set; }
+
public bool EnableSharedDeviceControl { get; set; }
+
public bool EnableRemoteAccess { get; set; }
public bool EnableLiveTvManagement { get; set; }
+
public bool EnableLiveTvAccess { get; set; }
public bool EnableMediaPlayback { get; set; }
+
public bool EnableAudioPlaybackTranscoding { get; set; }
+
public bool EnableVideoPlaybackTranscoding { get; set; }
+
public bool EnablePlaybackRemuxing { get; set; }
+
public bool ForceRemoteSourceTranscoding { get; set; }
public bool EnableContentDeletion { get; set; }
+
public string[] EnableContentDeletionFromFolders { get; set; }
+
public bool EnableContentDownloading { get; set; }
/// <summary>
@@ -57,29 +73,44 @@ namespace MediaBrowser.Model.Users
/// </summary>
/// <value><c>true</c> if [enable synchronize]; otherwise, <c>false</c>.</value>
public bool EnableSyncTranscoding { get; set; }
+
public bool EnableMediaConversion { get; set; }
public string[] EnabledDevices { get; set; }
+
public bool EnableAllDevices { get; set; }
public string[] EnabledChannels { get; set; }
+
public bool EnableAllChannels { get; set; }
public string[] EnabledFolders { get; set; }
+
public bool EnableAllFolders { get; set; }
public int InvalidLoginAttemptCount { get; set; }
+
public int LoginAttemptsBeforeLockout { get; set; }
public bool EnablePublicSharing { get; set; }
public string[] BlockedMediaFolders { get; set; }
+
public string[] BlockedChannels { get; set; }
public int RemoteClientBitrateLimit { get; set; }
+
+ [XmlElement(ElementName = "AuthenticationProviderId")]
public string AuthenticationProviderId { get; set; }
+
public string PasswordResetProviderId { get; set; }
+ /// <summary>
+ /// Gets or sets a value indicating what SyncPlay features the user can access.
+ /// </summary>
+ /// <value>Access level to SyncPlay features.</value>
+ public SyncPlayAccess SyncPlayAccess { get; set; }
+
public UserPolicy()
{
IsHidden = true;
@@ -125,6 +156,7 @@ namespace MediaBrowser.Model.Users
EnableContentDownloading = true;
EnablePublicSharing = true;
EnableRemoteAccess = true;
+ SyncPlayAccess = SyncPlayAccess.CreateAndJoinGroups;
}
}
}