mirror of
https://github.com/yaronzz/Tidal-Media-Downloader.git
synced 2026-08-03 13:27:04 +03:00
fix #934
This commit is contained in:
@@ -59,15 +59,21 @@ class Language(object):
|
||||
def __init__(self) -> None:
|
||||
self.select = LangEnglish()
|
||||
|
||||
def __toInt__(self, str):
|
||||
try:
|
||||
return int(str)
|
||||
except:
|
||||
return 0
|
||||
|
||||
def setLang(self, index):
|
||||
index = int(index)
|
||||
index = self.__toInt__(index)
|
||||
if index >= 0 and index < len(_ALL_LANGUAGE_):
|
||||
self.select = _ALL_LANGUAGE_[index][1]
|
||||
else:
|
||||
self.select = LangEnglish()
|
||||
|
||||
def getLangName(self, index):
|
||||
index = int(index)
|
||||
index = self.__toInt__(index)
|
||||
if index >= 0 and index < len(_ALL_LANGUAGE_):
|
||||
return _ALL_LANGUAGE_[index][0]
|
||||
return ""
|
||||
|
||||
Reference in New Issue
Block a user