Skip to content

Decouple providers behind capability interfaces - #154

Merged
bjarneo merged 6 commits into
mainfrom
pluggable-providers
Mar 30, 2026
Merged

bjarneo merged 6 commits into
mainfrom
pluggable-providers

Conversation

@bjarneo

@bjarneo bjarneo commented Mar 30, 2026 •

Copy link
Copy Markdown
Owner

Decouple all providers from the UI and player packages behind
capability interfaces, so new providers can be added by implementing
the right interfaces in external// and registering in main.go.

  • Add provider/ package with optional capability interfaces
    (Searcher, ArtistBrowser, AlbumBrowser, AlbumTrackLoader,
    Scrobbler, PlaylistWriter, PlaylistCreator, PlaylistDeleter,
    CustomStreamer, FavoriteToggler, CatalogLoader, CatalogSearcher,
    SectionedList, Closer)
  • Replace Track.NavidromeID with generic ProviderMeta map
  • Replace hardcoded spotify:/Subsonic URL checks in player with
    a registry-based scheme and URL matcher system
  • Refactor browse and search overlays to use capability interfaces
    via type assertions — zero external/ imports remain in ui/
  • Remove spotifyProvider, navClient, and navScrobbleEnabled from
    the UI Model; scrobbling now uses the Scrobbler interface
  • Add compile-time interface checks for all providers
  • Plex gains SearchTracks and AlbumTracks capabilities
  • Local gains PlaylistWriter capability
  • Radio catalog loading, search, favorites, and section headers
    all go through generic interfaces
  • Add docs/provider-development.md

@bjarneo
bjarneo merged commit d09af49 into main Mar 30, 2026
@bjarneo
bjarneo deleted the pluggable-providers branch March 30, 2026 14:08
bjarneo added a commit that referenced this pull request Mar 30, 2026
Resolve all merge conflicts from the model split (ui/model.go → ui/model/*.go)
and provider interface refactoring (#154). Key changes:

- Replace Scrobbler interface with PlaybackReporter (supports multi-provider
  track ownership via CanReportPlayback)
- Add AlbumSortSaver and DefaultAlbumSort() to decouple sort persistence
- Rename AlbumInfo.SongCount → TrackCount for provider-neutral naming
- Add MetaJellyfinID constant and NavidromeConfig.ScrobbleEnabled() helper
- Port all PR changes into the split ui/model/ file structure
hamdouni pushed a commit to CodeCadim/audio that referenced this pull request Nov 26, 2026
* Decouple providers behind capability interfaces

* Add docs to provider vel

* Simplify, refactor and remove dead code

* Completely decouple from the ui

* Simplify

* Dead code cleanup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant