feat: song likes and initial implementation of Spotify playlist support, refs #9

This commit is contained in:
2025-07-20 03:18:22 +02:00
parent 8b91a13095
commit 2e876ad628
25 changed files with 2567 additions and 56 deletions

View File

@@ -0,0 +1,30 @@
using Microsoft.EntityFrameworkCore;
[PrimaryKey(nameof(Id))]
public class SmartPlaylistDefinition
{
public int Id { get; set; }
public string? Title { get; set; }
public string? Description { get; set; }
public User? CreatedBy { get; set; }
public bool IncludesUnCategorizedSongs { get; set; }
public bool IncludesLikedSongs { get; set; }
public List<SuggestionHelper>? Categories { get; set; }
public string? SpotifyPlaylistId { get; set; }
public List<Song>? ExplicitlyIncludedSongs { get; set; }
public List<Song>? ExplicitlyExcludedSongs { get; set; }
public bool IsThisUsersLikedSongsPlaylist
{
get
{
return IncludesLikedSongs == true
&& IncludesUnCategorizedSongs == false
&& (ExplicitlyExcludedSongs == null || ExplicitlyExcludedSongs.Count == 0)
&& (ExplicitlyIncludedSongs == null || ExplicitlyIncludedSongs.Count == 0)
&& (Categories == null || Categories.Count == 0);
}
}
}