This repository has been archived by the owner on Nov 10, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
info_old.go
57 lines (47 loc) · 1.73 KB
/
info_old.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package types
import (
"github.com/lolPants/songe-converter/json"
)
// OldInfoJSON is the old beatmap info file
type OldInfoJSON struct {
Hash string `json:"-"`
AudioPath string `json:"-"`
NewAudioPath string `json:"-"`
SongName string `json:"songName"`
SongSubName string `json:"songSubName"`
AuthorName string `json:"authorName"`
Contributors []OldContributor `json:"contributors"`
BeatsPerMinute float64 `json:"beatsPerMinute"`
PreviewStartTime float64 `json:"previewStartTime"`
PreviewDuration float64 `json:"previewDuration"`
CoverImagePath string `json:"coverImagePath"`
EnvironmentName string `json:"environmentName"`
OneSaber bool `json:"oneSaber"`
CustomEnvironment string `json:"customEnvironment"`
CustomEnvironmentHash string `json:"customEnvironmentHash"`
DifficultyLevels []DifficultyLevel `json:"difficultyLevels"`
}
// Bytes Convert to byte array
func (i OldInfoJSON) Bytes() ([]byte, error) {
return json.MarshalPretty(i)
}
// OldContributor Old contributor info
type OldContributor struct {
Role string `json:"role"`
Name string `json:"name"`
IconPath string `json:"iconPath"`
}
// DifficultyLevel Old difficulty level
type DifficultyLevel struct {
Difficulty string `json:"difficulty"`
DifficultyRank int `json:"difficultyRank"`
AudioPath string `json:"audioPath"`
JSONPath string `json:"jsonPath"`
Offset int `json:"offset"`
OldOffset int `json:"oldOffset"`
ChromaToggle string `json:"chromaToggle"`
CustomColors bool `json:"customColors"`
Characteristic string `json:"characteristic"`
DifficultyLabel string `json:"difficultyLabel"`
DiffJSON *OldDifficultyJSON `json:"-"`
}