Skip to content

Commit

Permalink
download list show video type
Browse files Browse the repository at this point in the history
  • Loading branch information
BobH233 committed May 17, 2024
1 parent c388620 commit 88e4a07
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
requests
windows-curses
Flask
4 changes: 2 additions & 2 deletions webui/index.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<html lang="ch">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="styles.css" />
<title>Download Task Manager</title>
<title>沿河下载器</title>
</head>
<body>
<div class="container">
Expand Down
3 changes: 2 additions & 1 deletion webui/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,11 @@ setInterval(() => {
if (task_obj["canceled"]) {
return;
}
const download_version = task_obj["download_type"] == 2 ? "电脑屏幕" : "摄像头"
const html = `
<div class="task" id="${task_obj["uuid"]}-task">
<div class="task-info">
<span>${task_obj["name"]}</span>
<span>${task_obj["name"]}(${download_version})</span>
<div class="status-container">
<span class="status" id="${
task_obj["uuid"]
Expand Down
6 changes: 4 additions & 2 deletions webui_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"uuid":
"canceled":
"merge_status":
“download_type”
}
"""
all_task_status = [
Expand Down Expand Up @@ -162,7 +163,8 @@ def new_task():
"tot": 0,
"uuid": cur_uuid,
"canceled": False,
"merge_status": 0
"merge_status": 0,
"download_type": download_version
}

if download_version == "2":
Expand Down Expand Up @@ -200,4 +202,4 @@ def static_files(path):
if __name__ == '__main__':
t = threading.Thread(target=execute_tasks)
t.start()
app.run(debug=True, use_reloader=False)
app.run(debug=False, use_reloader=False, port=5000)

0 comments on commit 88e4a07

Please sign in to comment.