Fix handling of Triple-T 1.0.0 graphics

Unlike screenshots, the featureGraphic, icon, promoGraphic, and tvBanner
should be placed directly in the locale directory instead of in a
dedicated subdirectory (in the F-Droid metadata structure). For version
1.0.0 of the Triple-T structure this currently isn't done. Instead, the
graphics are treated as screenshots are.

To illustrate:

en-US/listing/icon/icon.png
en-US/listing/featureGraphic/play_store_feature_graphic.png

Should end up as:

en-US/icon.png
en-US/featureGraphic.png

But instead they currently end up as:

en-US/icon/icon.png
en-US/featureGraphic/play_store_feature_graphic.png

This patch should fix it.

It seems the erroneous behavior was introduced in
a4169484fdf67fb2644d3824227498cc75b6367e

Closes #1260
This commit is contained in:
Leo Heitmann Ruiz 2025-05-09 18:39:21 +02:00 committed by Hans-Christoph Steiner
parent 0a8f9ec5fc
commit ffd4274503

View File

@ -1114,6 +1114,9 @@ def copy_triple_t_store_metadata(apps):
repofilename = os.path.basename(f)
if segments[-2] == 'listing':
locale = segments[-3]
if dirname in GRAPHIC_NAMES:
repofilename = dirname + '.' + extension
dirname = ''
elif segments[-4] == 'listings': # v2.x
locale = segments[-3]
if dirname in tt_graphic_names: