-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
retriever.js uses path.match("zip$") and path.match("gz$") to find the file type.
if none of these are true then it assumes it's an SRT file, which is problematic since websites like opensubtitles uses links with extensions for example https://dl.opensubtitles.org/en/download/sub/9532844, which will be detected as an SRT while it's a ZIP file.
I suggest if non of the conditions are met then check the filetype from the response headers to determine the filetype.
another option that I am looking into is using the file-type npm module to detect the file type by checking the magic number of the read stream.
Metadata
Metadata
Assignees
Labels
No labels