exebetche/vlsub

moviebytesize error when searching by hast the 1st time

atroxix opened this issue · 4 comments

With version 0.11.0 I always get this error when searching by hash the first time:

Error: code '408 Invalid parameters; moviebytesize is not number' (200)

However, when searching by name first and then searching by hash, then it works.

+1 for this, found no other information anywhere for this error.
VLSub version 0.11.0, VLC version 3.0.6

I changed "double" to "long" in this part of the code and it works:
{ name="moviebytesize", value={
double=openSub.file.bytesize } }

Maybe you could create a pull request for this? 🙂

But I shouldn't! I was actually using the version from user Timic3 whose pull request has not yet been merged. Also, I don't know lua, I just guessed what was the problem, tried it, and it worked for me. One should not contribute if he doesn't know what is he doing. :)
Maybe a better solution would be "string" instead of "long"? Also, as it seems to me, the "double" type should have never worked for anyone. Maybe it has something to do with my lua installation, or with my Linux, or maybe OpenSubtitles changed something!?
If you don't know how to implement my fix, here's some info for Linux: download the vlsub.lua file from this repository, and put it in the directory (create if doesn't exist) "/home/(user)/.local/share/vlc/lua/extensions/". Then change the line I mentioned, and restart VLC. You will probably have two VLsub plugins but you'll manage. :)