Closed abma closed 3 years ago
Allowing users to upload their own sdz with the same title as a rapid archive has the potential to break the sync/hash checks, in real cases and when the archives were zipped differently.
Imo better that rapid autouploads its own sdz to SF for major game releases (only) and users are disallowed to upload sdz for stuff on rapid.
the .sdz should be only mapped when the spring hash is the same...
updating a file by filename or "spring name" (=name + version) is not possible and shouldn't be possible, if fully agree.
currently only missing is, to update the filename / download mirror here:
https://github.com/spring/upq/blob/master/jobs/extract_metadata.py#L143
auto uploading .sdz requires to many disk space, thats why it isn't made.
the latest versions for each game that are available on rapid are hidden on the api, they only show up if the user types the exact string (e.g.: "Metal Factions v1.50" for metal factions 1.50)
the file is shown as 0 bytes, "not available as sdz" and the metadata is incomplete
atm one is unable to upload an sdz for a game to fix this. if i try to upload, i get this
symlinking /tmp/springfiles-upload/metalfactions-v1.50.sdz /home/upq/upq/tmp/tmp739ab8fw/games/metalfactions-v1.50.sdz using unitsync version 100 SDP 9055e2dd3084b874e9ea6add297a8c19 Extracting data from metalfactions-v1.50.sdz Reading bitmaps/loadpictures/loadscreen1.jpg Wrote /home/upq/upq/metadata/d8e521b2a24ef384255734e73d0dfe14.jpg {'Type': 'game', 'Description': 'Metal Factions', 'Units': [{'UnitName': 'aven_ace', 'FullUnitName': 'Ace'}, {'UnitName': (...)['d8e521b2a24ef384255734e73d0dfe14.jpg']} Updated game 'Metal Factions' version 'v1.50' sdp '9055e2dd3084b874e9ea6add297a8c19' in the mirror-system File doesn't exist: /tmp/springfiles-upload/metalfactions-v1.50.sdz b'GetPrimaryModDescription: deprecated unitsync function called: GetPrimaryModDescription'
even if you don't want people to upload every sdz directly, the metadata (namely the date) should be fixed and the link to the available sdzs on the repos.springrts.com should be presented
(the files in "builds" are still ignored, but thats part of maybe #72)
https://springfiles.com/spring/games/metal-factions-39
->
https://api.springfiles.com/?springname=Metal+Factions+v1.44