Remove YouTube integration from backend and deployment config
Drops the YouTube-backed second catalog source entirely: the Local/External split on Track/Album collapses into single concrete entities, Artist/TrackArtist/ExternalTrack/ExternalAlbum and the YouTube service/download pipeline (yt-dlp, MassTransit consumer, routing slip) are deleted, and mixes now source discovery only from local listening history. Includes the RemoveYouTubeIntegration EF Core migration and matching Worker/deploy/compose cleanup (no more yt-dlp/python/deno in the Worker image, no thumbnail-cache/YtDlp config sections).
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Musify.Domain.Abstractions;
|
||||
using Musify.Domain.ValueObjects;
|
||||
|
||||
namespace Musify.Domain.Entities
|
||||
{
|
||||
#pragma warning disable CS8618
|
||||
public abstract class Album : IAuditable
|
||||
public class Album : IAuditable
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
@@ -25,6 +26,12 @@ namespace Musify.Domain.Entities
|
||||
|
||||
public AlbumPictures? Pictures { get; set; }
|
||||
|
||||
[Required]
|
||||
public required long OwnerUserId { get; set; }
|
||||
|
||||
[ForeignKey(nameof(OwnerUserId))]
|
||||
public User Owner { get; set; }
|
||||
|
||||
[Required]
|
||||
public LifeCycleStatus LifeCycleStatus { get; set; } = LifeCycleStatus.Active;
|
||||
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Musify.Domain.Abstractions;
|
||||
|
||||
namespace Musify.Domain.Entities
|
||||
{
|
||||
#pragma warning disable CS8618
|
||||
public class Artist : IAuditable
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
|
||||
[Required]
|
||||
[MaxLength(200)]
|
||||
public required string Name { get; set; }
|
||||
|
||||
[Required]
|
||||
[MaxLength(200)]
|
||||
public required string NormalizedName { get; set; }
|
||||
|
||||
[Required]
|
||||
[MaxLength(64)]
|
||||
public required string ExternalId { get; set; }
|
||||
|
||||
[Required]
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||||
|
||||
[Required]
|
||||
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
|
||||
|
||||
public ICollection<TrackArtist> TrackArtists { get; set; } = new List<TrackArtist>();
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Musify.Domain.ValueObjects;
|
||||
|
||||
namespace Musify.Domain.Entities
|
||||
{
|
||||
public class ExternalAlbum : Album
|
||||
{
|
||||
[Required]
|
||||
public required TrackSource Source { get; set; }
|
||||
|
||||
[Required]
|
||||
[MaxLength(64)]
|
||||
public required string ExternalId { get; set; }
|
||||
|
||||
[MaxLength(512)]
|
||||
public string? ThumbnailUrl { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Musify.Domain.ValueObjects;
|
||||
|
||||
namespace Musify.Domain.Entities
|
||||
{
|
||||
public class ExternalTrack : Track
|
||||
{
|
||||
[Required]
|
||||
public required TrackSource Source { get; set; }
|
||||
|
||||
[Required]
|
||||
[MaxLength(64)]
|
||||
public required string ExternalId { get; set; }
|
||||
|
||||
public ICollection<TrackArtist> TrackArtists { get; set; } = new List<TrackArtist>();
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Musify.Domain.Entities
|
||||
{
|
||||
public class LocalTrack : Track
|
||||
{
|
||||
[Required]
|
||||
public required long OwnerUserId { get; set; }
|
||||
|
||||
[ForeignKey(nameof(OwnerUserId)) ]
|
||||
public required User Owner { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,6 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
using Musify.Domain.ValueObjects;
|
||||
|
||||
namespace Musify.Domain.Entities
|
||||
{
|
||||
#pragma warning disable CS8618
|
||||
@@ -19,32 +17,12 @@ namespace Musify.Domain.Entities
|
||||
public int Position { get; set; } = 0;
|
||||
|
||||
[Required]
|
||||
public required MixItemSource Source { get; set; }
|
||||
|
||||
public Guid? TrackId { get; set; }
|
||||
|
||||
[MaxLength(64)]
|
||||
public string? VideoId { get; set; }
|
||||
|
||||
[MaxLength(300)]
|
||||
public string? Title { get; set; }
|
||||
|
||||
[MaxLength(300)]
|
||||
public string? Artist { get; set; }
|
||||
|
||||
[MaxLength(512)]
|
||||
public string? ThumbnailUrl { get; set; }
|
||||
|
||||
[Required]
|
||||
public double DurationSeconds { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool IsExplicit { get; set; }
|
||||
public required Guid TrackId { get; set; }
|
||||
|
||||
[ForeignKey(nameof(MixId))]
|
||||
public Mix Mix { get; set; }
|
||||
|
||||
[ForeignKey(nameof(TrackId))]
|
||||
public Track? Track { get; set; }
|
||||
public Track Track { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Musify.Domain.Abstractions;
|
||||
using Musify.Domain.ValueObjects;
|
||||
|
||||
namespace Musify.Domain.Entities
|
||||
{
|
||||
#pragma warning disable CS8618
|
||||
public abstract class Track : IAuditable
|
||||
public class Track : IAuditable
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
@@ -21,6 +22,12 @@ namespace Musify.Domain.Entities
|
||||
[Required]
|
||||
public double DurationSeconds { get; set; }
|
||||
|
||||
[Required]
|
||||
public required long OwnerUserId { get; set; }
|
||||
|
||||
[ForeignKey(nameof(OwnerUserId))]
|
||||
public required User Owner { get; set; }
|
||||
|
||||
[Required]
|
||||
public LifeCycleStatus LifeCycleStatus { get; set; } = LifeCycleStatus.Active;
|
||||
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Musify.Domain.Entities
|
||||
{
|
||||
#pragma warning disable CS8618
|
||||
[Table("TrackArtist")]
|
||||
public class TrackArtist
|
||||
{
|
||||
[Required]
|
||||
public required Guid TrackId { get; set; }
|
||||
|
||||
[Required]
|
||||
public required Guid ArtistId { get; set; }
|
||||
|
||||
[Required]
|
||||
public int Position { get; set; } = 0;
|
||||
|
||||
[ForeignKey(nameof(TrackId)) ]
|
||||
public ExternalTrack Track { get; set; }
|
||||
|
||||
[ForeignKey(nameof(ArtistId)) ]
|
||||
public Artist Artist { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Musify.Domain.Entities
|
||||
{
|
||||
#pragma warning disable CS8618
|
||||
public class UserAlbum : Album
|
||||
{
|
||||
[Required]
|
||||
public required long OwnerUserId { get; set; }
|
||||
|
||||
[ForeignKey(nameof(OwnerUserId)) ]
|
||||
public User Owner { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user