clapper icon indicating copy to clipboard operation
clapper copied to clipboard

Subtitle file drag and drop

Open peteruithoven opened this issue 1 year ago • 2 comments

Currently when dropping external subtitle files you get the following message.

Drop on title bar to play now or anywhere else to enqueue.

But this seems to attempts to play the file as a video file. When dragging it to the title bar you'll get a "Unplayable Content" warning. When dragging it elsewhere the file is added to the playlist (enqueue) and you'll get this warning when the current video finishes playing.

It's probably more complicated but it seems like some kind of smart exception is needed to threat subtitle files differently?

In the past Rofostar mentioned wanting to support drag and drop (D&D): https://github.com/Rafostar/clapper/issues/320#issuecomment-1296812946 but I noticed there was no issue to track this.

peteruithoven avatar Mar 06 '25 16:03 peteruithoven

It's probably more complicated but it seems like some kind of smart exception is needed to threat subtitle files differently?

Yes. Currently "file is file" so I just make an media item out of whatever you drop/open. We would need to check somehow file content (or at least file metadata/info) to know whether its video or not. This gets complicated as we might end up trying to read large video files before determining whether to put it in queue or use it as subtititles. Gets even more complicated (slower) if we treat web/online URIs the same.

Rafostar avatar Mar 06 '25 19:03 Rafostar

Even when the subtile is opened by the popup menu in the bottom right corner, it still shows "Unplayable Content" warning and stopped playing. Though you can start playing again and be able to see the subtitle, the warning remains.

Image

HaoliangXu avatar Jun 09 '25 15:06 HaoliangXu