Skip to content

feat: Implement pagination fetching for component listen data#471

Merged
FoxxMD merged 35 commits intomasterfrom
componentPagination
Mar 12, 2026
Merged

feat: Implement pagination fetching for component listen data#471
FoxxMD merged 35 commits intomasterfrom
componentPagination

Conversation

@FoxxMD
Copy link
Copy Markdown
Owner

@FoxxMD FoxxMD commented Feb 12, 2026

Checklist before requesting a review

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Describe your changes

  • Implement interfaces for fetching paginated scrobble/listen results
    • Different interfaces for sources that paginate with a cursor and without (listenbrainz)
    • Implementation for all scrobblers sans rocksky/teal due to limitations of PDS querying (for now)
    • Implement for Spotify source
  • Implement generic pagination iteration utility and use this to replace interaction with listen fetching (normalized!)
  • Refactor refreshing for scrobblers to use time range based on queued scrobbles

Issue number and link, if applicable

@netlify
Copy link
Copy Markdown

netlify bot commented Feb 12, 2026

Deploy Preview for multi-scrobbler canceled.

Name Link
🔨 Latest commit d110dcb
🔍 Latest deploy log https://app.netlify.com/projects/multi-scrobbler/deploys/69b17419d1fe9e00087e0d84

@FoxxMD FoxxMD changed the title feat: Implement pagination fetching for feat: Implement pagination fetching for component listen data Feb 12, 2026
@FoxxMD FoxxMD added the safe to test trusted to build image label Feb 12, 2026
@FoxxMD FoxxMD force-pushed the componentPagination branch 3 times, most recently from 67c594f to 2288183 Compare February 27, 2026 17:00
@FoxxMD FoxxMD moved this from Backlog to In Progress in Multi-Scrobbler Roadmap Mar 4, 2026
@FoxxMD FoxxMD force-pushed the componentPagination branch from 2288183 to b6cd45f Compare March 4, 2026 17:21
@FoxxMD FoxxMD force-pushed the componentPagination branch from b6cd45f to 023579d Compare March 4, 2026 21:03
FoxxMD added 3 commits March 6, 2026 16:57
…ng for duplicate checks

* Remove design bias towards "recent" scrobbles with limited timerange and complex shouldRefresh logic
* Replace with logic to fetch scrobbles from timeranges that are relevant to queued/dead scrobbles
  * timeranges are grouped by closely timestamped queued scrobbles
  * timeranges are cached based on staleAfter
FoxxMD added 3 commits March 6, 2026 19:42
Use a limit/maxFetch upper limit to return a bulk of scrobbles by count, rather than timerange, so that backlogged scrobbles are less likely to cause many fetches on first startup
@FoxxMD FoxxMD marked this pull request as ready for review March 7, 2026 19:55
FoxxMD added 4 commits March 9, 2026 16:45
@FoxxMD FoxxMD mentioned this pull request Mar 9, 2026
6 tasks
FoxxMD added 10 commits March 9, 2026 18:39
…is known nowPlayingMode source

#477#issuecomment-4022857648
Scrobbler getScrobblesForTimeRange function isn't aware of the context and we only want now playing for the Source impl anyway.

Fixes not scrobbling play because it is also now playing which mathced existing scrobble logic.

#430 (comment)
Move most activity checks to TRACE log level to reduce noise at DEBUG level
* Use p-retry to standard retry behavior
* Simplify/remove other own-rolled retry logic
* Fix superagent request instantiation
  * Requests are mutable, cannot be retried once executed. Need to make a new request for each retry
* Check queue before adding so that previously cached or re-discovered plays from a source are not added multiple times to the queue (should only be unique plays)
* Add timestamp heuristic to dupe matching -- if score is *close* to matching and timestamp is *exact* then nudge it into a match
@github-actions
Copy link
Copy Markdown
Contributor

📦 A new release has been made for this pull request.

To play around with this PR, pull an image:

  • foxxmd/multi-scrobbler:pr-471

Images are available for x86_64 and ARM64.

Latest commit: d110dcb

@FoxxMD FoxxMD merged commit 68c46fe into master Mar 12, 2026
10 checks passed
@FoxxMD FoxxMD moved this from In Progress to Done in Multi-Scrobbler Roadmap Mar 16, 2026
@FoxxMD FoxxMD deleted the componentPagination branch March 31, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test trusted to build image

Projects

Development

Successfully merging this pull request may close these issues.

Bug: Backlogged Subsonic scrobbles not sent due to time cutoff

1 participant