Zingabopp / BeatSync

Beat Saber plugin to automatically download beatmaps.
Other
247 stars 22 forks source link

BeatSaver API Change (BeatSync Not Working) #45

Closed Zingabopp closed 3 years ago

Zingabopp commented 3 years ago

As announced in the Beat Saber Modding Group Discord server on Aug. 2nd, 2021, ownership of Beat Saver has been changed from the Jellyfish to Top_Cat. Along with the handover, there were some major changes to the site and API. This is a breaking change for anything using Beat Saver. I will hopefully have an update to accommodate these changes soon.

Tommy2678 commented 3 years ago

Hello! I just got Beat Saber for steam right when this all happened, the servers are now up and working 😄
I had it on quest before and was looking for something that was like the thing in BMBF and found this! I can't wait to see if it works after the updates, thank you so much! :D

Tommy2678 commented 3 years ago

Hey, has the update come out yet?

Zingabopp commented 3 years ago

It's unpolished, but the latest build should be working (Beat Saver Hot and Downloads feeds must be disabled in the config because they don't exist anymore) https://github.com/Zingabopp/BeatSync/actions

Tommy2678 commented 3 years ago

Warn @ 2021-08-10 15:47:23 | BeatSyncLib]: Error in DownloadJob.RunAsync: The remote server returned an error: (404) Not Found.

that's all that happens, even if i disable it

kinect360 commented 3 years ago

I'm getting the same error as tommy, just tried updating my files today.

Epidilius commented 3 years ago

Is there a way to get bookmarks working again? I pulled latest and rebuilt, and get "600/600 Skipped" for my bookmarks.

Zingabopp commented 3 years ago

For the 404 errors, try the latest build. Before it was using the beatmaps.io domain and it seems the redirect wasn't playing nice.

rusozoll commented 3 years ago

@Epidilius I don't know that it is the 'right' or even recommended way, but when I need to reset, I delete the history file.

steamapps\common\Beat Saber\UserData\BeatSyncHistory.json

Note: The last time I did that I had to rebuild my config file, but the time before that I didn't... I'm not sure what the expected response is, but you should probably make a copy of that just in case.

Zingabopp commented 3 years ago

@Epidilius I don't know that it is the 'right' or even recommended way, but when I need to reset, I delete the history file.

steamapps\common\Beat Saber\UserData\BeatSyncHistory.json

Note: The last time I did that I had to rebuild my config file, but the time before that I didn't... I'm not sure what the expected response is, but you should probably make a copy of that just in case.

This. Bookmarks are working fine for me, if songs were skipped that means they're in your history as previously downloaded, you already have those songs, or there was an error downloading (each song's error would be in the log).

Edit: 404 errors when downloading would probably cause them to be skipped without a logged error due to the history file. It was meant to not repeatedly try to download deleted songs.

Tommy2678 commented 3 years ago

beatsync inside bmbf doesn't work either. downloads playlists, sure, but no songs are actually downloaded. it's the same case when trying to download inside of beat saber on pc.

Tommy2678 commented 3 years ago

deleting history doesn't work either.

https://pastebin.com/RkBdJFcu

Zingabopp commented 3 years ago

BMBF's SyncSaber/BeatSync probably hasn't been updated yet. I haven't been involved in its development since its initial release.

Zingabopp commented 3 years ago

deleting history doesn't work either.

https://pastebin.com/RkBdJFcu

You're not using the latest build from https://github.com/Zingabopp/BeatSync/actions I haven't made an official release yet because I have some more polishing to do.

Tommy2678 commented 3 years ago

No clue how to download from there, just got it from releases.

Zingabopp commented 3 years ago

Just click the latest build and scroll down below all the build warnings (and be logged into GitHub).

Tommy2678 commented 3 years ago

https://pastebin.com/sjJS2pJN

Tommy2678 commented 3 years ago

still won't work

Epidilius commented 3 years ago

I got it to work. I commented out lines 57-61 of file DirectoryTarget.cs:

if (!entry.AllowRetry) { state = SongState.NotWanted; entry.Flag = HistoryFlag.Deleted; }

I am now downloading all 600+ of my bookmarked songs.

Zingabopp commented 3 years ago

Yeah, now you'll have to delete the history file to get rid of the 404s in it. I'll have to fix that for the release.

Tommy2678 commented 3 years ago

Alright, deleted the history file, gonna see how it works now, update ya when i'm done.

Tommy2678 commented 3 years ago

thanks for the live support hahah

rusozoll commented 3 years ago

For what it's worth, it's downloading my thousand-ish bookmarks now, no issues. Pulled the updated build, set up a new config, deleted the history. Nothing else.

Zingabopp commented 3 years ago

Nothing really changed except the BeatSaver API URLs, the BeatSaver feeds, and song detail structure. Everything else is the same.

simondebbarma commented 3 years ago

For what it's worth, it's downloading my thousand-ish bookmarks now, no issues. Pulled the updated build, set up a new config, deleted the history. Nothing else.

@rusozoll That did not work for me. Did you only delete steamapps\common\Beat Saber\UserData\BeatSyncHistory.json ?

partypalme commented 3 years ago

Hi, I'm getting a lot of RateLimit-Errors now. Is there some kind of API key involved?

[Warning @ 2021-08-12 19:59:36 | SongFeedReader]: Try 0: Rate limit exceeded on url, https://api.beatsaver.com/maps/hash/a8f0463483930857ce37519399cebab3c6a1fce7, retrying in 22 seconds

Zingabopp commented 3 years ago

Hi, I'm getting a lot of RateLimit-Errors now. Is there some kind of API key involved?

[Warning @ 2021-08-12 19:59:36 | SongFeedReader]: Try 0: Rate limit exceeded on url, https://api.beatsaver.com/maps/hash/a8f0463483930857ce37519399cebab3c6a1fce7, retrying in 22 seconds

I'm guessing it's my leftover code for old Beat Saver's rate limit. I had it trying to predict the rate limit, but new Beat Saver doesn't have rate limits (yet).

AsmodeusCruentus commented 3 years ago

Yeah, now you'll have to delete the history file to get rid of the 404s in it. I'll have to fix that for the release.

as of 16th of august, is there any news of an update? tried the recommened things in these comments, but even after deleting history and attempting to run again. still brings error 404 not found on a bunch of songs aswell giving me an error that the history files doesn't exist.

Not rushing at all, you take your time :D was just curious if there were any news :)

Halki-Y commented 3 years ago

Yeah, now you'll have to delete the history file to get rid of the 404s in it. I'll have to fix that for the release.

as of 16th of august, is there any news of an update? tried the recommened things in these comments, but even after deleting history and attempting to run again. still brings error 404 not found on a bunch of songs aswell giving me an error that the history files doesn't exist.

Not rushing at all, you take your time :D was just curious if there were any news :)

Hey mate, the artifact for the latest action (Submodule Update as of typing) is working for me. Just remember to delete only the songs that are 404'ing in the BeatSyncHistory.json, so just this part for each of the songs:

{
    "Key": "xyz",
    "Value": {
      "SongInfo": "abc",
      "Flag": "Downloaded",
      "Date": "2021-08-17T18:22:11.0582612+10:00"
    }
  },

Apologies if you have already tried that and I just repeated everything to you.

AsmodeusCruentus commented 3 years ago

Apologies if you have already tried that and I just repeated everything to you.

Thank you, I hadn't thought of downloading at the bottom of action, silly me, works flawlessly, Thank you for pointing it out even though it was written in the comments earlier, I clearly just missed it. Thank you!

Zingabopp commented 3 years ago

Beta release published in Releases. Any issues with the beta can be posted in their own Issue thread.