modified: app.py

modified:   templates/project_detail.html
	modified:   templates/projects.html
	modified:   versions/version.json
This commit is contained in:
SimolZimol
2026-01-07 01:46:24 +01:00
parent 13ea82a5ca
commit 7ecdde83cc
4 changed files with 180 additions and 27 deletions

27
app.py
View File

@@ -24,18 +24,36 @@ def get_project_data(project_key, project_info):
elif 'velocity_compat' in project_info:
compat = project_info['velocity_compat'].get('stable', '')
# Determine display type
if project_type in ['minecraft', 'spigot', 'paper', 'bukkit']:
display_type = 'Minecraft Plugin'
elif project_type == 'velocity':
display_type = 'Velocity Plugin'
elif project_type == 'discord':
display_type = 'Discord Bot'
else:
display_type = project_type.title()
# Get project status (global project status, not version status)
project_status = project_info.get('project_status', 'active')
# Get version info (prefer beta if specified, otherwise stable)
stable_version = project_info.get('stable', 'N/A')
beta_version = project_info.get('beta')
# Build project dict
return {
'id': project_key,
'name': project_info.get('name', project_key.title()),
'tagline': project_info.get('tagline', ''),
'type': project_type.title() + ' Plugin' if project_type in ['minecraft', 'velocity'] else 'Discord Bot',
'type': display_type,
'description': project_info.get('description', ''),
'long_description': project_info.get('long_description', ''),
'icon': project_info.get('icon', 'fas fa-cube'),
'color': project_type,
'status': project_info.get('status', {}).get('stable', 'active').title(),
'version': project_info.get('stable', 'N/A'),
'status': project_status.title(),
'version': stable_version,
'beta_version': beta_version,
'compatibility': compat,
'server_types': project_info.get('server_types', []),
'technologies': project_info.get('technologies', []),
@@ -44,7 +62,8 @@ def get_project_data(project_key, project_info):
'installation': project_info.get('installation', []),
'technical_highlights': project_info.get('technical_highlights', []),
'links': project_info.get('links', {}),
'downloads': project_info.get('stats', {}).get('downloads', 'Available'),
'download': project_info.get('download', {}),
'downloads': project_info.get('stats', {}).get('downloads', 0) if project_info.get('stats', {}).get('downloads') else None,
'users': None,
'url': f'/projects/{project_key}'
}