[vlc-devel] [PATCH 3/3] VLSub: Handle error when fetching translations list

Marvin Scholz epirat07 at gmail.com
Fri Feb 16 17:25:15 CET 2018


---
 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
 
-- 
2.14.3 (Apple Git-98)



More information about the vlc-devel mailing list