Song server: search and download songs, mobile web UI
- Sources: "free" (Creative Commons songs with media from github.com/UltraStar-Deluxe/songs) and "usdb" (usdb.animux.de with an account; audio/video via yt-dlp from the song's #VIDEO hints or YouTube links in the comments, covers from fanart.tv/YouTube) - Aggregated search (all sources in parallel, in-library flag), download queue into <library>/Downloads/<source>/<Artist - Title>, then rescan - Web UI in wwwroot (plain JS, no build): search, downloads with progress, library; phone first, dark mode, installable - Docker image with yt-dlp, ffmpeg and deno; library mounted writable - Tests for matching, USDB parsing and song rewriting Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
efcc63a640
commit
1e65864c8f
19 files changed
+1862
-12
No files matched your search
@@ -55,4 +55,62 @@ namespace VocaluxeSongServer.Contracts
|
||||
{
|
||||
public List<string> Paths { get; set; } = new List<string>();
|
||||
}
|
||||
|
||||
/// <summary>GET /api/v1/sources: where new songs can be found.</summary>
|
||||
public sealed class SourceDto
|
||||
{
|
||||
public string Id { get; set; } = "";
|
||||
public string Name { get; set; } = "";
|
||||
public string Description { get; set; } = "";
|
||||
public bool Enabled { get; set; }
|
||||
/// <summary>Why the source is disabled (e.g. missing account), or empty.</summary>
|
||||
public string Hint { get; set; } = "";
|
||||
}
|
||||
|
||||
/// <summary>GET /api/v1/search?q=...: results of all enabled sources.</summary>
|
||||
public sealed class SearchResponse
|
||||
{
|
||||
public List<SearchResultDto> Results { get; set; } = new List<SearchResultDto>();
|
||||
/// <summary>Sources that failed for this search: source id -> error message.</summary>
|
||||
public Dictionary<string, string> Errors { get; set; } = new Dictionary<string, string>();
|
||||
}
|
||||
|
||||
public sealed class SearchResultDto
|
||||
{
|
||||
public string Source { get; set; } = "";
|
||||
/// <summary>Id of the song within its source; used to download it.</summary>
|
||||
public string SourceId { get; set; } = "";
|
||||
public string Artist { get; set; } = "";
|
||||
public string Title { get; set; } = "";
|
||||
/// <summary>Extra info shown with the result (language, year, license, ...).</summary>
|
||||
public string Details { get; set; } = "";
|
||||
public string CoverUrl { get; set; } = "";
|
||||
/// <summary>True if a song with the same artist and title is already in the library.</summary>
|
||||
public bool InLibrary { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>POST /api/v1/downloads</summary>
|
||||
public sealed class DownloadRequest
|
||||
{
|
||||
public string Source { get; set; } = "";
|
||||
public string SourceId { get; set; } = "";
|
||||
public string Artist { get; set; } = "";
|
||||
public string Title { get; set; } = "";
|
||||
}
|
||||
|
||||
/// <summary>GET /api/v1/downloads: queued, running and finished downloads (newest first).</summary>
|
||||
public sealed class DownloadJobDto
|
||||
{
|
||||
public string Id { get; set; } = "";
|
||||
public string Source { get; set; } = "";
|
||||
public string SourceId { get; set; } = "";
|
||||
public string Artist { get; set; } = "";
|
||||
public string Title { get; set; } = "";
|
||||
/// <summary>queued, running, done or failed</summary>
|
||||
public string State { get; set; } = "";
|
||||
/// <summary>0..1</summary>
|
||||
public double Progress { get; set; }
|
||||
public string Message { get; set; } = "";
|
||||
public string Created { get; set; } = "";
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user