remove use of deprecated method

This commit is contained in:
dingedi 2022-09-17 08:45:59 +02:00
parent 7b7cd7768b
commit 13d792b6b6
No known key found for this signature in database
GPG key ID: EE23A12D271A3CED

View file

@ -21,7 +21,7 @@ def check_and_install_models(force=False, load_only_lang_codes=None):
package.update_package_index()
# Load available packages from local package index
available_packages = package.load_available_packages()
available_packages = package.get_available_packages()
print("Found %s models" % len(available_packages))
if load_only_lang_codes is not None:
@ -55,10 +55,10 @@ def check_and_install_models(force=False, load_only_lang_codes=None):
package.install_from_path(download_path)
# reload installed languages
app.language.languages = translate.load_installed_languages()
app.language.languages = translate.get_installed_languages()
print(
"Loaded support for %s languages (%s models total)!"
% (len(translate.load_installed_languages()), len(available_packages))
% (len(translate.get_installed_languages()), len(available_packages))
)