[vlc-commits] VLSub: Handle error when fetching translations list
Marvin Scholz
git at videolan.org
Wed Feb 21 21:23:39 CET 2018
vlc | branch: master | Marvin Scholz <epirat07 at gmail.com> | Fri Feb 16 17:25:15 2018 +0100| [9c2208569c2702f6292b1f7b8320a3b16b0d6088] | committer: Marvin Scholz
VLSub: Handle error when fetching translations list
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9c2208569c2702f6292b1f7b8320a3b16b0d6088
---
share/lua/extensions/VLSub.lua | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/share/lua/extensions/VLSub.lua b/share/lua/extensions/VLSub.lua
index 2ca4555f36..d82896f0d8 100644
--- a/share/lua/extensions/VLSub.lua
+++ b/share/lua/extensions/VLSub.lua
@@ -1082,8 +1082,15 @@ function get_available_translations()
then
openSub.actionLabel = lang["int_searching_transl"]
- local translations_content, lol = get(translations_url)
+ local translations_content, status, resp = get(translations_url)
local translations_avail = openSub.option.translations_avail
+
+ if translations_content == false then
+ -- Translation list download error
+ setMessage(error_tag(lang["mess_error"] .. " (" .. status .. ")"))
+ return
+ end
+
all_trsl = parse_xml(translations_content)
local lg, trsl
More information about the vlc-commits
mailing list