aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model
diff options
context:
space:
mode:
authordkanada <dkanada@users.noreply.github.com>2020-06-04 03:20:48 +0900
committerGitHub <noreply@github.com>2020-06-04 03:20:48 +0900
commitfe16c3fad4b3ea2cab0ec4a4008e31be626b5eee (patch)
tree3cd2fd175c174030e0f72335fea3c1582ac44f56 /MediaBrowser.Model
parent7176a9a30a7c9c925e04529f3ba7feac022f9248 (diff)
parentf0d182b8fe2a2ff2c893c3973b99cda85c30ca70 (diff)
Merge branch 'master' into install-plugin
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.cs1
-rw-r--r--MediaBrowser.Model/Channels/ChannelInfo.cs1
-rw-r--r--MediaBrowser.Model/Channels/ChannelQuery.cs6
-rw-r--r--MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs1
-rw-r--r--MediaBrowser.Model/Configuration/EncodingOptions.cs13
-rw-r--r--MediaBrowser.Model/Configuration/LibraryOptions.cs1
-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/ServerConfiguration.cs1
-rw-r--r--MediaBrowser.Model/Configuration/SyncplayAccess.cs23
-rw-r--r--MediaBrowser.Model/Configuration/UserConfiguration.cs1
-rw-r--r--MediaBrowser.Model/Configuration/XbmcMetadataOptions.cs1
-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.cs6
-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.cs6
-rw-r--r--MediaBrowser.Model/Dlna/DeviceIdentification.cs1
-rw-r--r--MediaBrowser.Model/Dlna/DeviceProfile.cs1
-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.cs24
-rw-r--r--MediaBrowser.Model/Dlna/ProfileCondition.cs25
-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/StreamBuilder.cs2
-rw-r--r--MediaBrowser.Model/Dlna/StreamInfo.cs1
-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.cs8
-rw-r--r--MediaBrowser.Model/Dto/BaseItemPerson.cs1
-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.cs17
-rw-r--r--MediaBrowser.Model/Dto/ItemIndex.cs20
-rw-r--r--MediaBrowser.Model/Dto/MediaSourceInfo.cs1
-rw-r--r--MediaBrowser.Model/Dto/MetadataEditorInfo.cs1
-rw-r--r--MediaBrowser.Model/Dto/NameIdPair.cs1
-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.cs1
-rw-r--r--MediaBrowser.Model/Entities/IHasProviderIds.cs2
-rw-r--r--MediaBrowser.Model/Entities/LibraryUpdateInfo.cs29
-rw-r--r--MediaBrowser.Model/Entities/MediaAttachment.cs1
-rw-r--r--MediaBrowser.Model/Entities/MediaStream.cs1
-rw-r--r--MediaBrowser.Model/Entities/MediaUrl.cs1
-rw-r--r--MediaBrowser.Model/Entities/PackageReviewInfo.cs13
-rw-r--r--MediaBrowser.Model/Entities/ParentalRating.cs24
-rw-r--r--MediaBrowser.Model/Entities/ProviderIdsExtensions.cs4
-rw-r--r--MediaBrowser.Model/Entities/VirtualFolderInfo.cs1
-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/Library/UserViewQuery.cs12
-rw-r--r--MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs1
-rw-r--r--MediaBrowser.Model/LiveTv/GuideInfo.cs1
-rw-r--r--MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs1
-rw-r--r--MediaBrowser.Model/LiveTv/LiveTvInfo.cs12
-rw-r--r--MediaBrowser.Model/LiveTv/LiveTvOptions.cs1
-rw-r--r--MediaBrowser.Model/LiveTv/LiveTvServiceInfo.cs1
-rw-r--r--MediaBrowser.Model/LiveTv/RecordingQuery.cs1
-rw-r--r--MediaBrowser.Model/LiveTv/SeriesTimerInfoDto.cs1
-rw-r--r--MediaBrowser.Model/LiveTv/SeriesTimerQuery.cs2
-rw-r--r--MediaBrowser.Model/LiveTv/TimerInfoDto.cs1
-rw-r--r--MediaBrowser.Model/LiveTv/TimerQuery.cs1
-rw-r--r--MediaBrowser.Model/MediaBrowser.Model.csproj2
-rw-r--r--MediaBrowser.Model/MediaInfo/AudioCodec.cs4
-rw-r--r--MediaBrowser.Model/MediaInfo/BlurayDiscInfo.cs1
-rw-r--r--MediaBrowser.Model/MediaInfo/LiveStreamRequest.cs34
-rw-r--r--MediaBrowser.Model/MediaInfo/LiveStreamResponse.cs7
-rw-r--r--MediaBrowser.Model/MediaInfo/MediaInfo.cs1
-rw-r--r--MediaBrowser.Model/MediaInfo/PlaybackInfoRequest.cs1
-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/ISocket.cs1
-rw-r--r--MediaBrowser.Model/Net/MimeTypes.cs18
-rw-r--r--MediaBrowser.Model/Net/NetworkShare.cs1
-rw-r--r--MediaBrowser.Model/Net/SocketReceiveResult.cs10
-rw-r--r--MediaBrowser.Model/Net/WebSocketMessage.cs2
-rw-r--r--MediaBrowser.Model/Notifications/NotificationOption.cs16
-rw-r--r--MediaBrowser.Model/Notifications/NotificationOptions.cs31
-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.cs1
-rw-r--r--MediaBrowser.Model/Plugins/PluginPageInfo.cs1
-rw-r--r--MediaBrowser.Model/Providers/ExternalIdInfo.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.cs20
-rw-r--r--MediaBrowser.Model/Providers/RemoteSubtitleInfo.cs1
-rw-r--r--MediaBrowser.Model/Providers/SubtitleOptions.cs1
-rw-r--r--MediaBrowser.Model/Providers/SubtitleProviderInfo.cs1
-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/ItemSortBy.cs54
-rw-r--r--MediaBrowser.Model/Querying/LatestItemsQuery.cs20
-rw-r--r--MediaBrowser.Model/Querying/MovieRecommendationQuery.cs1
-rw-r--r--MediaBrowser.Model/Querying/NextUpQuery.cs1
-rw-r--r--MediaBrowser.Model/Querying/QueryFilters.cs1
-rw-r--r--MediaBrowser.Model/Querying/QueryResult.cs1
-rw-r--r--MediaBrowser.Model/Querying/ThemeMediaResult.cs2
-rw-r--r--MediaBrowser.Model/Querying/UpcomingEpisodesQuery.cs1
-rw-r--r--MediaBrowser.Model/Search/SearchHint.cs1
-rw-r--r--MediaBrowser.Model/Search/SearchHintResult.cs1
-rw-r--r--MediaBrowser.Model/Search/SearchQuery.cs1
-rw-r--r--MediaBrowser.Model/Serialization/IJsonSerializer.cs1
-rw-r--r--MediaBrowser.Model/Serialization/IXmlSerializer.cs1
-rw-r--r--MediaBrowser.Model/Services/ApiMemberAttribute.cs1
-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.cs1
-rw-r--r--MediaBrowser.Model/Services/QueryParamCollection.cs6
-rw-r--r--MediaBrowser.Model/Services/RouteAttribute.cs1
-rw-r--r--MediaBrowser.Model/Session/BrowseRequest.cs1
-rw-r--r--MediaBrowser.Model/Session/ClientCapabilities.cs1
-rw-r--r--MediaBrowser.Model/Session/GeneralCommand.cs1
-rw-r--r--MediaBrowser.Model/Session/MessageCommand.cs1
-rw-r--r--MediaBrowser.Model/Session/PlayRequest.cs1
-rw-r--r--MediaBrowser.Model/Session/PlaybackProgressInfo.cs1
-rw-r--r--MediaBrowser.Model/Session/PlaybackStopInfo.cs1
-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.cs5
-rw-r--r--MediaBrowser.Model/Session/UserDataChangeInfo.cs1
-rw-r--r--MediaBrowser.Model/Sync/SyncJob.cs1
-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.cs53
-rw-r--r--MediaBrowser.Model/SyncPlay/JoinGroupRequest.cs22
-rw-r--r--MediaBrowser.Model/SyncPlay/PlaybackRequest.cs34
-rw-r--r--MediaBrowser.Model/SyncPlay/PlaybackRequestType.cs33
-rw-r--r--MediaBrowser.Model/SyncPlay/SendCommand.cs40
-rw-r--r--MediaBrowser.Model/SyncPlay/SendCommandType.cs21
-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.cs2
-rw-r--r--MediaBrowser.Model/System/WakeOnLanInfo.cs31
-rw-r--r--MediaBrowser.Model/Tasks/IScheduledTask.cs11
-rw-r--r--MediaBrowser.Model/Tasks/IScheduledTaskWorker.cs1
-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.cs1
-rw-r--r--MediaBrowser.Model/Updates/PackageInfo.cs1
-rw-r--r--MediaBrowser.Model/Updates/VersionInfo.cs2
-rw-r--r--MediaBrowser.Model/Users/ForgotPasswordResult.cs1
-rw-r--r--MediaBrowser.Model/Users/PinRedeemResult.cs1
-rw-r--r--MediaBrowser.Model/Users/UserAction.cs1
-rw-r--r--MediaBrowser.Model/Users/UserPolicy.cs8
198 files changed, 898 insertions, 454 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..496102d83 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;
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..d11260039 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;
@@ -13,8 +14,11 @@ namespace MediaBrowser.Model.Channels
/// </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>
@@ -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/BaseApplicationConfiguration.cs b/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs
index cc2541f74..cdd322c94 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;
diff --git a/MediaBrowser.Model/Configuration/EncodingOptions.cs b/MediaBrowser.Model/Configuration/EncodingOptions.cs
index 648568fd7..0c0e01f11 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,19 @@ 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 EnableHardwareEncoding { get; set; }
+
public bool EnableSubtitleExtraction { get; set; }
public string[] HardwareDecodingCodecs { get; set; }
diff --git a/MediaBrowser.Model/Configuration/LibraryOptions.cs b/MediaBrowser.Model/Configuration/LibraryOptions.cs
index 4342ccd8a..4229a4335 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;
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/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
index 1f5981f10..60b1e6eae 100644
--- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs
+++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
diff --git a/MediaBrowser.Model/Configuration/SyncplayAccess.cs b/MediaBrowser.Model/Configuration/SyncplayAccess.cs
new file mode 100644
index 000000000..d891a8167
--- /dev/null
+++ b/MediaBrowser.Model/Configuration/SyncplayAccess.cs
@@ -0,0 +1,23 @@
+namespace MediaBrowser.Model.Configuration
+{
+ /// <summary>
+ /// Enum SyncPlayAccess.
+ /// </summary>
+ public enum SyncPlayAccess
+ {
+ /// <summary>
+ /// User can create groups and join them.
+ /// </summary>
+ CreateAndJoinGroups,
+
+ /// <summary>
+ /// User can only join already existing groups.
+ /// </summary>
+ JoinGroups,
+
+ /// <summary>
+ /// SyncPlay is disabled for the user.
+ /// </summary>
+ None
+ }
+}
diff --git a/MediaBrowser.Model/Configuration/UserConfiguration.cs b/MediaBrowser.Model/Configuration/UserConfiguration.cs
index a475c9910..289047d6b 100644
--- a/MediaBrowser.Model/Configuration/UserConfiguration.cs
+++ b/MediaBrowser.Model/Configuration/UserConfiguration.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
diff --git a/MediaBrowser.Model/Configuration/XbmcMetadataOptions.cs b/MediaBrowser.Model/Configuration/XbmcMetadataOptions.cs
index d6c1295f4..c48a38192 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
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..fc555c5f7 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>
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..b055ad41a 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,
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..6462ffdc1 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;
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..10e9179c0 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,13 +22,13 @@ 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))
@@ -61,18 +62,18 @@ namespace MediaBrowser.Model.Dlna
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,16 +93,18 @@ 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))
@@ -115,6 +118,7 @@ namespace MediaBrowser.Model.Dlna
{
return new MediaFormatProfile[] { MediaFormatProfile.AVC_TS_HD_DTS_ISO };
}
+
return new MediaFormatProfile[] { MediaFormatProfile.AVC_TS_HD_DTS_T };
}
diff --git a/MediaBrowser.Model/Dlna/ProfileCondition.cs b/MediaBrowser.Model/Dlna/ProfileCondition.cs
index 2021038d8..f8b5dee81 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;
@@ -36,5 +25,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/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs
index 58755b171..a18ad36c5 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;
@@ -339,6 +340,7 @@ namespace MediaBrowser.Model.Dlna
{
transcodeReasons.Add(transcodeReason.Value);
}
+
all = false;
break;
}
diff --git a/MediaBrowser.Model/Dlna/StreamInfo.cs b/MediaBrowser.Model/Dlna/StreamInfo.cs
index c9fe679e1..244463803 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;
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..c84c51efb 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;
@@ -511,6 +512,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>
diff --git a/MediaBrowser.Model/Dto/BaseItemPerson.cs b/MediaBrowser.Model/Dto/BaseItemPerson.cs
index 5b7eefd70..b080f3e4a 100644
--- a/MediaBrowser.Model/Dto/BaseItemPerson.cs
+++ b/MediaBrowser.Model/Dto/BaseItemPerson.cs
@@ -1,3 +1,4 @@
+#nullable disable
using System.Text.Json.Serialization;
namespace MediaBrowser.Model.Dto
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..158e622a8 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>
@@ -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..74c2cb4f4 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;
diff --git a/MediaBrowser.Model/Dto/MetadataEditorInfo.cs b/MediaBrowser.Model/Dto/MetadataEditorInfo.cs
index 21d8a31f2..1d840a300 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;
diff --git a/MediaBrowser.Model/Dto/NameIdPair.cs b/MediaBrowser.Model/Dto/NameIdPair.cs
index 1b4800863..efb2c157c 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;
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..0e5db01dd 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
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/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..fa09cc513 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;
diff --git a/MediaBrowser.Model/Entities/MediaUrl.cs b/MediaBrowser.Model/Entities/MediaUrl.cs
index e44143755..74f982437 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
diff --git a/MediaBrowser.Model/Entities/PackageReviewInfo.cs b/MediaBrowser.Model/Entities/PackageReviewInfo.cs
index a034de8ba..1ebbc3323 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,32 +8,32 @@ 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..e089dd1e5 100644
--- a/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs
+++ b/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs
@@ -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, MetadataProviders 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)
{
diff --git a/MediaBrowser.Model/Entities/VirtualFolderInfo.cs b/MediaBrowser.Model/Entities/VirtualFolderInfo.cs
index dd30c9c84..2de02e403 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;
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/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..45970cf6b 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;
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..d1a94d8b3 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;
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..69c43efd4 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;
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..264982930 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;
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..bda46dd2b 100644
--- a/MediaBrowser.Model/LiveTv/SeriesTimerQuery.cs
+++ b/MediaBrowser.Model/LiveTv/SeriesTimerQuery.cs
@@ -10,7 +10,7 @@ namespace MediaBrowser.Model.LiveTv
/// 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..19039d448 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;
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 461f59672..70b5cf3b7 100644
--- a/MediaBrowser.Model/MediaBrowser.Model.csproj
+++ b/MediaBrowser.Model/MediaBrowser.Model.csproj
@@ -17,6 +17,8 @@
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TreatWarningsAsErrors Condition=" '$(Configuration)' == 'Release' ">true</TreatWarningsAsErrors>
+ <Nullable>enable</Nullable>
+ <LangVersion>latest</LangVersion>
</PropertyGroup>
<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..cce508809 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,26 @@ 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..97b979935 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;
diff --git a/MediaBrowser.Model/MediaInfo/PlaybackInfoRequest.cs b/MediaBrowser.Model/MediaInfo/PlaybackInfoRequest.cs
index a2f163422..82e13e0eb 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;
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/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 b6d7b4245..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)
{
@@ -163,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);
@@ -210,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..a40cf73e4 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
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..144949a3b 100644
--- a/MediaBrowser.Model/Notifications/NotificationOption.cs
+++ b/MediaBrowser.Model/Notifications/NotificationOption.cs
@@ -6,6 +6,15 @@ 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>
@@ -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..9e570ef1c 100644
--- a/MediaBrowser.Model/Notifications/NotificationOptions.cs
+++ b/MediaBrowser.Model/Notifications/NotificationOptions.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -14,63 +15,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
}
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..c13f1a89f 100644
--- a/MediaBrowser.Model/Plugins/PluginInfo.cs
+++ b/MediaBrowser.Model/Plugins/PluginInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
namespace MediaBrowser.Model.Plugins
{
/// <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/ExternalIdInfo.cs b/MediaBrowser.Model/Providers/ExternalIdInfo.cs
index 2b481ad7e..f2e6d8ef3 100644
--- a/MediaBrowser.Model/Providers/ExternalIdInfo.cs
+++ b/MediaBrowser.Model/Providers/ExternalIdInfo.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.Providers
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..c96eb0b59 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,13 @@ 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..d9f7a852c 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;
diff --git a/MediaBrowser.Model/Providers/SubtitleOptions.cs b/MediaBrowser.Model/Providers/SubtitleOptions.cs
index 9e6049246..c07379570 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;
diff --git a/MediaBrowser.Model/Providers/SubtitleProviderInfo.cs b/MediaBrowser.Model/Providers/SubtitleProviderInfo.cs
index fca93d176..ee25be4b6 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
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/ItemSortBy.cs b/MediaBrowser.Model/Querying/ItemSortBy.cs
index 15b60ad84..edf71c1a7 100644
--- a/MediaBrowser.Model/Querying/ItemSortBy.cs
+++ b/MediaBrowser.Model/Querying/ItemSortBy.cs
@@ -8,73 +8,99 @@ namespace MediaBrowser.Model.Querying
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..0df86cb22 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;
diff --git a/MediaBrowser.Model/Querying/QueryFilters.cs b/MediaBrowser.Model/Querying/QueryFilters.cs
index 8d879c174..e04208f76 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;
diff --git a/MediaBrowser.Model/Querying/QueryResult.cs b/MediaBrowser.Model/Querying/QueryResult.cs
index 266f1c7e6..42586243d 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;
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..ed1aa7ac6 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;
diff --git a/MediaBrowser.Model/Search/SearchHint.cs b/MediaBrowser.Model/Search/SearchHint.cs
index 6e52314fa..c7a721df6 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;
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..4470f1ad9 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;
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..7c23eee44 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
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..f413f1e17 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;
diff --git a/MediaBrowser.Model/Services/QueryParamCollection.cs b/MediaBrowser.Model/Services/QueryParamCollection.cs
index 19e9e53e7..d07ff1548 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>
diff --git a/MediaBrowser.Model/Services/RouteAttribute.cs b/MediaBrowser.Model/Services/RouteAttribute.cs
index 197ba05e5..162576aa7 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;
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..51db66d21 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;
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..62b68b49e 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;
diff --git a/MediaBrowser.Model/Session/PlaybackProgressInfo.cs b/MediaBrowser.Model/Session/PlaybackProgressInfo.cs
index 5687ba84b..6b4cfe4f0 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;
diff --git a/MediaBrowser.Model/Session/PlaybackStopInfo.cs b/MediaBrowser.Model/Session/PlaybackStopInfo.cs
index f8cfacc20..b0827ac99 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;
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..d6dc83413 100644
--- a/MediaBrowser.Model/Session/TranscodingInfo.cs
+++ b/MediaBrowser.Model/Session/TranscodingInfo.cs
@@ -1,5 +1,8 @@
+#nullable disable
#pragma warning disable CS1591
+using System;
+
namespace MediaBrowser.Model.Session
{
public class TranscodingInfo
@@ -22,7 +25,7 @@ namespace MediaBrowser.Model.Session
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/SyncJob.cs b/MediaBrowser.Model/Sync/SyncJob.cs
index 30bf27f38..3cc9ff726 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;
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..89d245787
--- /dev/null
+++ b/MediaBrowser.Model/SyncPlay/GroupUpdateType.cs
@@ -0,0 +1,53 @@
+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..f1e175fde
--- /dev/null
+++ b/MediaBrowser.Model/SyncPlay/PlaybackRequestType.cs
@@ -0,0 +1,33 @@
+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..113719871
--- /dev/null
+++ b/MediaBrowser.Model/SyncPlay/SendCommandType.cs
@@ -0,0 +1,21 @@
+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..a67c38c3a 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;
@@ -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..c79d7fe75 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;
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 5d31bac3c..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
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/VersionInfo.cs b/MediaBrowser.Model/Updates/VersionInfo.cs
index f12e35dc0..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
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..36b8e6ee5 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;
diff --git a/MediaBrowser.Model/Users/UserPolicy.cs b/MediaBrowser.Model/Users/UserPolicy.cs
index ae2b3fd4e..e6c5cbe66 100644
--- a/MediaBrowser.Model/Users/UserPolicy.cs
+++ b/MediaBrowser.Model/Users/UserPolicy.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -80,6 +81,12 @@ namespace MediaBrowser.Model.Users
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 +132,7 @@ namespace MediaBrowser.Model.Users
EnableContentDownloading = true;
EnablePublicSharing = true;
EnableRemoteAccess = true;
+ SyncPlayAccess = SyncPlayAccess.CreateAndJoinGroups;
}
}
}