byroot/ruby-osdb

Trying to save subtitle on wrong place when directory has same extension

mtrovo opened this issue · 2 comments

I'm trying to fetch subtitles for a path that looks like directory.avi/movie.avi and instead of saving the subtitle on directory.avi/movie.srt the application tries the path directory.srt/movie.srt, which doesn't exist on my machine and exits with an error.

Errno::ENOENT: No such file or directory @ rb_sysopen - directory.srt/movie.srt:
/home/mtrovo/.rvm/gems/ruby-2.2.0/gems/osdb-0.2.0/bin/getsub:149:in `initialize'
/home/mtrovo/.rvm/gems/ruby-2.2.0/gems/osdb-0.2.0/bin/getsub:149:in `open'
/home/mtrovo/.rvm/gems/ruby-2.2.0/gems/osdb-0.2.0/bin/getsub:149:in `download_sub!'
/home/mtrovo/.rvm/gems/ruby-2.2.0/gems/osdb-0.2.0/bin/getsub:63:in `block in run!'
/home/mtrovo/.rvm/gems/ruby-2.2.0/gems/osdb-0.2.0/bin/getsub:53:in `each'
/home/mtrovo/.rvm/gems/ruby-2.2.0/gems/osdb-0.2.0/bin/getsub:53:in `run!'
/home/mtrovo/.rvm/gems/ruby-2.2.0/gems/osdb-0.2.0/bin/getsub:157:in `<top (required)>'
/home/mtrovo/.rvm/gems/ruby-2.2.0/bin/getsub:23:in `load'
/home/mtrovo/.rvm/gems/ruby-2.2.0/bin/getsub:23:in `<main>'
/home/mtrovo/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `eval'
/home/mtrovo/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `<main>'

Closed by #24

A new version (0.2.1) have been released with the fix.