Increase pageSize to 500 for artist API calls
Fetch up to 500 tracks/albums per page instead of 50, reducing the number of API calls needed when checking artists with large discographies.
This commit is contained in:
1 parent
c228e7e2b7
commit
7ddf43158a
1 file changed
+2
-2
@@ -137,7 +137,7 @@ func (m *Monitor) checkArtist(ctx context.Context, artistID int) {
|
||||
// checkArtistTracks checks for new tracks from an artist
|
||||
func (m *Monitor) checkArtistTracks(ctx context.Context, artistID int, artistName string) {
|
||||
page := 0
|
||||
pageSize := 50
|
||||
pageSize := 500
|
||||
|
||||
for {
|
||||
tracks, err := m.yandexClient.GetArtistTracks(ctx, artistID, page, pageSize)
|
||||
@@ -175,7 +175,7 @@ func (m *Monitor) checkArtistTracks(ctx context.Context, artistID int, artistNam
|
||||
// checkArtistAlbums checks for new albums from an artist
|
||||
func (m *Monitor) checkArtistAlbums(ctx context.Context, artistID int, artistName string) {
|
||||
page := 0
|
||||
pageSize := 50
|
||||
pageSize := 500
|
||||
|
||||
for {
|
||||
albums, err := m.yandexClient.GetArtistAlbums(ctx, artistID, page, pageSize)
|
||||
|
||||
Reference in new issue
Block a user