Skip to content

Commit

Permalink
track ugc handle & types
Browse files Browse the repository at this point in the history
  • Loading branch information
oklookat committed Jul 31, 2023
1 parent 68b581c commit a9eb8af
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
5 changes: 1 addition & 4 deletions schema/album.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type (
// Название альбома.
Title string `json:"title"`

// Мета тип (single, podcast, music, remix).
// Тип альбома.
MetaType AlbumMetaType `json:"metaType"`

// Год релиза.
Expand Down Expand Up @@ -68,9 +68,6 @@ type (
// ID лучших треков альбома.
Bests []ID `json:"bests"`

// например: "single".
Type string `json:"type"`

// Ремиксы, и прочее. Не пуст, например когда запрашивается альбом с треками.
Duplicates []Album `json:"duplicates"`

Expand Down
21 changes: 18 additions & 3 deletions schema/track.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,14 @@ type Track struct {
HasAvailableTextLyrics bool `json:"hasAvailableTextLyrics"`
} `json:"lyricsInfo"`

// OWN.
TrackSource string `json:"trackSource"`
AvailableAsRbt bool `json:"availableAsRbt"`
// Источник трека.
TrackSource TrackSource `json:"trackSource"`

// Если трек загружен пользователем,
// то здесь будет имя файла.
Filename *string `json:"filename"`

AvailableAsRbt bool `json:"availableAsRbt"`

// Трек 18+? (E)
Explicit bool `json:"explicit"`
Expand Down Expand Up @@ -235,3 +240,13 @@ func (l *TrackIdsRequestBody) SetIds(ids ...ID) {
l.TrackIds = []ID{}
l.TrackIds = append(l.TrackIds, ids...)
}

type TrackSource string

const (
// (?) Трек из библиотеки ЯМ.
TrackSourceOwn TrackSource = "OWN"

// Трек загружен пользователем.
TrackSourceUgc TrackSource = "UGC"
)

0 comments on commit a9eb8af

Please sign in to comment.