Fix artist page numbering for Yandex API
Start page numbering at 1 instead of 0 in checkArtistTracks and checkArtistAlbums. Yandex Music API rejects page=0 with 400 'Parameters requirements are not met'. GetArtistInfo works because it doesn't use pagination.
This commit is contained in:
1 parent
6ec39da5da
commit
ed6c26a3af
1 file changed
+2
-2
@@ -136,7 +136,7 @@ func (m *Monitor) checkArtist(ctx context.Context, artistID int) {
|
|||||||
|
|
||||||
// checkArtistTracks checks for new tracks from an artist
|
// checkArtistTracks checks for new tracks from an artist
|
||||||
func (m *Monitor) checkArtistTracks(ctx context.Context, artistID int, artistName string) {
|
func (m *Monitor) checkArtistTracks(ctx context.Context, artistID int, artistName string) {
|
||||||
page := 0
|
page := 1
|
||||||
pageSize := 50
|
pageSize := 50
|
||||||
|
|
||||||
for {
|
for {
|
||||||
@@ -174,7 +174,7 @@ func (m *Monitor) checkArtistTracks(ctx context.Context, artistID int, artistNam
|
|||||||
|
|
||||||
// checkArtistAlbums checks for new albums from an artist
|
// checkArtistAlbums checks for new albums from an artist
|
||||||
func (m *Monitor) checkArtistAlbums(ctx context.Context, artistID int, artistName string) {
|
func (m *Monitor) checkArtistAlbums(ctx context.Context, artistID int, artistName string) {
|
||||||
page := 0
|
page := 1
|
||||||
pageSize := 50
|
pageSize := 50
|
||||||
|
|
||||||
for {
|
for {
|
||||||
|
|||||||
Reference in new issue
Block a user