aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Models
diff options
context:
space:
mode:
Diffstat (limited to 'Jellyfin.Api/Models')
-rw-r--r--Jellyfin.Api/Models/NotificationDtos/AdminNotificationDto.cs30
-rw-r--r--Jellyfin.Api/Models/NotificationDtos/NotificationDto.cs51
-rw-r--r--Jellyfin.Api/Models/NotificationDtos/NotificationResultDto.cs21
-rw-r--r--Jellyfin.Api/Models/NotificationDtos/NotificationsSummaryDto.cs20
-rw-r--r--Jellyfin.Api/Models/PlaybackDtos/TranscodingJobDto.cs6
-rw-r--r--Jellyfin.Api/Models/PlaybackDtos/TranscodingThrottler.cs2
-rw-r--r--Jellyfin.Api/Models/StreamingDtos/StreamState.cs2
-rw-r--r--Jellyfin.Api/Models/UserDtos/AuthenticateUserByName.cs10
8 files changed, 6 insertions, 136 deletions
diff --git a/Jellyfin.Api/Models/NotificationDtos/AdminNotificationDto.cs b/Jellyfin.Api/Models/NotificationDtos/AdminNotificationDto.cs
deleted file mode 100644
index 2c3a6282f..000000000
--- a/Jellyfin.Api/Models/NotificationDtos/AdminNotificationDto.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-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/NotificationDtos/NotificationDto.cs b/Jellyfin.Api/Models/NotificationDtos/NotificationDto.cs
deleted file mode 100644
index af5239ec2..000000000
--- a/Jellyfin.Api/Models/NotificationDtos/NotificationDto.cs
+++ /dev/null
@@ -1,51 +0,0 @@
-using System;
-using MediaBrowser.Model.Notifications;
-
-namespace Jellyfin.Api.Models.NotificationDtos
-{
- /// <summary>
- /// The notification DTO.
- /// </summary>
- public class NotificationDto
- {
- /// <summary>
- /// Gets or sets the notification ID. Defaults to an empty string.
- /// </summary>
- public string Id { get; set; } = string.Empty;
-
- /// <summary>
- /// Gets or sets the notification's user ID. Defaults to an empty string.
- /// </summary>
- public string UserId { get; set; } = string.Empty;
-
- /// <summary>
- /// Gets or sets the notification date.
- /// </summary>
- public DateTime Date { get; set; }
-
- /// <summary>
- /// Gets or sets a value indicating whether the notification has been read. Defaults to false.
- /// </summary>
- public bool IsRead { get; set; } = false;
-
- /// <summary>
- /// Gets or sets the notification's name. Defaults to an empty string.
- /// </summary>
- public string Name { get; set; } = string.Empty;
-
- /// <summary>
- /// Gets or sets the notification's description. Defaults to an empty string.
- /// </summary>
- public string Description { get; set; } = string.Empty;
-
- /// <summary>
- /// Gets or sets the notification's URL. Defaults to an empty string.
- /// </summary>
- public string Url { get; set; } = string.Empty;
-
- /// <summary>
- /// Gets or sets the notification level.
- /// </summary>
- public NotificationLevel Level { get; set; }
- }
-}
diff --git a/Jellyfin.Api/Models/NotificationDtos/NotificationResultDto.cs b/Jellyfin.Api/Models/NotificationDtos/NotificationResultDto.cs
deleted file mode 100644
index 64e92bd83..000000000
--- a/Jellyfin.Api/Models/NotificationDtos/NotificationResultDto.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace Jellyfin.Api.Models.NotificationDtos
-{
- /// <summary>
- /// A list of notifications with the total record count for pagination.
- /// </summary>
- public class NotificationResultDto
- {
- /// <summary>
- /// Gets or sets the current page of notifications.
- /// </summary>
- public IReadOnlyList<NotificationDto> Notifications { get; set; } = Array.Empty<NotificationDto>();
-
- /// <summary>
- /// Gets or sets the total number of notifications.
- /// </summary>
- public int TotalRecordCount { get; set; }
- }
-}
diff --git a/Jellyfin.Api/Models/NotificationDtos/NotificationsSummaryDto.cs b/Jellyfin.Api/Models/NotificationDtos/NotificationsSummaryDto.cs
deleted file mode 100644
index 0568dea66..000000000
--- a/Jellyfin.Api/Models/NotificationDtos/NotificationsSummaryDto.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using MediaBrowser.Model.Notifications;
-
-namespace Jellyfin.Api.Models.NotificationDtos
-{
- /// <summary>
- /// The notification summary DTO.
- /// </summary>
- public class NotificationsSummaryDto
- {
- /// <summary>
- /// Gets or sets the number of unread notifications.
- /// </summary>
- public int UnreadCount { get; set; }
-
- /// <summary>
- /// Gets or sets the maximum unread notification level.
- /// </summary>
- public NotificationLevel? MaxUnreadNotificationLevel { get; set; }
- }
-}
diff --git a/Jellyfin.Api/Models/PlaybackDtos/TranscodingJobDto.cs b/Jellyfin.Api/Models/PlaybackDtos/TranscodingJobDto.cs
index ab67c8732..9060500c8 100644
--- a/Jellyfin.Api/Models/PlaybackDtos/TranscodingJobDto.cs
+++ b/Jellyfin.Api/Models/PlaybackDtos/TranscodingJobDto.cs
@@ -189,7 +189,7 @@ namespace Jellyfin.Api.Models.PlaybackDtos
{
lock (_timerLock)
{
- if (KillTimer != null)
+ if (KillTimer is not null)
{
KillTimer.Dispose();
KillTimer = null;
@@ -220,7 +220,7 @@ namespace Jellyfin.Api.Models.PlaybackDtos
lock (_timerLock)
{
- if (KillTimer == null)
+ if (KillTimer is null)
{
Logger.LogDebug("Starting kill timer at {0}ms. JobId {1} PlaySessionId {2}", intervalMs, Id, PlaySessionId);
KillTimer = new Timer(new TimerCallback(callback), this, intervalMs, Timeout.Infinite);
@@ -245,7 +245,7 @@ namespace Jellyfin.Api.Models.PlaybackDtos
lock (_timerLock)
{
- if (KillTimer != null)
+ if (KillTimer is not null)
{
var intervalMs = PingTimeout;
diff --git a/Jellyfin.Api/Models/PlaybackDtos/TranscodingThrottler.cs b/Jellyfin.Api/Models/PlaybackDtos/TranscodingThrottler.cs
index 99376873c..9c4e377cd 100644
--- a/Jellyfin.Api/Models/PlaybackDtos/TranscodingThrottler.cs
+++ b/Jellyfin.Api/Models/PlaybackDtos/TranscodingThrottler.cs
@@ -210,7 +210,7 @@ namespace Jellyfin.Api.Models.PlaybackDtos
private void DisposeTimer()
{
- if (_timer != null)
+ if (_timer is not null)
{
_timer.Dispose();
_timer = null;
diff --git a/Jellyfin.Api/Models/StreamingDtos/StreamState.cs b/Jellyfin.Api/Models/StreamingDtos/StreamState.cs
index 8182e3c9e..1fce1d20a 100644
--- a/Jellyfin.Api/Models/StreamingDtos/StreamState.cs
+++ b/Jellyfin.Api/Models/StreamingDtos/StreamState.cs
@@ -43,7 +43,7 @@ namespace Jellyfin.Api.Models.StreamingDtos
set
{
BaseRequest = value;
- IsVideoRequest = VideoRequest != null;
+ IsVideoRequest = VideoRequest is not null;
}
}
diff --git a/Jellyfin.Api/Models/UserDtos/AuthenticateUserByName.cs b/Jellyfin.Api/Models/UserDtos/AuthenticateUserByName.cs
index 41f7b169e..31208264f 100644
--- a/Jellyfin.Api/Models/UserDtos/AuthenticateUserByName.cs
+++ b/Jellyfin.Api/Models/UserDtos/AuthenticateUserByName.cs
@@ -1,6 +1,4 @@
-using System;
-
-namespace Jellyfin.Api.Models.UserDtos
+namespace Jellyfin.Api.Models.UserDtos
{
/// <summary>
/// The authenticate user by name request body.
@@ -16,11 +14,5 @@ namespace Jellyfin.Api.Models.UserDtos
/// Gets or sets the plain text password.
/// </summary>
public string? Pw { get; set; }
-
- /// <summary>
- /// Gets or sets the sha1-hashed password.
- /// </summary>
- [Obsolete("Send password using pw field")]
- public string? Password { get; set; }
}
}