Refactor custom video upload to improve magnet handling and UX

This commit is contained in:
google-labs-jules[bot] committed 2026-01-08 02:23:28 +00:00
1 parent ade3e7a6bd
commit f0f3bb4b3b
3 files changed
+29 -11

No files matched your search

+9 -1
View File
@@ -379,8 +379,16 @@ export function normalizeVideoNotePayload(input) {
}
if (legacyFormData.magnet) {
const wsList = [];
if (ws) {
wsList.push(ws);
}
if (legacyFormData.url && /^https?:\/\//i.test(legacyFormData.url)) {
wsList.push(legacyFormData.url);
}
const normalizedMagnet = normalizeAndAugmentMagnet(legacyFormData.magnet, {
ws,
ws: wsList,
xs,
});
legacyFormData.magnet = normalizedMagnet;