exebetche / vlsub

VLC extension to download subtitles from opensubtitles.org
1.35k stars 344 forks source link

moviebytesize error when searching by hast the 1st time #219

Open atroxix opened 6 years ago

atroxix commented 6 years ago

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.

raimondlume commented 5 years ago

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

asmolcic commented 5 years ago

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

atroxix commented 5 years ago

Maybe you could create a pull request for this? 🙂

asmolcic commented 5 years ago

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. :)