Fix downloader bug, use plink and add icon to plugin template

This commit is contained in:
2025-12-28 15:23:12 -06:00
parent d3d04bb971
commit 5106c5dc6b
9 changed files with 35 additions and 18 deletions

View File

@@ -1,6 +1,6 @@
func Pages.PlaylistInfo(tytd,ctx)
{
var id = ctx.QueryParams.TryGetFirst("id");
var id = ctx.QueryParams.TryGetFirst("list") ?? ctx.QueryParams.TryGetFirst("id");
var page = ctx.QueryParams.TryGetFirstInt("page");
if(TypeOf(page) != "Long") page = 1;
page--;
@@ -27,7 +27,7 @@ func Pages.PlaylistInfo(tytd,ctx)
</each>
<footer class="row center-align">
<button hx-get={$"./playlist?id={Net.Http.UrlEncode(id)}&page={page}"} hx-target="body" hx-push-url="true" >Prev</button>{page+1}<button hx-get={$"./playlist?id={Net.Http.UrlEncode(id)}&type=videos&page={page+2}"} hx-target="body" hx-push-url="true" >Next</button>
<button hx-get={$"./playlist?list={Net.Http.UrlEncode(id)}&page={page}"} hx-target="body" hx-push-url="true" >Prev</button>{page+1}<button hx-get={$"./playlist?list={Net.Http.UrlEncode(id)}&type=videos&page={page+2}"} hx-target="body" hx-push-url="true" >Next</button>
</footer>
</null>;

View File

@@ -9,10 +9,11 @@ func Pages.VideoInfo(tytd,ctx)
{
html = <div class="col">
<div class="min">
<img src={$"./api/v1/video-thumbnail?v={Net.Http.UrlEncode(vi.videoId)}"}>
<iframe src={$"./embed?v={Net.Http.UrlEncode(vi.videoId)}"} style="overflow: hidden;" width="640"
height="360" scrolling="no"></iframe>
</div>
<div class="min">
<raw(Components.AddVideo($"https://www.youtube.com/watch?v={vi.videoId}"))>
<raw(Components.AddVideo($"https://www.youtube.com/watch?v={Net.Http.UrlEncode(vi.videoId)}"))>
</div>
<div class="min">
<raw(Components.AddToPersonalList(tytd,vi.videoId))>