using LiteDB; namespace Jellyfin.Plugin.SmartNotify.Services; /// /// Represents a known media item in the database. /// Used to detect if an "added" item is actually a quality upgrade. /// public class KnownMediaItem { /// /// Gets or sets the database ID. /// [BsonId] public int Id { get; set; } /// /// Gets or sets the Jellyfin Item ID (GUID as string). /// public string JellyfinItemId { get; set; } = string.Empty; /// /// Gets or sets the unique content identifier. /// For episodes: "{SeriesProviderIds}|S{Season}E{Episode}" /// For movies: "{ProviderIds}" /// public string ContentKey { get; set; } = string.Empty; /// /// Gets or sets the item type (Episode, Movie, etc.). /// public string ItemType { get; set; } = string.Empty; /// /// Gets or sets the series name (for episodes). /// public string? SeriesName { get; set; } /// /// Gets or sets the season number (for episodes). /// public int? SeasonNumber { get; set; } /// /// Gets or sets the episode number (for episodes). /// public int? EpisodeNumber { get; set; } /// /// Gets or sets the item name. /// public string Name { get; set; } = string.Empty; /// /// Gets or sets the year. /// public int? Year { get; set; } /// /// Gets or sets when this item was first seen. /// public DateTime FirstSeen { get; set; } /// /// Gets or sets the file path (for detecting file changes). /// public string? FilePath { get; set; } /// /// Gets or sets the file size in bytes. /// public long? FileSize { get; set; } /// /// Gets or sets the provider IDs as JSON string. /// public string ProviderIdsJson { get; set; } = "{}"; } /// /// Represents a pending notification in the queue. /// public class PendingNotification { /// /// Gets or sets the database ID. /// [BsonId] public int Id { get; set; } /// /// Gets or sets the Jellyfin Item ID. /// public string JellyfinItemId { get; set; } = string.Empty; /// /// Gets or sets the item type. /// public string ItemType { get; set; } = string.Empty; /// /// Gets or sets the series name (for grouping episodes). /// public string? SeriesName { get; set; } /// /// Gets or sets the series ID (for grouping). /// public string? SeriesId { get; set; } /// /// Gets or sets the season number. /// public int? SeasonNumber { get; set; } /// /// Gets or sets the episode number. /// public int? EpisodeNumber { get; set; } /// /// Gets or sets the item name. /// public string Name { get; set; } = string.Empty; /// /// Gets or sets the year. /// public int? Year { get; set; } /// /// Gets or sets when the notification was queued. /// public DateTime QueuedAt { get; set; } /// /// Gets or sets the notification type. /// public NotificationType Type { get; set; } /// /// Gets or sets the image URL (for public servers). /// public string? ImageUrl { get; set; } /// /// Gets or sets the local image file path (for attachment-based sending). /// public string? ImagePath { get; set; } /// /// Gets or sets the provider IDs JSON. /// public string ProviderIdsJson { get; set; } = "{}"; /// /// Gets or sets the overview/description. /// public string? Overview { get; set; } } /// /// Type of notification. /// public enum NotificationType { /// /// Truly new content. /// NewContent, /// /// Quality upgrade of existing content. /// QualityUpgrade }