From 7ddf43158a436a4884af33b1c9df5756a690ea68 Mon Sep 17 00:00:00 2001 From: Vladimir Zagainov Date: Sun, 18 Oct 2026 09:17:29 +0300 Subject: [PATCH] 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. --- internal/monitor/monitor.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/monitor/monitor.go b/internal/monitor/monitor.go index b9b283d..4fccc36 100644 --- a/internal/monitor/monitor.go +++ b/internal/monitor/monitor.go @@ -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)