Design Prot Merge #1
@@ -22,7 +22,7 @@ namespace Musify.Application.Mixes
|
||||
{
|
||||
private sealed record SeedArtist(Guid Id, string Name);
|
||||
|
||||
private sealed record LocalCandidate(Guid TrackId, string Title, string? Artist, int DurationSeconds);
|
||||
private sealed record LocalCandidate(Guid TrackId, string Title, string? Artist, double DurationSeconds);
|
||||
|
||||
private sealed record MixDraft(string Title, string? Subtitle, IReadOnlyList<MixItem> Items);
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Musify.Application.Mixes.Responses
|
||||
string Title,
|
||||
string? Artist,
|
||||
string? ThumbnailUrl,
|
||||
int DurationSeconds,
|
||||
double DurationSeconds,
|
||||
bool IsExplicit)
|
||||
{
|
||||
public static MixItemApplicationResponse FromEntity(MixItem item) =>
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Musify.Application.Tracks.Responses
|
||||
TrackSource Source,
|
||||
string? ExternalId,
|
||||
ProcessingStatus AudioStatus,
|
||||
int Duration,
|
||||
double Duration,
|
||||
int ListensCount,
|
||||
long? OwnerUserId,
|
||||
DateTime CreatedAt,
|
||||
|
||||
@@ -36,10 +36,10 @@ namespace Musify.Domain.Entities
|
||||
public string? ThumbnailUrl { get; set; }
|
||||
|
||||
[Required]
|
||||
public int DurationSeconds { get; set; } = 0;
|
||||
public double DurationSeconds { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool IsExplicit { get; set; } = false;
|
||||
public bool IsExplicit { get; set; }
|
||||
|
||||
[ForeignKey(nameof(MixId))]
|
||||
public Mix Mix { get; set; }
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Musify.Domain.Entities
|
||||
public required string NormalizedTitle { get; set; }
|
||||
|
||||
[Required]
|
||||
public int DurationSeconds { get; set; }
|
||||
public double DurationSeconds { get; set; }
|
||||
|
||||
[Required]
|
||||
public LifeCycleStatus LifeCycleStatus { get; set; } = LifeCycleStatus.Active;
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ namespace Musify.Infrastructure.MassTransit.Activities.Audio
|
||||
|
||||
try
|
||||
{
|
||||
var durationSeconds = executeContext.GetVariable<int>(executeContext.Arguments.DurationSecondsVariable)
|
||||
var durationSeconds = executeContext.GetVariable<double>(executeContext.Arguments.DurationSecondsVariable)
|
||||
?? throw new InvalidOperationException($"Missing routing slip variable {executeContext.Arguments.DurationSecondsVariable}");
|
||||
|
||||
var log = new UpdateTrackAudioLog(
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
public record UpdateTrackAudioLog(
|
||||
Guid TrackId,
|
||||
string? PreviousAudioFolderName,
|
||||
int PreviousDurationSeconds);
|
||||
double PreviousDurationSeconds);
|
||||
}
|
||||
|
||||
Generated
+1178
File diff suppressed because it is too large
Load Diff
+22
@@ -0,0 +1,22 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Musify.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class DurationAsDouble : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -360,8 +360,8 @@ namespace Musify.Infrastructure.Persistence.Migrations
|
||||
.HasMaxLength(300)
|
||||
.HasColumnType("character varying(300)");
|
||||
|
||||
b.Property<int>("DurationSeconds")
|
||||
.HasColumnType("integer");
|
||||
b.Property<double>("DurationSeconds")
|
||||
.HasColumnType("double precision");
|
||||
|
||||
b.Property<bool>("IsExplicit")
|
||||
.HasColumnType("boolean");
|
||||
@@ -474,8 +474,8 @@ namespace Musify.Infrastructure.Persistence.Migrations
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<int>("DurationSeconds")
|
||||
.HasColumnType("integer");
|
||||
b.Property<double>("DurationSeconds")
|
||||
.HasColumnType("double precision");
|
||||
|
||||
b.Property<int>("LifeCycleStatus")
|
||||
.HasColumnType("integer");
|
||||
@@ -893,21 +893,25 @@ namespace Musify.Infrastructure.Persistence.Migrations
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b1.Property<string>("LargeName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("character varying(64)")
|
||||
.HasColumnName("LargePictureName");
|
||||
|
||||
b1.Property<string>("MediumName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("character varying(64)")
|
||||
.HasColumnName("MediumPictureName");
|
||||
|
||||
b1.Property<string>("OriginalName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("character varying(64)")
|
||||
.HasColumnName("OriginalPictureName");
|
||||
|
||||
b1.Property<string>("SmallName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("character varying(64)")
|
||||
.HasColumnName("SmallPictureName");
|
||||
|
||||
Reference in New Issue
Block a user