Backend: - Expose GET /config/playback so the frontend can detect whether anonymous listening is enabled without requiring auth - Wire anonymous access through track streaming and YouTube resolve flows Frontend: - Allow browsing/listening without a session when the backend enables it - Redesign Inicio, Sidebar and top bar with a new dark theme, typography, and layout (top bar with live quick-search, sticky/blurred on scroll) - Populate Top música, Popular and Recomendados with real Musify + YouTube Music data instead of placeholders - Various shape, spacing, color and animation refinements across the redesigned components
37 lines
1.2 KiB
C#
37 lines
1.2 KiB
C#
using ErrorOr;
|
|
using Mediator;
|
|
using Microsoft.Extensions.Logging;
|
|
using Musify.Application.Contracts;
|
|
using Musify.Application.Services;
|
|
|
|
namespace Musify.Application.YouTube
|
|
{
|
|
public record GetYouTubeAlbumQuery(string AlbumId)
|
|
: IQuery<ErrorOr<YouTubeAlbumDetail>>;
|
|
|
|
public class GetYouTubeAlbumQueryHandler(
|
|
IYouTubeMusicService youTubeMusicService,
|
|
YouTubeTrackProvisioner provisioner,
|
|
ILogger<GetYouTubeAlbumQueryHandler> logger)
|
|
: IQueryHandler<GetYouTubeAlbumQuery, ErrorOr<YouTubeAlbumDetail>>
|
|
{
|
|
public async ValueTask<ErrorOr<YouTubeAlbumDetail>> Handle(GetYouTubeAlbumQuery request, CancellationToken cancellationToken)
|
|
{
|
|
var result = await youTubeMusicService.GetAlbumAsync(request.AlbumId, cancellationToken);
|
|
if (result.IsError)
|
|
return result;
|
|
|
|
try
|
|
{
|
|
await provisioner.MaterializeAlbumAsync(request.AlbumId, result.Value, cancellationToken);
|
|
}
|
|
catch (Exception exception)
|
|
{
|
|
logger.LogWarning(exception, "Failed to materialize YouTube album {AlbumId}", request.AlbumId);
|
|
}
|
|
|
|
return result;
|
|
}
|
|
}
|
|
}
|