mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-25 01:02:19 +00:00
get_languages: add get_languages function
This commit is contained in:
parent
4db7ccea7d
commit
0a954e5a92
1 changed files with 7 additions and 0 deletions
|
@ -108,5 +108,12 @@ def alpha3_from_language(lang):
|
|||
return result
|
||||
|
||||
|
||||
def get_languages(kind="code2"):
|
||||
db = sqlite3.connect(os.path.join(args.config_dir, 'db', 'bazarr.db'), timeout=30)
|
||||
c = db.cursor()
|
||||
c.execute('''SELECT ?, name FROM table_settings_languages WHERE enabled = 1''', (kind,))
|
||||
return c.fetchall()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
load_language_in_db()
|
||||
|
|
Loading…
Reference in a new issue