From: Hans-Christoph Steiner Date: Tue, 10 Oct 2017 10:29:04 +0000 (+0200) Subject: update: fix detection of Triple-T screenshots X-Git-Tag: 0.9~56^2~3 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=a4169484fdf67fb2644d3824227498cc75b6367e;p=fdroidserver.git 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 --- diff --git a/fdroidserver/update.py b/fdroidserver/update.py index 883526c1..a77417a6 100644 --- a/fdroidserver/update.py +++ b/fdroidserver/update.py @@ -717,15 +717,16 @@ def copy_triple_t_store_metadata(apps): base, extension = common.get_extension(f) 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': locale = segments[-3] else: 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) 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) shutil.copy(sourcefile, destfile)