elliotttate / beatsaver-laravel

Rewrite of beatsaver.com (https://github.com/beatsaver/beatsaver) using the laravel framework
https://discord.gg/8B44zqM
MIT License
39 stars 19 forks source link

Editing the Info.json to include extra metadata #27

Open jetbalsa opened 6 years ago

jetbalsa commented 6 years ago

A request has been made to add the following fields to the info.json when a upload happens

a direct link to the file/resources I suggest something like

- [source]
--[files]
---[zip] = Direct URL to download
---[dat] = Direct URL to download
--[art] = URL to Album Art
--[api] = url to direct api call 
Byorun commented 6 years ago

can you prepare a json file for one of the songs? just for me as reference for the content you expect

beatsaver commented 6 years ago
{
  "songName": "DOOM II - Opening to Hell",
  "songSubName": "(Remix by elguitarTom)",
  "authorName": "dawiddg",
  "beatsPerMinute": 121,
  "previewStartTime": 34,
  "previewDuration": 10,
  "coverImagePath": "cover.jpg",
  "source": [
    {
      "files": [
        {
          "zip": "https://beatsaver.com/download/6184-5709"
        }
      ],
      "art": "https://beatsaver.com/storage/songs/6184/6184-5709.jpg",
      "api": "https://beatsaver.com/api/songs/detail/6184-5709"
    }
  ],
  "environmentName": "TriangleEnvironment",
  "difficultyLevels": [
    {
      "difficulty": "Expert",
      "difficultyRank": 4,
      "audioPath": "DOOM II - Opening to Hell (Remix by elguitarTom).ogg",
      "jsonPath": "Expert.json",
      "offset": 0,
      "oldOffset": 0
    }
  ]
}
Byorun commented 6 years ago

please keep in mind if we need to change the api (e.g. /api/v2/ ) or image location that we have to edit all zip files (which will also change the hash (not for the song tho) of the file