Hi Bryan, thanks for your observations. They pointed me to at least one bug and one improvement.
First of all (although this most probably was not the case you encountered), when you select "Upload tapes to server" from the setup menu while having the score server disabled in the setup menu at the same time, the program tries to upload tapes and fails after a timeout (because the score server is disabled). (Running into a timeout while knowing that the server is disabled is pretty stupid, of course, but this part of the code did not assume that this situation could occur.)
This is fixed now: When explicitly asking to upload tapes to the server, it is now ensured that the score server is enabled.
But most probably you already had the score server enabled, as the program apparently was able to upload at least a few tapes to the server before failing to completely upload all other tapes for whatever reason. This case should already be handled more or less gracefully: The program uploads whatever tape it can, marks them as "uploaded" (not per single tape, but per level set, if upload was completed for all tapes for that level set) and goes on or maybe fails. If it fails, the next attempt will continue uploading those tapes that were not uploaded with the previous attempt (potentially uploading tapes repeatedly from a level set that was not completed in the previous attempt).
That way, even with a bad network connection, one should be able to upload all remaining tapes in several upload attempts, if needed. (As the program uploads all tapes sequentially, waiting for each upload to be completed before uploading the next one, flooding the score server with too many pending upload connections should usually not happen.)
It then puts the menu back at the main menu, instead of the "MAIN MENU > SETUP > GAME & MENU > UPLOAD TAPES TO SERVER" menu where I was.
That behavior could indeed be discussed. Currently the program always returns to the main menu after uploading tapes (be it successful or not).
One time I also got this in the terminal.
[ERROR] server failed to handle request: 400 Bad Request
Yes, I can see two of these errors in the web servers log file (less than an hour before you posted), but this HTTP response code apparently came directly from the web server, not from the API server web application (which answers certain requests with HTTP response codes like 403 or 404, but not 400). I assume that they were caused by incomplete requests due to the same reason that caused the timeouts.
Is it trying to upload the correct levels?
Yes, it does. It does not try to upload tapes from level sets that have already been successfully uploaded. Also see above.
Is it uploading the whole levelset even if some tapes of the levelset are already on server?
Yes, that's right. As only completed tape folders for whole level sets are marked as "uploaded", some tapes may be uploaded again if the upload failed while uploading a series of tapes for one specific level set.
Looks like in finally finished this time...
Great! So it worked as described, completing the upload of all tapes in several attempts, if needed.
There isn't a UPLOAD TAPES TO SERVER option any more, perhaps instead of disappearing the UPLOAD TAPES TO SERVER option*, it could say NO TAPES NEEDED TO BE UPLOADED. (Although it would be awkward in menu though, ideas for better way?)
Yes, I also thought about this, and decided to hide this menu entry if there are no tapes that can be uploaded.
*disappearing makes it so people that knows it exists, can get frustrated in looking for it, and for those that don't know it's on option remain longer at not knowing it's an option.
The program should always tell you (using a dialog) if tapes can be uploaded from the setup menu, usually as a result of the user clicking "no" when offered to upload tapes that can be uploaded.