aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Models
diff options
context:
space:
mode:
Diffstat (limited to 'Jellyfin.Api/Models')
-rw-r--r--Jellyfin.Api/Models/ConfigurationPageInfo.cs44
-rw-r--r--Jellyfin.Api/Models/LibraryDtos/LibraryOptionsResultDto.cs15
-rw-r--r--Jellyfin.Api/Models/LibraryDtos/LibraryTypeOptionsDto.cs15
-rw-r--r--Jellyfin.Api/Models/LibraryDtos/MediaUpdateInfoDto.cs15
-rw-r--r--Jellyfin.Api/Models/LibraryDtos/MediaUpdateInfoPathDto.cs19
-rw-r--r--Jellyfin.Api/Models/LibraryStructureDto/AddVirtualFolderDto.cs (renamed from Jellyfin.Api/Models/LibraryStructureDto/LibraryOptionsDto.cs)6
-rw-r--r--Jellyfin.Api/Models/LibraryStructureDto/UpdateLibraryOptionsDto.cs21
-rw-r--r--Jellyfin.Api/Models/LibraryStructureDto/UpdateMediaPathRequestDto.cs23
-rw-r--r--Jellyfin.Api/Models/LiveTvDtos/ChannelMappingOptionsDto.cs6
-rw-r--r--Jellyfin.Api/Models/LiveTvDtos/GetProgramsDto.cs27
-rw-r--r--Jellyfin.Api/Models/LiveTvDtos/SetChannelMappingDto.cs28
-rw-r--r--Jellyfin.Api/Models/MediaInfoDtos/OpenLiveStreamDto.cs62
-rw-r--r--Jellyfin.Api/Models/MediaInfoDtos/PlaybackInfoDto.cs86
-rw-r--r--Jellyfin.Api/Models/NotificationDtos/AdminNotificationDto.cs30
-rw-r--r--Jellyfin.Api/Models/PlaybackDtos/TranscodingJobDto.cs32
-rw-r--r--Jellyfin.Api/Models/PlaybackDtos/TranscodingThrottler.cs7
-rw-r--r--Jellyfin.Api/Models/PlaylistDtos/CreatePlaylistDto.cs8
-rw-r--r--Jellyfin.Api/Models/SessionDtos/ClientCapabilitiesDto.cs88
-rw-r--r--Jellyfin.Api/Models/SubtitleDtos/UploadSubtitleDto.cs34
-rw-r--r--Jellyfin.Api/Models/SyncPlayDtos/BufferRequestDto.cs42
-rw-r--r--Jellyfin.Api/Models/SyncPlayDtos/IgnoreWaitRequestDto.cs14
-rw-r--r--Jellyfin.Api/Models/SyncPlayDtos/JoinGroupRequestDto.cs16
-rw-r--r--Jellyfin.Api/Models/SyncPlayDtos/MovePlaylistItemRequestDto.cs30
-rw-r--r--Jellyfin.Api/Models/SyncPlayDtos/NewGroupRequestDto.cs22
-rw-r--r--Jellyfin.Api/Models/SyncPlayDtos/NextItemRequestDto.cs24
-rw-r--r--Jellyfin.Api/Models/SyncPlayDtos/PingRequestDto.cs14
-rw-r--r--Jellyfin.Api/Models/SyncPlayDtos/PlayRequestDto.cs37
-rw-r--r--Jellyfin.Api/Models/SyncPlayDtos/PreviousItemRequestDto.cs24
-rw-r--r--Jellyfin.Api/Models/SyncPlayDtos/QueueRequestDto.cs32
-rw-r--r--Jellyfin.Api/Models/SyncPlayDtos/ReadyRequestDto.cs42
-rw-r--r--Jellyfin.Api/Models/SyncPlayDtos/RemoveFromPlaylistRequestDto.cs25
-rw-r--r--Jellyfin.Api/Models/SyncPlayDtos/SeekRequestDto.cs14
-rw-r--r--Jellyfin.Api/Models/SyncPlayDtos/SetPlaylistItemRequestDto.cs24
-rw-r--r--Jellyfin.Api/Models/SyncPlayDtos/SetRepeatModeRequestDto.cs16
-rw-r--r--Jellyfin.Api/Models/SyncPlayDtos/SetShuffleModeRequestDto.cs16
-rw-r--r--Jellyfin.Api/Models/UserDtos/AuthenticateUserByName.cs5
-rw-r--r--Jellyfin.Api/Models/UserDtos/ForgotPasswordDto.cs16
-rw-r--r--Jellyfin.Api/Models/UserDtos/ForgotPasswordPinDto.cs16
-rw-r--r--Jellyfin.Api/Models/UserDtos/QuickConnectDto.cs16
-rw-r--r--Jellyfin.Api/Models/VideoDtos/DeviceProfileDto.cs15
40 files changed, 927 insertions, 99 deletions
diff --git a/Jellyfin.Api/Models/ConfigurationPageInfo.cs b/Jellyfin.Api/Models/ConfigurationPageInfo.cs
index 2aa6373aa..ec4a0d1a1 100644
--- a/Jellyfin.Api/Models/ConfigurationPageInfo.cs
+++ b/Jellyfin.Api/Models/ConfigurationPageInfo.cs
@@ -1,5 +1,5 @@
-using MediaBrowser.Common.Plugins;
-using MediaBrowser.Controller.Plugins;
+using System;
+using MediaBrowser.Common.Plugins;
using MediaBrowser.Model.Plugins;
namespace Jellyfin.Api.Models
@@ -12,36 +12,24 @@ namespace Jellyfin.Api.Models
/// <summary>
/// Initializes a new instance of the <see cref="ConfigurationPageInfo"/> class.
/// </summary>
- /// <param name="page">Instance of <see cref="IPluginConfigurationPage"/> interface.</param>
- public ConfigurationPageInfo(IPluginConfigurationPage page)
- {
- Name = page.Name;
-
- ConfigurationPageType = page.ConfigurationPageType;
-
- if (page.Plugin != null)
- {
- DisplayName = page.Plugin.Name;
- // Don't use "N" because it needs to match Plugin.Id
- PluginId = page.Plugin.Id.ToString();
- }
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="ConfigurationPageInfo"/> class.
- /// </summary>
/// <param name="plugin">Instance of <see cref="IPlugin"/> interface.</param>
/// <param name="page">Instance of <see cref="PluginPageInfo"/> interface.</param>
- public ConfigurationPageInfo(IPlugin plugin, PluginPageInfo page)
+ public ConfigurationPageInfo(IPlugin? plugin, PluginPageInfo page)
{
Name = page.Name;
EnableInMainMenu = page.EnableInMainMenu;
MenuSection = page.MenuSection;
MenuIcon = page.MenuIcon;
- DisplayName = string.IsNullOrWhiteSpace(page.DisplayName) ? plugin.Name : page.DisplayName;
+ DisplayName = string.IsNullOrWhiteSpace(page.DisplayName) ? plugin?.Name : page.DisplayName;
+ PluginId = plugin?.Id;
+ }
- // Don't use "N" because it needs to match Plugin.Id
- PluginId = plugin.Id.ToString();
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ConfigurationPageInfo"/> class.
+ /// </summary>
+ public ConfigurationPageInfo()
+ {
+ Name = string.Empty;
}
/// <summary>
@@ -71,15 +59,9 @@ namespace Jellyfin.Api.Models
public string? DisplayName { get; set; }
/// <summary>
- /// Gets or sets the type of the configuration page.
- /// </summary>
- /// <value>The type of the configuration page.</value>
- public ConfigurationPageType ConfigurationPageType { get; set; }
-
- /// <summary>
/// Gets or sets the plugin id.
/// </summary>
/// <value>The plugin id.</value>
- public string? PluginId { get; set; }
+ public Guid? PluginId { get; set; }
}
}
diff --git a/Jellyfin.Api/Models/LibraryDtos/LibraryOptionsResultDto.cs b/Jellyfin.Api/Models/LibraryDtos/LibraryOptionsResultDto.cs
index 33eda33cb..7de44aa65 100644
--- a/Jellyfin.Api/Models/LibraryDtos/LibraryOptionsResultDto.cs
+++ b/Jellyfin.Api/Models/LibraryDtos/LibraryOptionsResultDto.cs
@@ -1,4 +1,5 @@
-using System.Diagnostics.CodeAnalysis;
+using System;
+using System.Collections.Generic;
namespace Jellyfin.Api.Models.LibraryDtos
{
@@ -10,25 +11,21 @@ namespace Jellyfin.Api.Models.LibraryDtos
/// <summary>
/// Gets or sets the metadata savers.
/// </summary>
- [SuppressMessage("Microsoft.Performance", "CA1819:ReturnArrays", MessageId = "MetadataSavers", Justification = "Imported from ServiceStack")]
- public LibraryOptionInfoDto[] MetadataSavers { get; set; } = null!;
+ public IReadOnlyList<LibraryOptionInfoDto> MetadataSavers { get; set; } = Array.Empty<LibraryOptionInfoDto>();
/// <summary>
/// Gets or sets the metadata readers.
/// </summary>
- [SuppressMessage("Microsoft.Performance", "CA1819:ReturnArrays", MessageId = "MetadataReaders", Justification = "Imported from ServiceStack")]
- public LibraryOptionInfoDto[] MetadataReaders { get; set; } = null!;
+ public IReadOnlyList<LibraryOptionInfoDto> MetadataReaders { get; set; } = Array.Empty<LibraryOptionInfoDto>();
/// <summary>
/// Gets or sets the subtitle fetchers.
/// </summary>
- [SuppressMessage("Microsoft.Performance", "CA1819:ReturnArrays", MessageId = "SubtitleFetchers", Justification = "Imported from ServiceStack")]
- public LibraryOptionInfoDto[] SubtitleFetchers { get; set; } = null!;
+ public IReadOnlyList<LibraryOptionInfoDto> SubtitleFetchers { get; set; } = Array.Empty<LibraryOptionInfoDto>();
/// <summary>
/// Gets or sets the type options.
/// </summary>
- [SuppressMessage("Microsoft.Performance", "CA1819:ReturnArrays", MessageId = "TypeOptions", Justification = "Imported from ServiceStack")]
- public LibraryTypeOptionsDto[] TypeOptions { get; set; } = null!;
+ public IReadOnlyList<LibraryTypeOptionsDto> TypeOptions { get; set; } = Array.Empty<LibraryTypeOptionsDto>();
}
}
diff --git a/Jellyfin.Api/Models/LibraryDtos/LibraryTypeOptionsDto.cs b/Jellyfin.Api/Models/LibraryDtos/LibraryTypeOptionsDto.cs
index ad031e95e..20f45196d 100644
--- a/Jellyfin.Api/Models/LibraryDtos/LibraryTypeOptionsDto.cs
+++ b/Jellyfin.Api/Models/LibraryDtos/LibraryTypeOptionsDto.cs
@@ -1,4 +1,5 @@
-using System.Diagnostics.CodeAnalysis;
+using System;
+using System.Collections.Generic;
using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Entities;
@@ -17,25 +18,21 @@ namespace Jellyfin.Api.Models.LibraryDtos
/// <summary>
/// Gets or sets the metadata fetchers.
/// </summary>
- [SuppressMessage("Microsoft.Performance", "CA1819:ReturnArrays", MessageId = "MetadataFetchers", Justification = "Imported from ServiceStack")]
- public LibraryOptionInfoDto[] MetadataFetchers { get; set; } = null!;
+ public IReadOnlyList<LibraryOptionInfoDto> MetadataFetchers { get; set; } = Array.Empty<LibraryOptionInfoDto>();
/// <summary>
/// Gets or sets the image fetchers.
/// </summary>
- [SuppressMessage("Microsoft.Performance", "CA1819:ReturnArrays", MessageId = "ImageFetchers", Justification = "Imported from ServiceStack")]
- public LibraryOptionInfoDto[] ImageFetchers { get; set; } = null!;
+ public IReadOnlyList<LibraryOptionInfoDto> ImageFetchers { get; set; } = Array.Empty<LibraryOptionInfoDto>();
/// <summary>
/// Gets or sets the supported image types.
/// </summary>
- [SuppressMessage("Microsoft.Performance", "CA1819:ReturnArrays", MessageId = "SupportedImageTypes", Justification = "Imported from ServiceStack")]
- public ImageType[] SupportedImageTypes { get; set; } = null!;
+ public IReadOnlyList<ImageType> SupportedImageTypes { get; set; } = Array.Empty<ImageType>();
/// <summary>
/// Gets or sets the default image options.
/// </summary>
- [SuppressMessage("Microsoft.Performance", "CA1819:ReturnArrays", MessageId = "DefaultImageOptions", Justification = "Imported from ServiceStack")]
- public ImageOption[] DefaultImageOptions { get; set; } = null!;
+ public IReadOnlyList<ImageOption> DefaultImageOptions { get; set; } = Array.Empty<ImageOption>();
}
}
diff --git a/Jellyfin.Api/Models/LibraryDtos/MediaUpdateInfoDto.cs b/Jellyfin.Api/Models/LibraryDtos/MediaUpdateInfoDto.cs
index 991dbfc50..f93638898 100644
--- a/Jellyfin.Api/Models/LibraryDtos/MediaUpdateInfoDto.cs
+++ b/Jellyfin.Api/Models/LibraryDtos/MediaUpdateInfoDto.cs
@@ -1,4 +1,7 @@
-namespace Jellyfin.Api.Models.LibraryDtos
+using System;
+using System.Collections.Generic;
+
+namespace Jellyfin.Api.Models.LibraryDtos
{
/// <summary>
/// Media Update Info Dto.
@@ -6,14 +9,8 @@
public class MediaUpdateInfoDto
{
/// <summary>
- /// Gets or sets media path.
- /// </summary>
- public string? Path { get; set; }
-
- /// <summary>
- /// Gets or sets media update type.
- /// Created, Modified, Deleted.
+ /// Gets or sets the list of updates.
/// </summary>
- public string? UpdateType { get; set; }
+ public IReadOnlyList<MediaUpdateInfoPathDto> Updates { get; set; } = Array.Empty<MediaUpdateInfoPathDto>();
}
}
diff --git a/Jellyfin.Api/Models/LibraryDtos/MediaUpdateInfoPathDto.cs b/Jellyfin.Api/Models/LibraryDtos/MediaUpdateInfoPathDto.cs
new file mode 100644
index 000000000..852315b92
--- /dev/null
+++ b/Jellyfin.Api/Models/LibraryDtos/MediaUpdateInfoPathDto.cs
@@ -0,0 +1,19 @@
+namespace Jellyfin.Api.Models.LibraryDtos
+{
+ /// <summary>
+ /// The media update info path.
+ /// </summary>
+ public class MediaUpdateInfoPathDto
+ {
+ /// <summary>
+ /// Gets or sets media path.
+ /// </summary>
+ public string? Path { get; set; }
+
+ /// <summary>
+ /// Gets or sets media update type.
+ /// Created, Modified, Deleted.
+ /// </summary>
+ public string? UpdateType { get; set; }
+ }
+}
diff --git a/Jellyfin.Api/Models/LibraryStructureDto/LibraryOptionsDto.cs b/Jellyfin.Api/Models/LibraryStructureDto/AddVirtualFolderDto.cs
index a13cb90db..ab68d5223 100644
--- a/Jellyfin.Api/Models/LibraryStructureDto/LibraryOptionsDto.cs
+++ b/Jellyfin.Api/Models/LibraryStructureDto/AddVirtualFolderDto.cs
@@ -3,13 +3,13 @@
namespace Jellyfin.Api.Models.LibraryStructureDto
{
/// <summary>
- /// Library options dto.
+ /// Add virtual folder dto.
/// </summary>
- public class LibraryOptionsDto
+ public class AddVirtualFolderDto
{
/// <summary>
/// Gets or sets library options.
/// </summary>
public LibraryOptions? LibraryOptions { get; set; }
}
-} \ No newline at end of file
+}
diff --git a/Jellyfin.Api/Models/LibraryStructureDto/UpdateLibraryOptionsDto.cs b/Jellyfin.Api/Models/LibraryStructureDto/UpdateLibraryOptionsDto.cs
new file mode 100644
index 000000000..c78ed51f7
--- /dev/null
+++ b/Jellyfin.Api/Models/LibraryStructureDto/UpdateLibraryOptionsDto.cs
@@ -0,0 +1,21 @@
+using System;
+using MediaBrowser.Model.Configuration;
+
+namespace Jellyfin.Api.Models.LibraryStructureDto
+{
+ /// <summary>
+ /// Update library options dto.
+ /// </summary>
+ public class UpdateLibraryOptionsDto
+ {
+ /// <summary>
+ /// Gets or sets the library item id.
+ /// </summary>
+ public Guid Id { get; set; }
+
+ /// <summary>
+ /// Gets or sets library options.
+ /// </summary>
+ public LibraryOptions? LibraryOptions { get; set; }
+ }
+}
diff --git a/Jellyfin.Api/Models/LibraryStructureDto/UpdateMediaPathRequestDto.cs b/Jellyfin.Api/Models/LibraryStructureDto/UpdateMediaPathRequestDto.cs
new file mode 100644
index 000000000..fbd4985f9
--- /dev/null
+++ b/Jellyfin.Api/Models/LibraryStructureDto/UpdateMediaPathRequestDto.cs
@@ -0,0 +1,23 @@
+using System.ComponentModel.DataAnnotations;
+using MediaBrowser.Model.Configuration;
+
+namespace Jellyfin.Api.Models.LibraryStructureDto
+{
+ /// <summary>
+ /// Update library options dto.
+ /// </summary>
+ public class UpdateMediaPathRequestDto
+ {
+ /// <summary>
+ /// Gets or sets the library name.
+ /// </summary>
+ [Required]
+ public string Name { get; set; } = null!;
+
+ /// <summary>
+ /// Gets or sets library folder path information.
+ /// </summary>
+ [Required]
+ public MediaPathInfo PathInfo { get; set; } = null!;
+ }
+}
diff --git a/Jellyfin.Api/Models/LiveTvDtos/ChannelMappingOptionsDto.cs b/Jellyfin.Api/Models/LiveTvDtos/ChannelMappingOptionsDto.cs
index 970d8acdb..f43822da7 100644
--- a/Jellyfin.Api/Models/LiveTvDtos/ChannelMappingOptionsDto.cs
+++ b/Jellyfin.Api/Models/LiveTvDtos/ChannelMappingOptionsDto.cs
@@ -1,4 +1,5 @@
-using System.Collections.Generic;
+using System;
+using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using MediaBrowser.Controller.LiveTv;
using MediaBrowser.Model.Dto;
@@ -25,8 +26,7 @@ namespace Jellyfin.Api.Models.LiveTvDtos
/// <summary>
/// Gets or sets list of mappings.
/// </summary>
- [SuppressMessage("Microsoft.Performance", "CA1819:DontReturnArrays", MessageId = "Mappings", Justification = "Imported from ServiceStack")]
- public NameValuePair[] Mappings { get; set; } = null!;
+ public IReadOnlyList<NameValuePair> Mappings { get; set; } = Array.Empty<NameValuePair>();
/// <summary>
/// Gets or sets provider name.
diff --git a/Jellyfin.Api/Models/LiveTvDtos/GetProgramsDto.cs b/Jellyfin.Api/Models/LiveTvDtos/GetProgramsDto.cs
index d7eaab30d..411e4c550 100644
--- a/Jellyfin.Api/Models/LiveTvDtos/GetProgramsDto.cs
+++ b/Jellyfin.Api/Models/LiveTvDtos/GetProgramsDto.cs
@@ -1,4 +1,10 @@
using System;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+using Jellyfin.Data.Enums;
+using Jellyfin.Extensions.Json.Converters;
+using MediaBrowser.Model.Entities;
+using MediaBrowser.Model.Querying;
namespace Jellyfin.Api.Models.LiveTvDtos
{
@@ -10,7 +16,8 @@ namespace Jellyfin.Api.Models.LiveTvDtos
/// <summary>
/// Gets or sets the channels to return guide information for.
/// </summary>
- public string? ChannelIds { get; set; }
+ [JsonConverter(typeof(JsonCommaDelimitedArrayConverterFactory))]
+ public IReadOnlyList<Guid> ChannelIds { get; set; } = Array.Empty<Guid>();
/// <summary>
/// Gets or sets optional. Filter by user id.
@@ -99,22 +106,26 @@ namespace Jellyfin.Api.Models.LiveTvDtos
/// Gets or sets specify one or more sort orders, comma delimited. Options: Name, StartDate.
/// Optional.
/// </summary>
- public string? SortBy { get; set; }
+ [JsonConverter(typeof(JsonCommaDelimitedArrayConverterFactory))]
+ public IReadOnlyList<string> SortBy { get; set; } = Array.Empty<string>();
/// <summary>
/// Gets or sets sort Order - Ascending,Descending.
/// </summary>
- public string? SortOrder { get; set; }
+ [JsonConverter(typeof(JsonCommaDelimitedArrayConverterFactory))]
+ public IReadOnlyList<SortOrder> SortOrder { get; set; } = Array.Empty<SortOrder>();
/// <summary>
/// Gets or sets the genres to return guide information for.
/// </summary>
- public string? Genres { get; set; }
+ [JsonConverter(typeof(JsonPipeDelimitedArrayConverterFactory))]
+ public IReadOnlyList<string> Genres { get; set; } = Array.Empty<string>();
/// <summary>
/// Gets or sets the genre ids to return guide information for.
/// </summary>
- public string? GenreIds { get; set; }
+ [JsonConverter(typeof(JsonCommaDelimitedArrayConverterFactory))]
+ public IReadOnlyList<Guid> GenreIds { get; set; } = Array.Empty<Guid>();
/// <summary>
/// Gets or sets include image information in output.
@@ -137,7 +148,8 @@ namespace Jellyfin.Api.Models.LiveTvDtos
/// Gets or sets the image types to include in the output.
/// Optional.
/// </summary>
- public string? EnableImageTypes { get; set; }
+ [JsonConverter(typeof(JsonCommaDelimitedArrayConverterFactory))]
+ public IReadOnlyList<ImageType> EnableImageTypes { get; set; } = Array.Empty<ImageType>();
/// <summary>
/// Gets or sets include user data.
@@ -161,6 +173,7 @@ namespace Jellyfin.Api.Models.LiveTvDtos
/// Gets or sets specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines.
/// Optional.
/// </summary>
- public string? Fields { get; set; }
+ [JsonConverter(typeof(JsonCommaDelimitedArrayConverterFactory))]
+ public IReadOnlyList<ItemFields> Fields { get; set; } = Array.Empty<ItemFields>();
}
}
diff --git a/Jellyfin.Api/Models/LiveTvDtos/SetChannelMappingDto.cs b/Jellyfin.Api/Models/LiveTvDtos/SetChannelMappingDto.cs
new file mode 100644
index 000000000..2ddaa89e8
--- /dev/null
+++ b/Jellyfin.Api/Models/LiveTvDtos/SetChannelMappingDto.cs
@@ -0,0 +1,28 @@
+using System.ComponentModel.DataAnnotations;
+
+namespace Jellyfin.Api.Models.LiveTvDtos
+{
+ /// <summary>
+ /// Set channel mapping dto.
+ /// </summary>
+ public class SetChannelMappingDto
+ {
+ /// <summary>
+ /// Gets or sets the provider id.
+ /// </summary>
+ [Required]
+ public string ProviderId { get; set; } = string.Empty;
+
+ /// <summary>
+ /// Gets or sets the tuner channel id.
+ /// </summary>
+ [Required]
+ public string TunerChannelId { get; set; } = string.Empty;
+
+ /// <summary>
+ /// Gets or sets the provider channel id.
+ /// </summary>
+ [Required]
+ public string ProviderChannelId { get; set; } = string.Empty;
+ }
+} \ No newline at end of file
diff --git a/Jellyfin.Api/Models/MediaInfoDtos/OpenLiveStreamDto.cs b/Jellyfin.Api/Models/MediaInfoDtos/OpenLiveStreamDto.cs
index f797a3807..704542326 100644
--- a/Jellyfin.Api/Models/MediaInfoDtos/OpenLiveStreamDto.cs
+++ b/Jellyfin.Api/Models/MediaInfoDtos/OpenLiveStreamDto.cs
@@ -1,4 +1,5 @@
-using System.Diagnostics.CodeAnalysis;
+using System;
+using System.Collections.Generic;
using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.MediaInfo;
@@ -10,6 +11,61 @@ namespace Jellyfin.Api.Models.MediaInfoDtos
public class OpenLiveStreamDto
{
/// <summary>
+ /// Gets or sets the open token.
+ /// </summary>
+ public string? OpenToken { get; set; }
+
+ /// <summary>
+ /// Gets or sets the user id.
+ /// </summary>
+ public Guid? UserId { get; set; }
+
+ /// <summary>
+ /// Gets or sets the play session id.
+ /// </summary>
+ public string? PlaySessionId { get; set; }
+
+ /// <summary>
+ /// Gets or sets the max streaming bitrate.
+ /// </summary>
+ public int? MaxStreamingBitrate { get; set; }
+
+ /// <summary>
+ /// Gets or sets the start time in ticks.
+ /// </summary>
+ public long? StartTimeTicks { get; set; }
+
+ /// <summary>
+ /// Gets or sets the audio stream index.
+ /// </summary>
+ public int? AudioStreamIndex { get; set; }
+
+ /// <summary>
+ /// Gets or sets the subtitle stream index.
+ /// </summary>
+ public int? SubtitleStreamIndex { get; set; }
+
+ /// <summary>
+ /// Gets or sets the max audio channels.
+ /// </summary>
+ public int? MaxAudioChannels { get; set; }
+
+ /// <summary>
+ /// Gets or sets the item id.
+ /// </summary>
+ public Guid? ItemId { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether to enable direct play.
+ /// </summary>
+ public bool? EnableDirectPlay { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether to enale direct stream.
+ /// </summary>
+ public bool? EnableDirectStream { get; set; }
+
+ /// <summary>
/// Gets or sets the device profile.
/// </summary>
public DeviceProfile? DeviceProfile { get; set; }
@@ -17,8 +73,6 @@ namespace Jellyfin.Api.Models.MediaInfoDtos
/// <summary>
/// Gets or sets the device play protocols.
/// </summary>
- [SuppressMessage("Microsoft.Performance", "CA1819:DontReturnArrays", MessageId = "DevicePlayProtocols", Justification = "Imported from ServiceStack")]
- [SuppressMessage("Microsoft.Performance", "SA1011:ClosingBracketsSpace", MessageId = "DevicePlayProtocols", Justification = "Imported from ServiceStack")]
- public MediaProtocol[]? DirectPlayProtocols { get; set; }
+ public IReadOnlyList<MediaProtocol> DirectPlayProtocols { get; set; } = Array.Empty<MediaProtocol>();
}
}
diff --git a/Jellyfin.Api/Models/MediaInfoDtos/PlaybackInfoDto.cs b/Jellyfin.Api/Models/MediaInfoDtos/PlaybackInfoDto.cs
new file mode 100644
index 000000000..2cfdba507
--- /dev/null
+++ b/Jellyfin.Api/Models/MediaInfoDtos/PlaybackInfoDto.cs
@@ -0,0 +1,86 @@
+using System;
+using MediaBrowser.Model.Dlna;
+
+namespace Jellyfin.Api.Models.MediaInfoDtos
+{
+ /// <summary>
+ /// Plabyback info dto.
+ /// </summary>
+ public class PlaybackInfoDto
+ {
+ /// <summary>
+ /// Gets or sets the playback userId.
+ /// </summary>
+ public Guid? UserId { get; set; }
+
+ /// <summary>
+ /// Gets or sets the max streaming bitrate.
+ /// </summary>
+ public int? MaxStreamingBitrate { get; set; }
+
+ /// <summary>
+ /// Gets or sets the start time in ticks.
+ /// </summary>
+ public long? StartTimeTicks { get; set; }
+
+ /// <summary>
+ /// Gets or sets the audio stream index.
+ /// </summary>
+ public int? AudioStreamIndex { get; set; }
+
+ /// <summary>
+ /// Gets or sets the subtitle stream index.
+ /// </summary>
+ public int? SubtitleStreamIndex { get; set; }
+
+ /// <summary>
+ /// Gets or sets the max audio channels.
+ /// </summary>
+ public int? MaxAudioChannels { get; set; }
+
+ /// <summary>
+ /// Gets or sets the media source id.
+ /// </summary>
+ public string? MediaSourceId { get; set; }
+
+ /// <summary>
+ /// Gets or sets the live stream id.
+ /// </summary>
+ public string? LiveStreamId { get; set; }
+
+ /// <summary>
+ /// Gets or sets the device profile.
+ /// </summary>
+ public DeviceProfile? DeviceProfile { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether to enable direct play.
+ /// </summary>
+ public bool? EnableDirectPlay { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether to enable direct stream.
+ /// </summary>
+ public bool? EnableDirectStream { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether to enable transcoding.
+ /// </summary>
+ public bool? EnableTranscoding { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether to enable video stream copy.
+ /// </summary>
+ public bool? AllowVideoStreamCopy { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether to allow audio stream copy.
+ /// </summary>
+ public bool? AllowAudioStreamCopy { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether to auto open the live stream.
+ /// </summary>
+ public bool? AutoOpenLiveStream { get; set; }
+ }
+} \ No newline at end of file
diff --git a/Jellyfin.Api/Models/NotificationDtos/AdminNotificationDto.cs b/Jellyfin.Api/Models/NotificationDtos/AdminNotificationDto.cs
new file mode 100644
index 000000000..2c3a6282f
--- /dev/null
+++ b/Jellyfin.Api/Models/NotificationDtos/AdminNotificationDto.cs
@@ -0,0 +1,30 @@
+using MediaBrowser.Model.Notifications;
+
+namespace Jellyfin.Api.Models.NotificationDtos
+{
+ /// <summary>
+ /// The admin notification dto.
+ /// </summary>
+ public class AdminNotificationDto
+ {
+ /// <summary>
+ /// Gets or sets the notification name.
+ /// </summary>
+ public string? Name { get; set; }
+
+ /// <summary>
+ /// Gets or sets the notification description.
+ /// </summary>
+ public string? Description { get; set; }
+
+ /// <summary>
+ /// Gets or sets the notification level.
+ /// </summary>
+ public NotificationLevel? NotificationLevel { get; set; }
+
+ /// <summary>
+ /// Gets or sets the notification url.
+ /// </summary>
+ public string? Url { get; set; }
+ }
+}
diff --git a/Jellyfin.Api/Models/PlaybackDtos/TranscodingJobDto.cs b/Jellyfin.Api/Models/PlaybackDtos/TranscodingJobDto.cs
index b9507a4e5..291e571dc 100644
--- a/Jellyfin.Api/Models/PlaybackDtos/TranscodingJobDto.cs
+++ b/Jellyfin.Api/Models/PlaybackDtos/TranscodingJobDto.cs
@@ -11,7 +11,7 @@ namespace Jellyfin.Api.Models.PlaybackDtos
/// <summary>
/// Class TranscodingJob.
/// </summary>
- public class TranscodingJobDto
+ public class TranscodingJobDto : IDisposable
{
/// <summary>
/// The process lock.
@@ -196,7 +196,7 @@ namespace Jellyfin.Api.Models.PlaybackDtos
/// Start kill timer.
/// </summary>
/// <param name="callback">Callback action.</param>
- public void StartKillTimer(Action<object> callback)
+ public void StartKillTimer(Action<object?> callback)
{
StartKillTimer(callback, PingTimeout);
}
@@ -206,7 +206,7 @@ namespace Jellyfin.Api.Models.PlaybackDtos
/// </summary>
/// <param name="callback">Callback action.</param>
/// <param name="intervalMs">Callback interval.</param>
- public void StartKillTimer(Action<object> callback, int intervalMs)
+ public void StartKillTimer(Action<object?> callback, int intervalMs)
{
if (HasExited)
{
@@ -249,5 +249,31 @@ namespace Jellyfin.Api.Models.PlaybackDtos
}
}
}
+
+ /// <inheritdoc />
+ public void Dispose()
+ {
+ Dispose(true);
+ GC.SuppressFinalize(this);
+ }
+
+ /// <summary>
+ /// Dispose all resources.
+ /// </summary>
+ /// <param name="disposing">Whether to dispose all resources.</param>
+ protected virtual void Dispose(bool disposing)
+ {
+ if (disposing)
+ {
+ Process?.Dispose();
+ Process = null;
+ KillTimer?.Dispose();
+ KillTimer = null;
+ CancellationTokenSource?.Dispose();
+ CancellationTokenSource = null;
+ TranscodingThrottler?.Dispose();
+ TranscodingThrottler = null;
+ }
+ }
}
}
diff --git a/Jellyfin.Api/Models/PlaybackDtos/TranscodingThrottler.cs b/Jellyfin.Api/Models/PlaybackDtos/TranscodingThrottler.cs
index b5e42ea29..7b32d76ba 100644
--- a/Jellyfin.Api/Models/PlaybackDtos/TranscodingThrottler.cs
+++ b/Jellyfin.Api/Models/PlaybackDtos/TranscodingThrottler.cs
@@ -98,10 +98,10 @@ namespace Jellyfin.Api.Models.PlaybackDtos
private EncodingOptions GetOptions()
{
- return _config.GetConfiguration<EncodingOptions>("encoding");
+ return _config.GetEncodingOptions();
}
- private async void TimerCallback(object state)
+ private async void TimerCallback(object? state)
{
if (_job.HasExited)
{
@@ -145,7 +145,8 @@ namespace Jellyfin.Api.Models.PlaybackDtos
var transcodingPositionTicks = job.TranscodingPositionTicks ?? 0;
var downloadPositionTicks = job.DownloadPositionTicks ?? 0;
- var path = job.Path;
+ var path = job.Path ?? throw new ArgumentException("Path can't be null.");
+
var gapLengthInTicks = TimeSpan.FromSeconds(thresholdSeconds).Ticks;
if (downloadPositionTicks > 0 && transcodingPositionTicks > 0)
diff --git a/Jellyfin.Api/Models/PlaylistDtos/CreatePlaylistDto.cs b/Jellyfin.Api/Models/PlaylistDtos/CreatePlaylistDto.cs
index 0d67c86f7..0761b2085 100644
--- a/Jellyfin.Api/Models/PlaylistDtos/CreatePlaylistDto.cs
+++ b/Jellyfin.Api/Models/PlaylistDtos/CreatePlaylistDto.cs
@@ -1,4 +1,7 @@
using System;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+using Jellyfin.Extensions.Json.Converters;
namespace Jellyfin.Api.Models.PlaylistDtos
{
@@ -15,12 +18,13 @@ namespace Jellyfin.Api.Models.PlaylistDtos
/// <summary>
/// Gets or sets item ids to add to the playlist.
/// </summary>
- public string? Ids { get; set; }
+ [JsonConverter(typeof(JsonCommaDelimitedArrayConverterFactory))]
+ public IReadOnlyList<Guid> Ids { get; set; } = Array.Empty<Guid>();
/// <summary>
/// Gets or sets the user id.
/// </summary>
- public Guid UserId { get; set; }
+ public Guid? UserId { get; set; }
/// <summary>
/// Gets or sets the media type.
diff --git a/Jellyfin.Api/Models/SessionDtos/ClientCapabilitiesDto.cs b/Jellyfin.Api/Models/SessionDtos/ClientCapabilitiesDto.cs
new file mode 100644
index 000000000..fa62472e1
--- /dev/null
+++ b/Jellyfin.Api/Models/SessionDtos/ClientCapabilitiesDto.cs
@@ -0,0 +1,88 @@
+using System;
+using System.Collections.Generic;
+using System.Text.Json.Serialization;
+using Jellyfin.Extensions.Json.Converters;
+using MediaBrowser.Model.Dlna;
+using MediaBrowser.Model.Session;
+
+namespace Jellyfin.Api.Models.SessionDtos
+{
+ /// <summary>
+ /// Client capabilities dto.
+ /// </summary>
+ public class ClientCapabilitiesDto
+ {
+ /// <summary>
+ /// Gets or sets the list of playable media types.
+ /// </summary>
+ [JsonConverter(typeof(JsonCommaDelimitedArrayConverterFactory))]
+ public IReadOnlyList<string> PlayableMediaTypes { get; set; } = Array.Empty<string>();
+
+ /// <summary>
+ /// Gets or sets the list of supported commands.
+ /// </summary>
+ [JsonConverter(typeof(JsonCommaDelimitedArrayConverterFactory))]
+ public IReadOnlyList<GeneralCommandType> SupportedCommands { get; set; } = Array.Empty<GeneralCommandType>();
+
+ /// <summary>
+ /// Gets or sets a value indicating whether session supports media control.
+ /// </summary>
+ public bool SupportsMediaControl { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether session supports content uploading.
+ /// </summary>
+ public bool SupportsContentUploading { get; set; }
+
+ /// <summary>
+ /// Gets or sets the message callback url.
+ /// </summary>
+ public string? MessageCallbackUrl { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether session supports a persistent identifier.
+ /// </summary>
+ public bool SupportsPersistentIdentifier { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether session supports sync.
+ /// </summary>
+ public bool SupportsSync { get; set; }
+
+ /// <summary>
+ /// Gets or sets the device profile.
+ /// </summary>
+ public DeviceProfile? DeviceProfile { get; set; }
+
+ /// <summary>
+ /// Gets or sets the app store url.
+ /// </summary>
+ public string? AppStoreUrl { get; set; }
+
+ /// <summary>
+ /// Gets or sets the icon url.
+ /// </summary>
+ public string? IconUrl { get; set; }
+
+ /// <summary>
+ /// Convert the dto to the full <see cref="ClientCapabilities"/> model.
+ /// </summary>
+ /// <returns>The converted <see cref="ClientCapabilities"/> model.</returns>
+ public ClientCapabilities ToClientCapabilities()
+ {
+ return new ClientCapabilities
+ {
+ PlayableMediaTypes = PlayableMediaTypes,
+ SupportedCommands = SupportedCommands,
+ SupportsMediaControl = SupportsMediaControl,
+ SupportsContentUploading = SupportsContentUploading,
+ MessageCallbackUrl = MessageCallbackUrl,
+ SupportsPersistentIdentifier = SupportsPersistentIdentifier,
+ SupportsSync = SupportsSync,
+ DeviceProfile = DeviceProfile,
+ AppStoreUrl = AppStoreUrl,
+ IconUrl = IconUrl
+ };
+ }
+ }
+}
diff --git a/Jellyfin.Api/Models/SubtitleDtos/UploadSubtitleDto.cs b/Jellyfin.Api/Models/SubtitleDtos/UploadSubtitleDto.cs
new file mode 100644
index 000000000..30473255e
--- /dev/null
+++ b/Jellyfin.Api/Models/SubtitleDtos/UploadSubtitleDto.cs
@@ -0,0 +1,34 @@
+using System.ComponentModel.DataAnnotations;
+
+namespace Jellyfin.Api.Models.SubtitleDtos
+{
+ /// <summary>
+ /// Upload subtitles dto.
+ /// </summary>
+ public class UploadSubtitleDto
+ {
+ /// <summary>
+ /// Gets or sets the subtitle language.
+ /// </summary>
+ [Required]
+ public string Language { get; set; } = string.Empty;
+
+ /// <summary>
+ /// Gets or sets the subtitle format.
+ /// </summary>
+ [Required]
+ public string Format { get; set; } = string.Empty;
+
+ /// <summary>
+ /// Gets or sets a value indicating whether the subtitle is forced.
+ /// </summary>
+ [Required]
+ public bool IsForced { get; set; }
+
+ /// <summary>
+ /// Gets or sets the subtitle data.
+ /// </summary>
+ [Required]
+ public string Data { get; set; } = string.Empty;
+ }
+} \ No newline at end of file
diff --git a/Jellyfin.Api/Models/SyncPlayDtos/BufferRequestDto.cs b/Jellyfin.Api/Models/SyncPlayDtos/BufferRequestDto.cs
new file mode 100644
index 000000000..479c44084
--- /dev/null
+++ b/Jellyfin.Api/Models/SyncPlayDtos/BufferRequestDto.cs
@@ -0,0 +1,42 @@
+using System;
+
+namespace Jellyfin.Api.Models.SyncPlayDtos
+{
+ /// <summary>
+ /// Class BufferRequestDto.
+ /// </summary>
+ public class BufferRequestDto
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="BufferRequestDto"/> class.
+ /// </summary>
+ public BufferRequestDto()
+ {
+ PlaylistItemId = Guid.Empty;
+ }
+
+ /// <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 a value indicating whether the client playback is unpaused.
+ /// </summary>
+ /// <value>The client playback status.</value>
+ public bool IsPlaying { get; set; }
+
+ /// <summary>
+ /// Gets or sets the playlist item identifier of the playing item.
+ /// </summary>
+ /// <value>The playlist item identifier.</value>
+ public Guid PlaylistItemId { get; set; }
+ }
+}
diff --git a/Jellyfin.Api/Models/SyncPlayDtos/IgnoreWaitRequestDto.cs b/Jellyfin.Api/Models/SyncPlayDtos/IgnoreWaitRequestDto.cs
new file mode 100644
index 000000000..4c30b7be4
--- /dev/null
+++ b/Jellyfin.Api/Models/SyncPlayDtos/IgnoreWaitRequestDto.cs
@@ -0,0 +1,14 @@
+namespace Jellyfin.Api.Models.SyncPlayDtos
+{
+ /// <summary>
+ /// Class IgnoreWaitRequestDto.
+ /// </summary>
+ public class IgnoreWaitRequestDto
+ {
+ /// <summary>
+ /// Gets or sets a value indicating whether the client should be ignored.
+ /// </summary>
+ /// <value>The client group-wait status.</value>
+ public bool IgnoreWait { get; set; }
+ }
+}
diff --git a/Jellyfin.Api/Models/SyncPlayDtos/JoinGroupRequestDto.cs b/Jellyfin.Api/Models/SyncPlayDtos/JoinGroupRequestDto.cs
new file mode 100644
index 000000000..ed97b8d6a
--- /dev/null
+++ b/Jellyfin.Api/Models/SyncPlayDtos/JoinGroupRequestDto.cs
@@ -0,0 +1,16 @@
+using System;
+
+namespace Jellyfin.Api.Models.SyncPlayDtos
+{
+ /// <summary>
+ /// Class JoinGroupRequestDto.
+ /// </summary>
+ public class JoinGroupRequestDto
+ {
+ /// <summary>
+ /// Gets or sets the group identifier.
+ /// </summary>
+ /// <value>The identifier of the group to join.</value>
+ public Guid GroupId { get; set; }
+ }
+}
diff --git a/Jellyfin.Api/Models/SyncPlayDtos/MovePlaylistItemRequestDto.cs b/Jellyfin.Api/Models/SyncPlayDtos/MovePlaylistItemRequestDto.cs
new file mode 100644
index 000000000..3af25f3e3
--- /dev/null
+++ b/Jellyfin.Api/Models/SyncPlayDtos/MovePlaylistItemRequestDto.cs
@@ -0,0 +1,30 @@
+using System;
+
+namespace Jellyfin.Api.Models.SyncPlayDtos
+{
+ /// <summary>
+ /// Class MovePlaylistItemRequestDto.
+ /// </summary>
+ public class MovePlaylistItemRequestDto
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="MovePlaylistItemRequestDto"/> class.
+ /// </summary>
+ public MovePlaylistItemRequestDto()
+ {
+ PlaylistItemId = Guid.Empty;
+ }
+
+ /// <summary>
+ /// Gets or sets the playlist identifier of the item.
+ /// </summary>
+ /// <value>The playlist identifier of the item.</value>
+ public Guid PlaylistItemId { get; set; }
+
+ /// <summary>
+ /// Gets or sets the new position.
+ /// </summary>
+ /// <value>The new position.</value>
+ public int NewIndex { get; set; }
+ }
+}
diff --git a/Jellyfin.Api/Models/SyncPlayDtos/NewGroupRequestDto.cs b/Jellyfin.Api/Models/SyncPlayDtos/NewGroupRequestDto.cs
new file mode 100644
index 000000000..441d7be36
--- /dev/null
+++ b/Jellyfin.Api/Models/SyncPlayDtos/NewGroupRequestDto.cs
@@ -0,0 +1,22 @@
+namespace Jellyfin.Api.Models.SyncPlayDtos
+{
+ /// <summary>
+ /// Class NewGroupRequestDto.
+ /// </summary>
+ public class NewGroupRequestDto
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="NewGroupRequestDto"/> class.
+ /// </summary>
+ public NewGroupRequestDto()
+ {
+ GroupName = string.Empty;
+ }
+
+ /// <summary>
+ /// Gets or sets the group name.
+ /// </summary>
+ /// <value>The name of the new group.</value>
+ public string GroupName { get; set; }
+ }
+}
diff --git a/Jellyfin.Api/Models/SyncPlayDtos/NextItemRequestDto.cs b/Jellyfin.Api/Models/SyncPlayDtos/NextItemRequestDto.cs
new file mode 100644
index 000000000..f59a93f13
--- /dev/null
+++ b/Jellyfin.Api/Models/SyncPlayDtos/NextItemRequestDto.cs
@@ -0,0 +1,24 @@
+using System;
+
+namespace Jellyfin.Api.Models.SyncPlayDtos
+{
+ /// <summary>
+ /// Class NextItemRequestDto.
+ /// </summary>
+ public class NextItemRequestDto
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="NextItemRequestDto"/> class.
+ /// </summary>
+ public NextItemRequestDto()
+ {
+ PlaylistItemId = Guid.Empty;
+ }
+
+ /// <summary>
+ /// Gets or sets the playing item identifier.
+ /// </summary>
+ /// <value>The playing item identifier.</value>
+ public Guid PlaylistItemId { get; set; }
+ }
+}
diff --git a/Jellyfin.Api/Models/SyncPlayDtos/PingRequestDto.cs b/Jellyfin.Api/Models/SyncPlayDtos/PingRequestDto.cs
new file mode 100644
index 000000000..c4ac06856
--- /dev/null
+++ b/Jellyfin.Api/Models/SyncPlayDtos/PingRequestDto.cs
@@ -0,0 +1,14 @@
+namespace Jellyfin.Api.Models.SyncPlayDtos
+{
+ /// <summary>
+ /// Class PingRequestDto.
+ /// </summary>
+ public class PingRequestDto
+ {
+ /// <summary>
+ /// Gets or sets the ping time.
+ /// </summary>
+ /// <value>The ping time.</value>
+ public long Ping { get; set; }
+ }
+}
diff --git a/Jellyfin.Api/Models/SyncPlayDtos/PlayRequestDto.cs b/Jellyfin.Api/Models/SyncPlayDtos/PlayRequestDto.cs
new file mode 100644
index 000000000..844388cd9
--- /dev/null
+++ b/Jellyfin.Api/Models/SyncPlayDtos/PlayRequestDto.cs
@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+
+namespace Jellyfin.Api.Models.SyncPlayDtos
+{
+ /// <summary>
+ /// Class PlayRequestDto.
+ /// </summary>
+ public class PlayRequestDto
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="PlayRequestDto"/> class.
+ /// </summary>
+ public PlayRequestDto()
+ {
+ PlayingQueue = Array.Empty<Guid>();
+ }
+
+ /// <summary>
+ /// Gets or sets the playing queue.
+ /// </summary>
+ /// <value>The playing queue.</value>
+ public IReadOnlyList<Guid> PlayingQueue { get; set; }
+
+ /// <summary>
+ /// Gets or sets the position of the playing item in the queue.
+ /// </summary>
+ /// <value>The playing item position.</value>
+ public int PlayingItemPosition { get; set; }
+
+ /// <summary>
+ /// Gets or sets the start position ticks.
+ /// </summary>
+ /// <value>The start position ticks.</value>
+ public long StartPositionTicks { get; set; }
+ }
+}
diff --git a/Jellyfin.Api/Models/SyncPlayDtos/PreviousItemRequestDto.cs b/Jellyfin.Api/Models/SyncPlayDtos/PreviousItemRequestDto.cs
new file mode 100644
index 000000000..7fd4a49be
--- /dev/null
+++ b/Jellyfin.Api/Models/SyncPlayDtos/PreviousItemRequestDto.cs
@@ -0,0 +1,24 @@
+using System;
+
+namespace Jellyfin.Api.Models.SyncPlayDtos
+{
+ /// <summary>
+ /// Class PreviousItemRequestDto.
+ /// </summary>
+ public class PreviousItemRequestDto
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="PreviousItemRequestDto"/> class.
+ /// </summary>
+ public PreviousItemRequestDto()
+ {
+ PlaylistItemId = Guid.Empty;
+ }
+
+ /// <summary>
+ /// Gets or sets the playing item identifier.
+ /// </summary>
+ /// <value>The playing item identifier.</value>
+ public Guid PlaylistItemId { get; set; }
+ }
+}
diff --git a/Jellyfin.Api/Models/SyncPlayDtos/QueueRequestDto.cs b/Jellyfin.Api/Models/SyncPlayDtos/QueueRequestDto.cs
new file mode 100644
index 000000000..2b187f443
--- /dev/null
+++ b/Jellyfin.Api/Models/SyncPlayDtos/QueueRequestDto.cs
@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using MediaBrowser.Model.SyncPlay;
+
+namespace Jellyfin.Api.Models.SyncPlayDtos
+{
+ /// <summary>
+ /// Class QueueRequestDto.
+ /// </summary>
+ public class QueueRequestDto
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="QueueRequestDto"/> class.
+ /// </summary>
+ public QueueRequestDto()
+ {
+ ItemIds = Array.Empty<Guid>();
+ }
+
+ /// <summary>
+ /// Gets or sets the items to enqueue.
+ /// </summary>
+ /// <value>The items to enqueue.</value>
+ public IReadOnlyList<Guid> ItemIds { get; set; }
+
+ /// <summary>
+ /// Gets or sets the mode in which to add the new items.
+ /// </summary>
+ /// <value>The enqueue mode.</value>
+ public GroupQueueMode Mode { get; set; }
+ }
+}
diff --git a/Jellyfin.Api/Models/SyncPlayDtos/ReadyRequestDto.cs b/Jellyfin.Api/Models/SyncPlayDtos/ReadyRequestDto.cs
new file mode 100644
index 000000000..d9c193016
--- /dev/null
+++ b/Jellyfin.Api/Models/SyncPlayDtos/ReadyRequestDto.cs
@@ -0,0 +1,42 @@
+using System;
+
+namespace Jellyfin.Api.Models.SyncPlayDtos
+{
+ /// <summary>
+ /// Class ReadyRequest.
+ /// </summary>
+ public class ReadyRequestDto
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ReadyRequestDto"/> class.
+ /// </summary>
+ public ReadyRequestDto()
+ {
+ PlaylistItemId = Guid.Empty;
+ }
+
+ /// <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 a value indicating whether the client playback is unpaused.
+ /// </summary>
+ /// <value>The client playback status.</value>
+ public bool IsPlaying { get; set; }
+
+ /// <summary>
+ /// Gets or sets the playlist item identifier of the playing item.
+ /// </summary>
+ /// <value>The playlist item identifier.</value>
+ public Guid PlaylistItemId { get; set; }
+ }
+}
diff --git a/Jellyfin.Api/Models/SyncPlayDtos/RemoveFromPlaylistRequestDto.cs b/Jellyfin.Api/Models/SyncPlayDtos/RemoveFromPlaylistRequestDto.cs
new file mode 100644
index 000000000..e9b2b2cb3
--- /dev/null
+++ b/Jellyfin.Api/Models/SyncPlayDtos/RemoveFromPlaylistRequestDto.cs
@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+
+namespace Jellyfin.Api.Models.SyncPlayDtos
+{
+ /// <summary>
+ /// Class RemoveFromPlaylistRequestDto.
+ /// </summary>
+ public class RemoveFromPlaylistRequestDto
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="RemoveFromPlaylistRequestDto"/> class.
+ /// </summary>
+ public RemoveFromPlaylistRequestDto()
+ {
+ PlaylistItemIds = Array.Empty<Guid>();
+ }
+
+ /// <summary>
+ /// Gets or sets the playlist identifiers ot the items.
+ /// </summary>
+ /// <value>The playlist identifiers ot the items.</value>
+ public IReadOnlyList<Guid> PlaylistItemIds { get; set; }
+ }
+}
diff --git a/Jellyfin.Api/Models/SyncPlayDtos/SeekRequestDto.cs b/Jellyfin.Api/Models/SyncPlayDtos/SeekRequestDto.cs
new file mode 100644
index 000000000..b9af0be7f
--- /dev/null
+++ b/Jellyfin.Api/Models/SyncPlayDtos/SeekRequestDto.cs
@@ -0,0 +1,14 @@
+namespace Jellyfin.Api.Models.SyncPlayDtos
+{
+ /// <summary>
+ /// Class SeekRequestDto.
+ /// </summary>
+ public class SeekRequestDto
+ {
+ /// <summary>
+ /// Gets or sets the position ticks.
+ /// </summary>
+ /// <value>The position ticks.</value>
+ public long PositionTicks { get; set; }
+ }
+}
diff --git a/Jellyfin.Api/Models/SyncPlayDtos/SetPlaylistItemRequestDto.cs b/Jellyfin.Api/Models/SyncPlayDtos/SetPlaylistItemRequestDto.cs
new file mode 100644
index 000000000..b937679fc
--- /dev/null
+++ b/Jellyfin.Api/Models/SyncPlayDtos/SetPlaylistItemRequestDto.cs
@@ -0,0 +1,24 @@
+using System;
+
+namespace Jellyfin.Api.Models.SyncPlayDtos
+{
+ /// <summary>
+ /// Class SetPlaylistItemRequestDto.
+ /// </summary>
+ public class SetPlaylistItemRequestDto
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="SetPlaylistItemRequestDto"/> class.
+ /// </summary>
+ public SetPlaylistItemRequestDto()
+ {
+ PlaylistItemId = Guid.Empty;
+ }
+
+ /// <summary>
+ /// Gets or sets the playlist identifier of the playing item.
+ /// </summary>
+ /// <value>The playlist identifier of the playing item.</value>
+ public Guid PlaylistItemId { get; set; }
+ }
+}
diff --git a/Jellyfin.Api/Models/SyncPlayDtos/SetRepeatModeRequestDto.cs b/Jellyfin.Api/Models/SyncPlayDtos/SetRepeatModeRequestDto.cs
new file mode 100644
index 000000000..e748fc3e0
--- /dev/null
+++ b/Jellyfin.Api/Models/SyncPlayDtos/SetRepeatModeRequestDto.cs
@@ -0,0 +1,16 @@
+using MediaBrowser.Model.SyncPlay;
+
+namespace Jellyfin.Api.Models.SyncPlayDtos
+{
+ /// <summary>
+ /// Class SetRepeatModeRequestDto.
+ /// </summary>
+ public class SetRepeatModeRequestDto
+ {
+ /// <summary>
+ /// Gets or sets the repeat mode.
+ /// </summary>
+ /// <value>The repeat mode.</value>
+ public GroupRepeatMode Mode { get; set; }
+ }
+}
diff --git a/Jellyfin.Api/Models/SyncPlayDtos/SetShuffleModeRequestDto.cs b/Jellyfin.Api/Models/SyncPlayDtos/SetShuffleModeRequestDto.cs
new file mode 100644
index 000000000..0e427f4a4
--- /dev/null
+++ b/Jellyfin.Api/Models/SyncPlayDtos/SetShuffleModeRequestDto.cs
@@ -0,0 +1,16 @@
+using MediaBrowser.Model.SyncPlay;
+
+namespace Jellyfin.Api.Models.SyncPlayDtos
+{
+ /// <summary>
+ /// Class SetShuffleModeRequestDto.
+ /// </summary>
+ public class SetShuffleModeRequestDto
+ {
+ /// <summary>
+ /// Gets or sets the shuffle mode.
+ /// </summary>
+ /// <value>The shuffle mode.</value>
+ public GroupShuffleMode Mode { get; set; }
+ }
+}
diff --git a/Jellyfin.Api/Models/UserDtos/AuthenticateUserByName.cs b/Jellyfin.Api/Models/UserDtos/AuthenticateUserByName.cs
index 393627435..41f7b169e 100644
--- a/Jellyfin.Api/Models/UserDtos/AuthenticateUserByName.cs
+++ b/Jellyfin.Api/Models/UserDtos/AuthenticateUserByName.cs
@@ -1,4 +1,6 @@
-namespace Jellyfin.Api.Models.UserDtos
+using System;
+
+namespace Jellyfin.Api.Models.UserDtos
{
/// <summary>
/// The authenticate user by name request body.
@@ -18,6 +20,7 @@
/// <summary>
/// Gets or sets the sha1-hashed password.
/// </summary>
+ [Obsolete("Send password using pw field")]
public string? Password { get; set; }
}
}
diff --git a/Jellyfin.Api/Models/UserDtos/ForgotPasswordDto.cs b/Jellyfin.Api/Models/UserDtos/ForgotPasswordDto.cs
new file mode 100644
index 000000000..b31c6539c
--- /dev/null
+++ b/Jellyfin.Api/Models/UserDtos/ForgotPasswordDto.cs
@@ -0,0 +1,16 @@
+using System.ComponentModel.DataAnnotations;
+
+namespace Jellyfin.Api.Models.UserDtos
+{
+ /// <summary>
+ /// Forgot Password request body DTO.
+ /// </summary>
+ public class ForgotPasswordDto
+ {
+ /// <summary>
+ /// Gets or sets the entered username to have its password reset.
+ /// </summary>
+ [Required]
+ public string? EnteredUsername { get; set; }
+ }
+}
diff --git a/Jellyfin.Api/Models/UserDtos/ForgotPasswordPinDto.cs b/Jellyfin.Api/Models/UserDtos/ForgotPasswordPinDto.cs
new file mode 100644
index 000000000..62780e23c
--- /dev/null
+++ b/Jellyfin.Api/Models/UserDtos/ForgotPasswordPinDto.cs
@@ -0,0 +1,16 @@
+using System.ComponentModel.DataAnnotations;
+
+namespace Jellyfin.Api.Models.UserDtos
+{
+ /// <summary>
+ /// Forgot Password Pin enter request body DTO.
+ /// </summary>
+ public class ForgotPasswordPinDto
+ {
+ /// <summary>
+ /// Gets or sets the entered pin to have the password reset.
+ /// </summary>
+ [Required]
+ public string? Pin { get; set; }
+ }
+}
diff --git a/Jellyfin.Api/Models/UserDtos/QuickConnectDto.cs b/Jellyfin.Api/Models/UserDtos/QuickConnectDto.cs
new file mode 100644
index 000000000..c3a2d5cec
--- /dev/null
+++ b/Jellyfin.Api/Models/UserDtos/QuickConnectDto.cs
@@ -0,0 +1,16 @@
+using System.ComponentModel.DataAnnotations;
+
+namespace Jellyfin.Api.Models.UserDtos
+{
+ /// <summary>
+ /// The quick connect request body.
+ /// </summary>
+ public class QuickConnectDto
+ {
+ /// <summary>
+ /// Gets or sets the quick connect token.
+ /// </summary>
+ [Required]
+ public string? Token { get; set; }
+ }
+}
diff --git a/Jellyfin.Api/Models/VideoDtos/DeviceProfileDto.cs b/Jellyfin.Api/Models/VideoDtos/DeviceProfileDto.cs
deleted file mode 100644
index db55dc34b..000000000
--- a/Jellyfin.Api/Models/VideoDtos/DeviceProfileDto.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using MediaBrowser.Model.Dlna;
-
-namespace Jellyfin.Api.Models.VideoDtos
-{
- /// <summary>
- /// Device profile dto.
- /// </summary>
- public class DeviceProfileDto
- {
- /// <summary>
- /// Gets or sets device profile.
- /// </summary>
- public DeviceProfile? DeviceProfile { get; set; }
- }
-}