From 6970b792eb15520fa170e3ac3b474af56eca1ec0 Mon Sep 17 00:00:00 2001 From: Mario Steele Date: Sat, 19 Jul 2025 12:46:14 -0500 Subject: [PATCH] Updated Video.cs Removed videoId as Key, and use playlistItemId as Key, as this will be unique to each playlist, and will not conflict with videos being on more then one playlist. --- FreeTubeSync/Model/Video.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/FreeTubeSync/Model/Video.cs b/FreeTubeSync/Model/Video.cs index 56ddd25..0fd1c08 100644 --- a/FreeTubeSync/Model/Video.cs +++ b/FreeTubeSync/Model/Video.cs @@ -1,18 +1,19 @@ using System.ComponentModel.DataAnnotations; using System.Diagnostics.CodeAnalysis; +using Microsoft.EntityFrameworkCore; namespace FreeTubeSync.Model; [SuppressMessage("ReSharper", "InconsistentNaming")] public class Video { - [Key] public string videoId { get; set; } = string.Empty; + public string videoId { get; set; } = string.Empty; public string title { get; set; } = string.Empty; public string author { get; set; } = string.Empty; public string authorId { get; set; } = string.Empty; public string lengthSeconds { get; set; } = string.Empty; - public string playlistItemId { get; set; } = string.Empty; public long pubished { get; set; } public long timeAdded { get; set; } + [Key] public string playlistItemId { get; set; } = string.Empty; public string type { get; set; } = string.Empty; } \ No newline at end of file