Multi-platform: support multiple files per version #201

Merged
Oleg-Komarov merged 43 commits from multi-os into main 2024-07-09 16:27:46 +02:00
Showing only changes of commit 050ba772d7 - Show all commits

View File

@ -814,7 +814,9 @@ class Version(CreatedModifiedMixin, TrackChangesMixin, models.Model):
} }
if self.blender_version_max: if self.blender_version_max:
params['blender_version_max'] = self.blender_version_max params['blender_version_max'] = self.blender_version_max
if platforms := self.platforms.all(): if platform:
params['platforms'] = platform
elif platforms := self.platforms.all():
params['platforms'] = ','.join([p.slug for p in platforms]) params['platforms'] = ','.join([p.slug for p in platforms])
query_string = urlencode(params) query_string = urlencode(params)
download_url += f'?{query_string}' download_url += f'?{query_string}'