fix(overlay): support native Wayland file drag-and-drop (#199)

This commit is contained in:
sudacode authored and GitHub committed 2026-08-15 00:15:38 -07:00
1 parent 7d729cb60c
commit 2174e689a2
6 files changed
+42 -5

No files matched your search

+5 -2
View File
@@ -899,8 +899,11 @@ function setupDragDropToMpvQueue(): void {
if (!event.dataTransfer) return;
event.preventDefault();
const droppedVideoPaths = collectDroppedVideoPaths(event.dataTransfer);
const droppedSubtitlePaths = collectDroppedSubtitlePaths(event.dataTransfer);
const resolvedFilePaths = Array.from(event.dataTransfer.files, (file) =>
window.electronAPI.getPathForFile(file),
);
const droppedVideoPaths = collectDroppedVideoPaths(event.dataTransfer, resolvedFilePaths);
const droppedSubtitlePaths = collectDroppedSubtitlePaths(event.dataTransfer, resolvedFilePaths);
const appendDroppedVideos = event.shiftKey;
const loadCommands = buildMpvLoadfileCommands(droppedVideoPaths, appendDroppedVideos);
const subtitleCommands = buildMpvSubtitleAddCommands(droppedSubtitlePaths);