Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable more agressive scrobble checking behavior #174

Merged
merged 4 commits into from
Jul 25, 2024

Conversation

FoxxMD
Copy link
Owner

@FoxxMD FoxxMD commented Jul 23, 2024

Changes to potentially address duplicate scrobble issues when client<-->source feedback loops occur #173

Force Scrobble Refresh

Update scrobble config options to enable refreshing upstream service existing scrobbles in MS on every scrobble so that MS guarantees it always has the latest existing scrobbles to check for dups.

Refresh Stale At

Force client to refresh scrobbled plays from upstream service if last refresh was at least X seconds ago

listenbrainz.json or another scrobble config

[
  {
    "name": "myScrobbler",
    "data": {
      // ...
    },
+    "options": {
+      "refreshStaleAfter": 5
+    }
  }
]

@FoxxMD FoxxMD added enhancement New feature or request safe to test trusted to build image labels Jul 23, 2024
* Move recentScrobbles and generic refresh logic into abstract class
* New abstract function for scrobbler children to implement to get scrobbler-specific play lists on refresh
* Implement shouldRefereshScrobble with logging for better insight into why or why not a scrobbler refreshed upstream scrobbles
…ess time

Use refreshStaleAfter to force refresh to user can configure the time.

Allows more nuanced refreshing behavior as well as always refresh (0 seconds)
@FoxxMD
Copy link
Owner Author

FoxxMD commented Jul 24, 2024

Added additional mechanisms to trigger an upstream scrobble refresh:

  • Refresh if scrobble date is older than newest upstream (may indicate stale upstream data)
  • Refresh if last refresh was more than refreshStaleAfter number of seconds ago

Added debug logging insight into refresh triggers -- when a client is about to scrobble it will see if it should refresh, if it needs to refresh it will log the reason why it is logging to DEBUG level.

Copy link
Contributor

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

To play around with this PR, pull an image:

  • foxxmd/multi-scrobbler:pr-174
  • foxxmd/multi-scrobbler:pr-174-alpine.

Images are available for x86_64 and ARM64.

Latest commit: e907892

@FoxxMD FoxxMD merged commit 3b430b9 into develop Jul 25, 2024
4 checks passed
@FoxxMD FoxxMD deleted the issue-173-scrobbler-improvement branch July 25, 2024 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request safe to test trusted to build image
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant