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).
44 lines
1.3 KiB
C#
44 lines
1.3 KiB
C#
using System.Text.Json.Serialization;
|
|
using Musify.Domain.Entities;
|
|
using Musify.Application.Serialization;
|
|
|
|
namespace Musify.Application.Albums.Responses
|
|
{
|
|
public record AlbumApplicationResponse(
|
|
Guid Id,
|
|
string Title,
|
|
string? Description,
|
|
int? ReleaseYear,
|
|
[property: JsonConverter(typeof(LongAsStringConverter))] long OwnerUserId,
|
|
int TrackCount,
|
|
string? SmallImageKeyName,
|
|
string? MediumImageKeyName,
|
|
string? LargeImageKeyName,
|
|
DateTime CreatedAt,
|
|
DateTime UpdatedAt,
|
|
IReadOnlyList<Guid> CoverTrackIds)
|
|
{
|
|
public const int CoverTrackCount = 4;
|
|
|
|
public static AlbumApplicationResponse FromEntity(
|
|
Album album,
|
|
int trackCount,
|
|
IReadOnlyList<Guid>? coverTrackIds = null)
|
|
{
|
|
return new AlbumApplicationResponse(
|
|
album.Id,
|
|
album.Title,
|
|
album.Description,
|
|
album.ReleaseYear,
|
|
album.OwnerUserId,
|
|
trackCount,
|
|
album.Pictures?.SmallName,
|
|
album.Pictures?.MediumName,
|
|
album.Pictures?.LargeName,
|
|
album.CreatedAt,
|
|
album.UpdatedAt,
|
|
coverTrackIds ?? []);
|
|
}
|
|
}
|
|
}
|