mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-08-17 00:18:41 -07:00
fix(overlay): support native Wayland file drag-and-drop (#199)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user