Commit Graph

9 Commits

Author SHA1 Message Date
Bjarne Øverli 8dad762349 fix: support go install module path 2026-07-05 13:59:18 +02:00
Nicholas Zambetti a1ba57cbc2 Standardize scrolling and expanded height for all overlays (#233)
Release / build (amd64, darwin, macos-latest) (push) Has been cancelled
Release / build (amd64, linux, ubuntu-latest) (push) Has been cancelled
Release / build (amd64, windows, windows-latest) (push) Has been cancelled
Release / build (arm64, darwin, macos-latest) (push) Has been cancelled
Release / build (arm64, linux, ubuntu-latest) (push) Has been cancelled
Release / release (push) Has been cancelled
Release / update-homebrew (push) Has been cancelled
* Implement stateful windowed scrolling for all overlays

* Add Ctrl+X support to toggle expanded height in all overlays

* Remove ctrl+k helpkey from Search Overlay so it is consistent with others

* Remove now-unused stateless scrollStart helper

* Re-clamp queue scroll after movement or deletion

* Fix unreachable ctrl+x handler in provider search

* Fix device picker list scroll wrap for empty lists
2026-05-16 19:33:54 +02:00
Zander 41356e44ab Add NetEase Cloud Music provider (#222)
* netease: add provider

* netease: address review feedback

---------

Co-authored-by: bjarneo <bjarneo@users.noreply.github.com>
2026-05-09 18:14:16 +02:00
tallsam 620d1b20f8 Add Emby provider (#207)
* Add Emby provider

Adds a new provider for Emby Media Server, mirroring the Jellyfin
provider but with Emby-specific API behaviour:

- Authorization header uses the 'Emby' scheme (Jellyfin uses 'MediaBrowser')
- Ping uses GET /System/Info — Emby API keys are server-level and return
  500 on /Users/Me, which Jellyfin's Ping calls
- UserID() falls back from /Users/Me to GET /Users for API key auth,
  preferring a user whose name matches the configured username
- Full test coverage: client (MusicLibraries, Albums, Tracks, StreamURL,
  password auth, NowPlaying, Scrobble, Ping, API key user fallback) and
  provider (Name, Playlists, Tracks, CanReportPlayback)

Also adds:
- 'E' keybinding to switch to Emby from anywhere in the UI
- cliamp setup wizard support (token / username+password picker)
- [emby] config section with same fields as [jellyfin]
- docs/emby.md, updates to docs/cli.md, docs/configuration.md,
  docs/keybindings.md, config.toml.example, and site/index.html

* Address CodeRabbit review: emby provider fixes

- postJSON: wrap json.Marshal error with path context
- UserID: return explicit error when configured user name not found in /Users
- AlbumList: clamp negative offset to 0
- Playlists: return copy of cache slice to prevent external mutation
- setup.go: wrap Emby ping error with "emby: validation:" prefix
- docs/emby.md: fix Quick start blurb (references /System/Info, not /Users/Me)
- site/index.html: add E key to Provider Browser quick-switch row

* Convert new Emby tests to table-driven style

* Wrap all bare errors in client.go with operation context

* Wrap provider-level browse errors with operation context

* Clarify that 'user' affects API key auth as well as password login

* Add optional username field to Emby API key setup mode

* Fix Emby empty-state hint to cover both auth modes

* Tweak Emby empty-state hint wording

* Fix Emby empty-state hint wording

* Return defensive copies from Playlists/Tracks cache; fix docs em dash

* Add emby to --provider flag valid values

* emby: drop double-prefixed errors and align cache returns with Jellyfin

Provider methods were wrapping client errors with `fmt.Errorf("emby: <op>: %w", err)`,
but client.go already prefixes every error with `emby: <path>:`. End-users saw
messages like `emby: artists: emby: /Items: http status 401`. Drop the redundant
package prefix from provider.go; keep the operation context.

Also drop the per-call defensive copies (`copyTracks`, the playlist slice
clone). The existing Jellyfin provider — which shares this same caching shape —
returns cached slices and maps directly, and no consumer in ui/model/ mutates
the returned tracks. Aliasing through `ProviderMeta` is theoretically possible
but would be a caller bug to fix at the caller, not papered over per-provider.
Aligning Emby with the Jellyfin pattern keeps the two providers behaviorally
identical and removes per-fetch allocations.

---------

Co-authored-by: Sam Hassell <yeehah@protonmail.com>
Co-authored-by: bjarneo <bjarneo@users.noreply.github.com>
Co-authored-by: Bjarne Øverli <bjarne.oeverli@gmail.com>
2026-05-05 18:09:42 +02:00
Bjarne Øverli 3b2f57aac4 Improve provider playlists/song views
Provider playlists pane:
- Mark the currently loaded playlist with a ▶ prefix and active style
- Group rows under section headers when providers populate Section;
  Spotify now buckets playlists into Library / Your playlists / Followed
- Refresh with Ctrl+R; status message confirms
- Empty state names the provider and offers a remediation hint
- Show 'Name · 12 tracks · 1h 23m' on rows when data is available

Provider browser overlay (N):
- Right-aligned per-track durations and a 'N tracks · 47:22' subtitle
- Move the / filter input under the title (matches keymap overlay)
- Cursor wraps top↔bottom on every screen
- Clearer help labels: Play from here / Queue this / Replace queue / Append all

Cross-cutting:
- Replace 'Loading X...' text with a time-driven braille-dot spinner
  used everywhere a list is loading
- Quick-switch (S/N/P/J/Y/L/R) now works from inside the nav browser
  and the playlist manager, not just the main pane
2026-05-04 18:40:47 +02:00
zambetti 50e8c3493f Feature: Responsive Height (#157)
Release / build (amd64, darwin, macos-latest) (push) Has been cancelled
Release / build (amd64, linux, ubuntu-latest) (push) Has been cancelled
Release / build (amd64, windows, windows-latest) (push) Has been cancelled
Release / build (arm64, darwin, macos-latest) (push) Has been cancelled
Release / build (arm64, linux, ubuntu-latest) (push) Has been cancelled
Release / release (push) Has been cancelled
Release / update-homebrew (push) Has been cancelled
* Merge responsive height feature

* Inline some single use helpers

* Simplify responsive height: remove dead code, deduplicate helpers

- Remove unused renderedLineCount() and defaultPlVisible()
- Fix space key representation to match bubbletea v2 convention
- Replace rowsFrom closure with existing providerRowsFromScroll()
- Extract applyHeightMode() to unify repeated height expansion logic
- Extract resetProviderNav() to deduplicate provider state resets
- Cache fbVisible()/providerScrollStep() to avoid redundant probe renders

---------

Co-authored-by: Bjarne Øverli <bjarne.oeverli@gmail.com>
2026-04-04 20:48:00 +02:00
Gjermund Garaba b6deffe92b chore(deps): bump to charm.land v2 dependencies (#161)
Co-authored-by: bjarneo <bjarneo@users.noreply.github.com>
2026-04-02 15:49:51 +02:00
laamalif 7abf6f740c Add Jellyfin provider and shared media-server browser support (#155)
Co-authored-by: Bjarne Øverli <bjarne.oeverli@gmail.com>
2026-03-30 17:15:03 +02:00
Bjarne Øverli 77cac44689 Split the model into smaller files 2026-03-30 16:52:25 +02:00