fix: can't batch downloads when live video is present

This commit is contained in:
ltaoo committed 2026-01-21 23:09:05 +08:00
1 parent bfec0fb067
commit 2d913af70d
2 files changed
+24 -9

No files matched your search

+24 -7
View File
@@ -98,12 +98,29 @@ var WXU = (() => {
// id: feed.id,
title: feed.description || "直播",
url: feed.liveInfo.streamUrl,
cover_url: feed.anchorContact.liveCoverImgUrl,
contact: {
id: feed.anchorContact.username,
avatar_url: feed.anchorContact.headUrl,
nickname: feed.anchorContact.nickname,
},
cover_url: (() => {
if (feed.anchorContact) {
return feed.anchorContact.liveCoverImgUrl;
}
if (feed.objectDesc) {
return feed.objectDesc.media[0]?.coverUrl;
}
return "";
})(),
contact: (() => {
if (feed.anchorContact) {
return {
id: feed.anchorContact.username,
avatar_url: feed.anchorContact.headUrl,
nickname: feed.anchorContact.nickname,
};
}
return {
id: feed.contact.username,
nickname: feed.contact.nickname,
avatar_url: feed.contact.headUrl,
};
})(),
};
}
if (!feed.objectDesc) {
@@ -283,7 +300,7 @@ var WXU = (() => {
params.author = profile.contact.nickname;
}
if (spec) {
var matched = profile.spec.find((item) => item.fileFormat === spec);
var matched = profile.spec?.find((item) => item.fileFormat === spec);
if (matched) {
params.spec = matched.fileFormat;
}
-2
View File
@@ -3,7 +3,6 @@
package platform
import (
"fmt"
"os"
"runtime"
"syscall"
@@ -24,7 +23,6 @@ func is_admin() bool {
}
func need_admin_permission() bool {
args := os.Args[1:]
fmt.Println(args)
if len(args) == 0 {
return true
}