supermedium / beatsaver-viewer

⚔️ Web-based viewer for Beat Saver maps, built with A-Frame and JavaScript.
https://supermedium.com/beatsaver-viewer/?id=811-535&difficulty=Expert
MIT License
192 stars 33 forks source link

Loading Local ZIP File Breaks #32

Closed ShrikeGames closed 5 years ago

ShrikeGames commented 5 years ago

Console errors produced: [WDS] Disconnected! ... TypeError: NetworkError when attempting to fetch resource.

It tries to get the API details from beatsaver.com but when it fails does not fall back correctly to the local ?zip parameter.

Since the API changes went in using the /?zip=song.zip parameter no longer works. I found a work-around by telling fetchData to just return fetchZip directly instead of doing the network call, and removing the "Already fetching" check of the fetchZip method.

This wouldn't affect most people, since it's probably not a highly used feature. I'm using it because I've been working on an auto-map generator (based on an audio file and peek times). It produces the zip with files and use beatsaver-viewer to quickly iterate and see results.

Thanks, I've been following your updates to this and really appreciate this tool!

ngokevin commented 5 years ago

Thanks! Yeah, I had to quickly update and forgot to test that part. I’ll patch it later today.

ngokevin commented 5 years ago

https://github.com/supermedium/beatsaver-viewer/commit/4c1940cfe9bf3903ba5c97462805c61ec8d9eccf