remove audio url

This commit is contained in:
2025-02-03 03:08:38 +01:00
parent 1c266a5d2e
commit 4e59bb1fd5
2 changed files with 0 additions and 4 deletions

View File

@@ -287,8 +287,6 @@ func scanSongs(rows *sql.Rows) ([]Song, error) {
return []Song{}, err return []Song{}, err
} }
s.Url = fmt.Sprintf("%s/%s", s.Folder, s.Audio)
bm, err := parser.ParseOsuFile(fmt.Sprintf("%sSongs/%s/%s", fileName, s.Folder, s.File)) bm, err := parser.ParseOsuFile(fmt.Sprintf("%sSongs/%s/%s", fileName, s.Folder, s.File))
if err != nil { if err != nil {
fmt.Println(err) fmt.Println(err)
@@ -310,7 +308,6 @@ func scanSong(row *sql.Row) (Song, error) {
if err := row.Scan(&s.BeatmapID, &s.MD5Hash, &s.Title, &s.Artist, &s.Creator, &s.Folder, &s.File, &s.Audio, &s.TotalTime); err != nil { if err := row.Scan(&s.BeatmapID, &s.MD5Hash, &s.Title, &s.Artist, &s.Creator, &s.Folder, &s.File, &s.Audio, &s.TotalTime); err != nil {
return Song{}, err return Song{}, err
} }
s.Url = fmt.Sprintf("%s/%s", s.Folder, s.Audio)
bm, err := parser.ParseOsuFile(fmt.Sprintf("%sSongs/%s/%s", fileName, s.Folder, s.File)) bm, err := parser.ParseOsuFile(fmt.Sprintf("%sSongs/%s/%s", fileName, s.Folder, s.File))
if err != nil { if err != nil {

View File

@@ -12,7 +12,6 @@ type Song struct {
File string `json:"file" example:"beatmap.osu"` File string `json:"file" example:"beatmap.osu"`
Audio string `json:"audio" example:"audio.mp3"` Audio string `json:"audio" example:"audio.mp3"`
TotalTime int64 `json:"total_time" example:"240"` TotalTime int64 `json:"total_time" example:"240"`
Url string `json:"url" example:"https://osu.ppy.sh/beatmaps/123456"`
Image string `json:"image" example:"cover.jpg"` Image string `json:"image" example:"cover.jpg"`
} }