T3-11/14/15 + M2 잔여: 권한 정책 UI(PermissionGate/PermissionRequested 다이얼로그+SavesInProfile), 추적 방지(TrackerBlocklist/WebResourceRequested 차단+실드 배지·팝업), 주소창 진행 바+파라미터 제거 복사(UrlCleaner/NavProgressTracker), U5 완료 알림(Mobile.Core 감지기+Plugin.LocalNotification), 재생중 ongoing 미디어 알림, 썸네일/해상도 API(Thumbnailer 사이드카 캐시+/thumb)+라이브러리 그리드, 외부망 안내(ConnectionTroubleshoot). 147 tests GREEN
This commit is contained in:
parent
27c91c04dd
commit
46c6c321f2
26 changed files with 1058 additions and 30 deletions
|
|
@ -96,8 +96,30 @@ public sealed class ServerHost : IAsyncDisposable
|
|||
app.MapPost("/api/queue/{id}/cancel", async (string id) => { await queue.CancelAsync(id); Results.Ok(); });
|
||||
|
||||
// ── 라이브러리 / 스트리밍 ──
|
||||
// ── 라이브러리 + 썸네일/해상도(M2) ──
|
||||
var thumbnailer = options.Thumbnailer ?? ServerOptionsDefaults.DefaultThumbnailer();
|
||||
var ffmpeg = VideoDownloader.Core.Platform.DesktopMediaMuxer.Default.ResolveFfmpeg(new VideoDownloader.Core.Config.AppConfig());
|
||||
app.MapGet("/api/library", async (HttpContext ctx) =>
|
||||
await ctx.Response.WriteAsJsonAsync(MediaLibrary.List(options.LibraryFolder)));
|
||||
{
|
||||
var items = MediaLibrary.List(options.LibraryFolder);
|
||||
if (ffmpeg != null)
|
||||
{
|
||||
for (var i = 0; i < items.Count; i++)
|
||||
{
|
||||
var res = await thumbnailer.GetResolutionAsync(ffmpeg, Path.Combine(options.LibraryFolder, items[i].FileName));
|
||||
items[i] = items[i] with { Resolution = res };
|
||||
}
|
||||
}
|
||||
await ctx.Response.WriteAsJsonAsync(items);
|
||||
});
|
||||
|
||||
app.MapGet("/api/library/{id}/thumb", async (string id) =>
|
||||
{
|
||||
var file = MediaLibrary.Find(options.LibraryFolder, id);
|
||||
if (file == null || ffmpeg == null) return Results.NotFound();
|
||||
var jpg = await thumbnailer.GetThumbnailAsync(ffmpeg, file.Value.FullPath);
|
||||
return jpg == null ? Results.NotFound() : Results.File(jpg, "image/jpeg");
|
||||
});
|
||||
|
||||
app.MapGet("/stream/{id}", (string id) =>
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue