drop "featured tracks", not available anymore

This commit is contained in:
Laptop
2025-04-16 21:08:20 +03:00
parent 14b501d162
commit 4f6f6585cb
6 changed files with 6 additions and 56 deletions

View File

@@ -10,24 +10,6 @@ type Selection struct {
Items Paginated[*Playlist] `json:"items"` // ?? why
}
func GetFeaturedTracks(cid string, prefs cfg.Preferences, args string) (*Paginated[*Track], error) {
p := Paginated[*Track]{Next: "https://" + api + "/featured_tracks/top/all-music" + args}
// DO NOT UNFOLD
// dangerous
// seems to go in an infinite loop
err := p.Proceed(cid, false)
if err != nil {
return nil, err
}
for _, t := range p.Collection {
t.Fix(false, false)
t.Postfix(prefs, false)
}
return &p, nil
}
func GetSelections(cid string, prefs cfg.Preferences) (*Paginated[*Selection], error) {
// There is no pagination
p := Paginated[*Selection]{Next: "https://" + api + "/mixed-selections?limit=20"}