vankasteelj / opensubtitles-api

nodejs opensubtitles.org api wrapper for downloading and uploading subtitles in multiple langs
110 stars 33 forks source link

Fixed unreachable code #46

Closed SubJunk closed 5 years ago

SubJunk commented 5 years ago

If !query is true, then !query.path is also true, so this is really checking for the existence of query

SubJunk commented 5 years ago

Thanks for the feedback, I've corrected that now.

I am also interested in the ability to pass the info like hash and bytesize, because the machine I want to use to access the OpenSubtitles API isn't the same one that has the video files. Would you be open to me contributing that change?

vankasteelj commented 5 years ago

I don't see why not, though it should not break the current version, so it should be something like:

identify(string) => identify({path: string})

And the optional identify({moviehash: string, moviebytesize: int}) is the only way to bypass "path"