Moves the six backend projects on disk into Core/ and Hosts/ subfolders, matching the solution folders already defined in Musify.slnx, so the file explorer reflects the same layout as the solution: backend/Core/Musify.Domain backend/Core/Musify.Application backend/Core/Musify.Infrastructure backend/Hosts/Musify.Api backend/Hosts/Musify.Worker backend/Hosts/Musify.StreamingGateway Updates every reference to the old paths: ProjectReference entries in Musify.Api.csproj and Musify.Worker.csproj, the three Dockerfiles, deploy/scripts/migrate.ps1|sh, deploy/zitadel/provision.ps1, deploy/up.ps1, deploy/README.md and docs/development.md. Also fixes a stale Dockerfile comment pointing at a compose file that no longer exists. Verified with `dotnet build Musify.slnx` against the new layout.
65 lines
2.0 KiB
C#
65 lines
2.0 KiB
C#
using ErrorOr;
|
|
|
|
namespace Musify.Application.Contracts
|
|
{
|
|
public record YouTubeArtistRef(string? Id, string Name);
|
|
|
|
public record YouTubeSongResult(
|
|
string VideoId,
|
|
string Title,
|
|
string Artist,
|
|
string Album,
|
|
int DurationSeconds,
|
|
string ThumbnailUrl,
|
|
bool IsExplicit,
|
|
IReadOnlyList<YouTubeArtistRef> Artists);
|
|
|
|
public record YouTubeSearchResult(
|
|
IReadOnlyList<YouTubeSongResult> Items,
|
|
string ContinuationToken);
|
|
|
|
public record YouTubeAlbumResult(
|
|
string AlbumId,
|
|
string Title,
|
|
string Artist,
|
|
string ThumbnailUrl,
|
|
int? ReleaseYear,
|
|
bool IsSingle,
|
|
bool IsEp,
|
|
IReadOnlyList<YouTubeArtistRef> Artists);
|
|
|
|
public record YouTubeAlbumSearchResult(
|
|
IReadOnlyList<YouTubeAlbumResult> Items,
|
|
string ContinuationToken);
|
|
|
|
public record YouTubeAlbumTrack(
|
|
string VideoId,
|
|
string Title,
|
|
int DurationSeconds,
|
|
int TrackNumber,
|
|
bool IsExplicit);
|
|
|
|
public record YouTubeAlbumDetail(
|
|
YouTubeAlbumResult Album,
|
|
string Description,
|
|
int TotalDurationSeconds,
|
|
IReadOnlyList<YouTubeAlbumTrack> Tracks);
|
|
|
|
public record YouTubeStreamInfo(string Url, int ExpiresInSeconds);
|
|
|
|
public interface IYouTubeMusicService
|
|
{
|
|
Task<ErrorOr<YouTubeSearchResult>> SearchSongsAsync(string query, string continuationToken, CancellationToken cancellationToken);
|
|
|
|
Task<ErrorOr<YouTubeAlbumSearchResult>> SearchAlbumsAsync(string query, string continuationToken, CancellationToken cancellationToken);
|
|
|
|
Task<ErrorOr<YouTubeAlbumDetail>> GetAlbumAsync(string albumId, CancellationToken cancellationToken);
|
|
|
|
Task<ErrorOr<YouTubeStreamInfo>> GetAudioStreamAsync(string videoId, CancellationToken cancellationToken);
|
|
|
|
Task<ErrorOr<YouTubeSongResult>> GetSongAsync(string videoId, CancellationToken cancellationToken);
|
|
|
|
string ResolveArtworkUrl(string thumbnailUrl);
|
|
}
|
|
}
|