Merge branch 'buymeacoffee' into 'master'

insert_funding_yml_donation_links: support buymeacoffee

See merge request fdroid/fdroidserver!1468
This commit is contained in:
Hans-Christoph Steiner 2024-04-10 09:25:59 +00:00
commit b53c498fcd
1 changed files with 14 additions and 1 deletions

View File

@ -855,7 +855,15 @@ def insert_funding_yml_donation_links(apps):
if 'open_collective' in data:
del data['open_collective']
# this tuple provides a preference ordering
for k in ('custom', 'github', 'patreon', 'community_bridge', 'ko_fi', 'issuehunt'):
for k in (
'custom',
'github',
'patreon',
'community_bridge',
'ko_fi',
'issuehunt',
'buy_me_a_coffee'
):
v = data.get(k)
if not v:
continue
@ -889,6 +897,11 @@ def insert_funding_yml_donation_links(apps):
if s:
app['Donate'] = 'https://patreon.com/' + s
break
elif k == 'buy_me_a_coffee':
s = sanitize_funding_yml_name(v)
if s:
app['Donate'] = 'https://www.buymeacoffee.com/' + s
break
def copy_triple_t_store_metadata(apps):