mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-07 05:13:01 +00:00
Refactor custom video upload to improve magnet handling and UX
This commit is contained in:
1 parent
ade3e7a6bd
commit
f0f3bb4b3b
3 files changed
+29
-11
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user