Fixes#740 by preventing the slower connection from returning a value via goroutine.
This prevent the 401 auth errors that break loading data from the api after the first connection.
Extend MediaItemMetadata with TrackNumber, Size, BitRate, SampleRate,
BitDepth, and ChannelCount (all already present on Track) and populate
them in Track.Metadata(). Thread them through dlnaplayer.go into the
avtransport.MediaItem so the renderer's DIDL-Lite includes upnp:artist,
upnp:album, upnp:originalTrackNumber, plus <res> attributes for
duration, size, bitrate, sampleFrequency, bitsPerSample, and
nrAudioChannels. The previously dropped Duration field is now
populated too.
For cover art, add a CoverArtPathFn callback on PlaybackManager wired
to ImageManager.GetCoverArtPath in app.go. The DLNA player invokes it
when a track is queued, registers the cached cover-thumbnail path
with the local proxy, and emits the resulting proxy URL as
upnp:albumArtURI so the renderer can display album art alongside the
audio.
Bumps go-upnpcast to pull in the MediaItem fields and DIDL-Lite
emission added in supersonic-app/go-upnpcast#4.
Instead of play → pause → sleep → seek when restoring a paused session,
introduce loadTrackPaused which sets internal state and fires UI/OS
callbacks (song change, paused) without touching MPV. On Continue(),
detect pendingLoadPaused and start MPV playback from the saved position.
Also triggers waveform pre-generation for the paused track via the
onBeforeSongChange hook.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Fix#304: normalize server URLs before connecting
Prepend http:// when no scheme is present and strip trailing slashes
for all server types. For Jellyfin, additionally strip /web/index.html
and /web path suffixes that users copy from the browser URL bar.
Normalization is applied in ServerManager.connect() on the by-value
parameter, so stored config is never mutated.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* move url normalize funcs
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* Add -reload-theme CLI flag to re-apply theme via IPC
Sends a reload-theme IPC message to a running instance, causing it to
call fyne.CurrentApp().Settings().SetTheme(m.theme). Follows the same
callback pattern as -show (OnReactivate) and quit (OnExit).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* actually re-read theme file
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
- Format Go files (gofmt) for backend/windows/notify*.go
- Add thread safety to Stopwatch with sync.Mutex
- Add comprehensive unit tests for Stopwatch with race detection
- Add godoc comments to ImageCache public APIs
- Improve IPC documentation with platform-specific socket path details
- Document portable mode TODO for future enhancement
- Add context cancellation to WidgetPool cleanup goroutine
- Properly stop ticker when context is canceled
- Add BackgroundContext() getter method to App for context access
- Pass application context to NewWidgetPool for lifecycle management
This fixes a resource leak where the cleanup goroutine would run
indefinitely without any way to stop it, preventing proper cleanup
on application shutdown.
- Replace sleep-based polling in waveform generation with channel-based
synchronization to reduce CPU usage and improve responsiveness
- Add sync.Pool for audio buffers in waveform analysis to reduce memory
allocations
- Fix critical bug in ImageCache where struct field updates were not
being persisted to the map, causing LRU tracking to fail
- Optimize ImageCache evictOne() to use single pass instead of two
separate iterations through all cache items
- Upgrade read locks to write locks in ImageCache Get methods to ensure
struct updates are properly saved