Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making Cinema config available to the maps that don't originally have them #34

Open
symphonic643 opened this issue Aug 25, 2021 · 7 comments
Labels
enhancement New feature or request

Comments

@symphonic643
Copy link

Not a huge deal and may not even be something you can do or that many people want, but I'll throw this out there anyway.

I think it would be an interesting idea to be able to make our Cinema configs available for certain maps that don't have them when you originally download them. That is to say that it might be helpful for someone who has already synced a video properly to upload their config somewhere that would be able to be downloaded in-game, already configured. I have no problem doing the syncing myself, but I wonder if others feel that it's too much work to do that, and I'd be happy to contribute my own synced configurations.

@Kevga
Copy link
Owner

Kevga commented Aug 26, 2021

This would definitely be an awesome feature and I know there are quite a few people who want to make their configs available for everyone to use. However, there will undoubtedly also be malicious users submitting configs. That means the API would need user authentication, similar to how the BeatSaverVoting mod works. And even then, the submissions need to be reviewed somehow to filter out bad videos/wrong offsets, unless you limit config submission to only a few trusted users. It's a bit more work to set that up than I can handle at the moment, but I'd accept help if anyone wants to work on this. Maybe I'll also find some time for this myself in the future.

@Kevga Kevga added the enhancement New feature or request label Aug 26, 2021
@aftersomemath
Copy link

I would be happy to review PR's for a Github repo that contains maybe one file per song. I don't have the bandwidth to setup a website with authentication and the works, but I think a simple Github repo would go a long way.

From what I know about Cinema mode, this would require Cinema mode to somehow support a folder with a bunch of files with configurations. It would be great if it could automatically update those configurations from Github.

@Kevga
Copy link
Owner

Kevga commented Apr 30, 2022

Doing this via GitHub sounds like a good idea, would be easy to implement. A bit of brainstorming how this could look like:

The video config files should be named after the map hash so the download URL for the config can be derived from the map. The mod could then query the GitHub API once to get a directory listing of all available configs and match against that.

There could be a hidden setting that can be enabled by people who want to contribute, which would add a button that exports the selected config with the correct name for a PR to a subfolder in UserData. For the PR you would just add the exported configs to the cloned repo.

@aftersomemath
Copy link

I really like the idea of making it semi-simple for users to upload configurations. It would be great if users did not have to update an index file manually. If adding a song only requires adding a single file, users do not need to know how to use git. They can fork, upload the file, and submit the pull request entirely with Github's web UI. Also, merge conflicts are avoided by having a single file per hash. I'm not sure, but I feel this would strike a good balance that allows users to be "responsible submitters" without being "developers".

On the other hand, if there is no index file, then the entire repo needs to be downloaded to the user's computers so the "index file" can be generated from the list of available files in a folder.

If the example config is a typical example, then each configuration will consume 4KB of disk space (since the file is so small it consumes a minimum of 4KB). So if the repo grows to 100,000 songs it will consume 400MB of disk. This seems reasonable since I do not plan on approving 100k PR's anytime soon and 400MB of disk is not much compared to a beatsaber install. The download will be even smaller since the example's actual size is 742 bytes, and since it is text, it will compress well. So downloading the entire list should not be a problem.

@Kevga
Copy link
Owner

Kevga commented Apr 30, 2022

I scrapped the idea of an index file quickly after posting and edited my comment, sorry for the confusion. I believe the most sensible way would be to query the GitHub API for a directory listing, for example this repo's "Resources" folder looks like this: https://api.github.com/repos/Kevga/BeatSaberCinema/contents/Resources

@aftersomemath
Copy link

aftersomemath commented Apr 30, 2022

Perfect, that is a very nice API feature.

I did a little bit of digging to see if it would be possible to submit PR's directly from BeatSaber. Not sure if that would even be advisable, but it doesn't matter because the API docs say:

To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.

So I think that settles the issue, users will just have to PR manually after finishing a BeatSaber session.

@spychopat
Copy link

need this please x)
I was seaching for some master list to dump into my game, but can't find any :/
for many songs, i may not be aware there's a music video, or i may be too lazy to look it up and sync, not knowing if it will be worth it.
I would love to select a new song and see the cinema mod button :p
i would also love to share my config for my favorite songs, so more people can enjoy the music video too :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants