diff options
Diffstat (limited to 'Jellyfin.Api/Models')
| -rw-r--r-- | Jellyfin.Api/Models/NotificationDtos/NotificationDto.cs | 6 | ||||
| -rw-r--r-- | Jellyfin.Api/Models/NotificationDtos/NotificationResultDto.cs | 21 |
2 files changed, 24 insertions, 3 deletions
diff --git a/Jellyfin.Api/Models/NotificationDtos/NotificationDto.cs b/Jellyfin.Api/Models/NotificationDtos/NotificationDto.cs index c849ecd75..502b22623 100644 --- a/Jellyfin.Api/Models/NotificationDtos/NotificationDto.cs +++ b/Jellyfin.Api/Models/NotificationDtos/NotificationDto.cs @@ -41,13 +41,13 @@ namespace Jellyfin.Api.Models.NotificationDtos public string Description { get; set; } = string.Empty; /// <summary> - /// Gets or sets the notification's URL. Defaults to null. + /// Gets or sets the notification's URL. Defaults to an empty string. /// </summary> - public string? Url { get; set; } + public string Url { get; set; } = string.Empty; /// <summary> /// Gets or sets the notification level. /// </summary> - public NotificationLevel? Level { get; set; } + public NotificationLevel Level { get; set; } } } diff --git a/Jellyfin.Api/Models/NotificationDtos/NotificationResultDto.cs b/Jellyfin.Api/Models/NotificationDtos/NotificationResultDto.cs new file mode 100644 index 000000000..64e92bd83 --- /dev/null +++ b/Jellyfin.Api/Models/NotificationDtos/NotificationResultDto.cs @@ -0,0 +1,21 @@ +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; } + } +} |
