🪄 split screenshot ingestion into separate function

This commit is contained in:
Michael Pöhn 2024-02-02 14:08:27 +01:00 committed by Hans-Christoph Steiner
parent c1500e4ca1
commit c166a8a2b7
1 changed files with 3 additions and 0 deletions

View File

@ -1149,6 +1149,8 @@ def insert_localized_app_metadata(apps):
os.makedirs(screenshotdestdir, mode=0o755, exist_ok=True)
_strip_and_copy_image(f, screenshotdestdir)
def ingest_screenshots_from_repo_dir(apps):
repodirs = sorted(glob.glob(os.path.join('repo', '[A-Za-z]*', '[a-z][a-z]*')))
for d in repodirs:
if not os.path.isdir(d):
@ -2272,6 +2274,7 @@ def prepare_apps(apps, apks, repodir):
if repodir == 'repo':
insert_localized_app_metadata(apps_with_packages)
insert_localized_ios_app_metadata(apps_with_packages)
ingest_screenshots_from_repo_dir(apps_with_packages)
insert_missing_app_names_from_apks(apps_with_packages, apks)
return apps_with_packages