mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-06 11:00:13 +02:00
update: fix detection of Triple-T screenshots
* https://github.com/westnordost/StreetComplete/issues/489 * https://forum.f-droid.org/t/screenshots-dont-show-up-in-client-using-gradle-play-publisher/881/2 #357
This commit is contained in:
parent
b6067e6a1f
commit
a4169484fd
@ -717,15 +717,16 @@ def copy_triple_t_store_metadata(apps):
|
|||||||
|
|
||||||
base, extension = common.get_extension(f)
|
base, extension = common.get_extension(f)
|
||||||
dirname = os.path.basename(root)
|
dirname = os.path.basename(root)
|
||||||
if dirname in GRAPHIC_NAMES and extension in ALLOWED_EXTENSIONS:
|
if extension in ALLOWED_EXTENSIONS \
|
||||||
|
and (dirname in GRAPHIC_NAMES or dirname in SCREENSHOT_DIRS):
|
||||||
if segments[-2] == 'listing':
|
if segments[-2] == 'listing':
|
||||||
locale = segments[-3]
|
locale = segments[-3]
|
||||||
else:
|
else:
|
||||||
locale = segments[-2]
|
locale = segments[-2]
|
||||||
destdir = os.path.join('repo', packageName, locale)
|
destdir = os.path.join('repo', packageName, locale, dirname)
|
||||||
os.makedirs(destdir, mode=0o755, exist_ok=True)
|
os.makedirs(destdir, mode=0o755, exist_ok=True)
|
||||||
sourcefile = os.path.join(root, f)
|
sourcefile = os.path.join(root, f)
|
||||||
destfile = os.path.join(destdir, dirname + '.' + extension)
|
destfile = os.path.join(destdir, os.path.basename(f))
|
||||||
logging.debug('copying ' + sourcefile + ' ' + destfile)
|
logging.debug('copying ' + sourcefile + ' ' + destfile)
|
||||||
shutil.copy(sourcefile, destfile)
|
shutil.copy(sourcefile, destfile)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user