Target crosslang v0.0.10, add /api/v1/progress_ex.json
All checks were successful
Build and Deploy on Tag / 🔨 Build (push) Successful in 22s
All checks were successful
Build and Deploy on Tag / 🔨 Build (push) Successful in 22s
This commit is contained in:
@@ -1014,9 +1014,9 @@ class TYTDApp {
|
||||
}
|
||||
else if(ctx.Path == "/add")
|
||||
{
|
||||
var url = ctx.QueryParams.TryGetFirst("url");
|
||||
var action =ctx.QueryParams.TryGetFirst("action");
|
||||
var res = ctx.QueryParams.TryGetFirst("res");
|
||||
var url = ctx.BodyParams.TryGetFirst("url");
|
||||
var action =ctx.BodyParams.TryGetFirst("action");
|
||||
var res = ctx.BodyParams.TryGetFirst("res");
|
||||
if(action == "add")
|
||||
{
|
||||
this.TYTD.DownloadItem(url,res);
|
||||
@@ -1044,9 +1044,9 @@ class TYTDApp {
|
||||
}
|
||||
else if(ctx.Path == "/add-video")
|
||||
{
|
||||
var url = ctx.QueryParams.TryGetFirst("url");
|
||||
var action =ctx.QueryParams.TryGetFirst("action");
|
||||
var res = ctx.QueryParams.TryGetFirst("res");
|
||||
var url = ctx.BodyParams.TryGetFirst("url");
|
||||
var action =ctx.BodyParams.TryGetFirst("action");
|
||||
var res = ctx.BodyParams.TryGetFirst("res");
|
||||
if(action == "add")
|
||||
{
|
||||
this.TYTD.DownloadItem(url,res);
|
||||
@@ -1067,10 +1067,10 @@ class TYTDApp {
|
||||
}
|
||||
else if(ctx.Path == "/add-to-list")
|
||||
{
|
||||
var id = ctx.QueryParams.TryGetFirst("id");
|
||||
var id = ctx.BodyParams.TryGetFirst("id");
|
||||
if(TypeOf(id) != "String") id = "";
|
||||
|
||||
var name = ctx.QueryParams.TryGetFirst("name");
|
||||
var name = ctx.BodyParams.TryGetFirst("name");
|
||||
if(TypeOf(name) != "String") name = "";
|
||||
|
||||
if(name == "")
|
||||
|
||||
@@ -883,9 +883,9 @@ class TYTD.Downloader {
|
||||
const resultQueue = Sqlite.Exec(db, "SELECT COUNT(*) FROM queue;");
|
||||
Sqlite.Close(db);
|
||||
|
||||
const videoCount = TypeIsList(resultVideos) ? (ParseLong(resultVideos.["COUNT(*)"])??0) : 0;
|
||||
const videoCount = TypeIsList(resultVideos) ? (ParseLong(resultVideos[0].["COUNT(*)"])??0) : 0;
|
||||
|
||||
const queueCount = TypeIsList(resultQueue) ? (ParseLong(resultQueue.["COUNT(*)"])??0) : 0;
|
||||
const queueCount = TypeIsList(resultQueue) ? (ParseLong(resultQueue[0].["COUNT(*)"])??0) : 0;
|
||||
|
||||
|
||||
const progress = {CurrentVideoProgress,CurrentVideo,QueueCount=queueCount, VideoCount=videoCount};
|
||||
|
||||
Reference in New Issue
Block a user