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).
32 lines
954 B
C#
32 lines
954 B
C#
using Musify.Application.Serialization;
|
|
using Musify.Domain.Entities;
|
|
using Musify.Domain.ValueObjects;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace Musify.Application.Tracks.Responses
|
|
{
|
|
public record TrackApplicationResponse(
|
|
Guid Id,
|
|
string Title,
|
|
string? Artist,
|
|
ProcessingStatus AudioStatus,
|
|
double Duration,
|
|
int ListensCount,
|
|
DateTime CreatedAt,
|
|
DateTime UpdatedAt,
|
|
[property: JsonConverter(typeof(LongAsStringConverter))] long OwnerUserId)
|
|
{
|
|
public static TrackApplicationResponse FromEntity(Track track, int listensCount) =>
|
|
new(
|
|
track.Id,
|
|
track.Title,
|
|
track.Owner.Name,
|
|
track.Audio.TranscodeStatus,
|
|
track.DurationSeconds,
|
|
listensCount,
|
|
track.CreatedAt,
|
|
track.UpdatedAt,
|
|
track.OwnerUserId);
|
|
}
|
|
}
|