fix: correct dragstart cancel method and release claimed filenames after download
- Use dataTransfer.effectAllowed='none' instead of preventDefault() for dragstart (preventDefault does not cancel dragstart events per HTML spec) - Clear claimedFilenames Set in processOneQueueItem finally block to prevent stale claims from blocking re-downloads of same VODs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
cf9d7b8334
commit
2b379e5e6a
@ -2895,6 +2895,8 @@ async function processOneQueueItem(item: QueueItem): Promise<void> {
|
||||
} finally {
|
||||
activeDownloads.delete(item.id);
|
||||
cancelledItemIds.delete(item.id);
|
||||
// Release any filenames claimed during this download (prevents stale claims blocking re-downloads)
|
||||
claimedFilenames.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -221,7 +221,10 @@ function initQueueDragDrop(): void {
|
||||
if (itemId) {
|
||||
const item = queue.find(i => i.id === itemId);
|
||||
if (!item || item.status !== 'pending') {
|
||||
e.preventDefault();
|
||||
if (e.dataTransfer) {
|
||||
e.dataTransfer.effectAllowed = 'none';
|
||||
e.dataTransfer.clearData();
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user