Commit Graph
543 Commits
Author SHA1 Message Date
advplyr c6d0f0e8b5 Version bump v0.14.1-beta 2026-09-08 17:22:02 -05:00
epipenRX a09326b5b2 Pause instead of close playback on KEYCODE_MEDIA_STOP (#1913)
Car head units send KEYCODE_MEDIA_STOP when powering off, which was
calling closePlayback() and destroying the session entirely. This removed
the media notification from the shade and required manually reopening the
app to resume listening.

Change to pause() so the session and notification stay alive, matching
the behavior of YouTube, Plex, and Jellyfin. When the car powers back on
and sends KEYCODE_MEDIA_PLAY, playback resumes in the same session.
2026-09-07 17:41:37 -05:00
advplyr 1a290b4d07 Merge pull request #2000 from JorenVerbaandert/fix/playback-session-bug
Fix playback session bug
2026-09-07 17:32:42 -05:00
advplyr 79a925088f Merge pull request #2008 from huggenknubbel/cast-sleep-timer-volume
Let the sleep timer fade out on a cast device too
2026-09-07 17:13:49 -05:00
advplyr 2fc8735643 Merge pull request #2009 from huggenknubbel/cast-availability
Report receiver availability from the framework as well
2026-09-07 17:13:21 -05:00
advplyr 30c4fa7e16 Add try catch around scan download item 2026-09-06 18:11:49 -05:00
advplyr 71bd354bc7 Refactor token refresh to better handle types of failures and retries during download 2026-09-06 17:53:46 -05:00
advplyr e06ce4a868 Only clear refresh token and logout when refresh request explicitly rejects, prevents transient request errors from causing a logout 2026-09-06 17:16:36 -05:00
huggenknubbel 1cdf0a59b1 cast: report receiver availability from the framework as well
ChromecastListener has always implemented CastStateListener, but nothing
ever registered it. Whether a receiver was reported as available hung
entirely on the media router callback, which does not always fire - and
then the cast button never appears even though devices are there.

The framework's own signal is registered now and the current state is
reported straight away. It is not taken at face value in one direction:
the framework drops back to NO_DEVICES_AVAILABLE when a session ends,
because it stops discovering at that point, which would hide the button
right after someone stops casting. The devices the media router still
knows decide that case.

The listener is dropped again when the activity goes.
2026-09-03 08:15:20 +02:00
Nicholas Wallace 6560038495 Use actual file size from server it size does not match metadata 2026-09-02 13:30:04 -07:00
Nicholas Wallace 4b8abe7deb Refresh auth token on download 401 2026-09-02 10:39:15 -07:00
Nicholas Wallace d230b16d5e Restore fullname check 2026-09-02 10:37:59 -07:00
huggenknubbel 0e71eb0308 cast: let the sleep timer fade out on a cast device too
The sleep timer fades playback down to 10% over its last minute by setting the
player's volume. CastPlayer.setVolume was an empty stub and getVolume returned
zero, so while casting the fade did nothing at all.

Both now go through the media stream volume the Cast SDK offers. That is the
receiver's volume for this stream only: the device volume stays where the user
put it, and on a cast group the balance between its members is untouched,
because the receiver applies the stream volume to the group's output.
2026-08-30 23:38:27 +02:00
Nicholas Wallace d2196ce035 Add download complete to logs 2026-08-28 07:36:53 -07:00
Nicholas Wallace a100226a85 Add AbsLogger to download paths 2026-08-27 20:38:48 -07:00
Nicholas Wallace ba66869502 Remove unnecessary changes 2026-08-27 15:31:32 -07:00
Nicholas Wallace 02e3f3541f Simplify and revert Capacitor changes 2026-08-27 15:12:32 -07:00
Nicholas Wallace f25ff6344e Inline download resume policy 2026-08-27 15:12:04 -07:00
Nicholas Wallace c800ed727a Fix concurrent podcast download cover issue 2026-08-27 14:52:14 -07:00
Nicholas Wallace 7989607313 Retry from beginning of file on failure and restore 2026-08-27 13:26:51 -07:00
Nicholas Wallace 61c314a531 Initial download service startup fixes and range request fix 2026-08-27 13:08:46 -07:00
Joren Verbaandert a709e994a0 Fix playback session bug 2026-08-27 21:26:12 +02:00
advplyr 12025ab59a Version bump 0.14.0-beta 2026-08-04 17:26:09 -05:00
advplyrandadvplyr fe67a221ac Render a higher resolution cover in the Android notification background (#1917)
* Render a higher resolution bitmap in the notification background art

Previously only METADATA_KEY_ALBUM_ART_URI/ART_URI were set, leaving notification/lock-screen/Android Auto consumers to resolve the cover art themselves. Likely due to internal scaling, a lower quality bitmap was loaded.

This commit adds a shared resolveUriAsBitmap() helper (extracted from AbMediaDescriptionAdapter.kt) and uses it to:
  - Resolve and cache a bitmap on PlaybackSession once per
  session (synchronously for local covers, asynchronously for server covers), then set it on METADATA_KEY_ALBUM_ART/ART once available, falling back to the URI keys until it resolves.
  - Reuse the same helper in AbMediaDescriptionAdapter so the notification icon is resolved consistently.

  PlayerNotificationService tracks the resolution Job and cancels/replaces it on each new playback session, invalidating the media session metadata once the bitmap is ready.

* Remove the size override in Glide

The override was not needed. It wasn't in the original code, so I'll remove it for consistency.

* Update notification icon to reuse cover bitmap if already loaded on session

---------

Co-authored-by: advplyr <advplyr@protonmail.com>
2026-08-04 16:58:47 -05:00
advplyr f087cbed6f Update notification icon to reuse cover bitmap if already loaded on session 2026-08-04 16:57:00 -05:00
databoy2kanddataboy2k 9820db0ef6 fix(android-auto): run server connection check off the main thread (#1920)
Android Auto browsing could freeze and crash the app (phone app "closes",
Android Auto shows a generic connection error) whenever the Capacitor
webview had not yet established the server connection.

Root cause: onLoadChildren runs on the media browser service main thread.
It calls loadAndroidAutoItems -> checkSetValidServerConnectionConfig, which
used runBlocking to ping every saved server config and authorize the user.
That blocked the main thread on network I/O. Android Auto (plus Assistant)
re-request the browse root every ~2s, and every onGetRoot flags a reload
while disconnected, so the blocking work was triggered repeatedly and
re-entrantly, producing an ANR.

Changes:
- checkSetValidServerConnectionConfig now runs on a dedicated
  Dispatchers.IO scope instead of runBlocking, so pings/authorize never
  block the caller. The callback contract is unchanged; downstream Android
  Auto callbacks already ran off the main thread.
- loadAndroidAutoItems coalesces overlapping calls into a single in-flight
  load and fires all queued callbacks on completion, so the browse-root
  polling storm can no longer spawn concurrent loads racing shared state.
- Fix latent bug in checkResetServerItems: server config id was compared
  with !== (reference identity) instead of != (value), causing spurious
  cache resets that fed the reload storm.

Co-authored-by: databoy2k <18686442+databoy2k@users.noreply.github.com>
2026-08-04 16:26:09 -05:00
advplyr 9664f79b1f Merge pull request #1947 from hypnotoad08/fix/finished-book-restarts
Restart finished local media from the beginning
2026-08-03 17:36:59 -05:00
advplyr 533396b855 Android clear current time on local media progress when marking as finished 2026-08-03 17:32:19 -05:00
advplyr 005a051cd0 Merge pull request #1906 from jucor/fix/audiotrack-nullable-mimetype
Make AudioTrack.mimeType nullable to prevent Android playback stall (fixes #1905)
2026-08-03 17:06:18 -05:00
hypnotoad08 f06168fdc2 Restart finished local media from the beginning 2026-08-02 20:15:20 -04:00
advplyr 04e9c8a329 Merge pull request #1869 from AndrolGenhald/reduce-data-usage
Send less data to server with progress update.
2026-08-01 17:53:00 -05:00
advplyr 4a48cb0a9f Merge pull request #1848 from Kyrluckechuck/fix/seek-to-exact-time-rather-than-floored-second
Seek to millisecond rather than flooring to second
2026-07-31 17:18:55 -04:00
advplyr e5ef38295d Update download notification cancel to clear download queue in UI 2026-07-30 17:31:23 -05:00
advplyr b084e54dcc Update download notification id to 11 2026-07-30 17:08:24 -05:00
advplyr d3e55cabf4 Version guard download notification channel API 26+ 2026-07-30 16:51:48 -05:00
advplyr 2cc9ff5a41 Add POST_NOTIFICATION to manifest and start foreground service with type 2026-07-29 17:07:27 -05:00
Nicholas Wallace f8424c03fd Increase download chunk size to 512 KB 2026-07-20 20:05:18 -07:00
Nicholas Wallace 58fbfca645 Add translation strings for download dialogs and notification 2026-07-20 20:01:02 -07:00
Nicholas Wallace 6282fd1f95 Remove deleted migration call 2026-07-20 19:54:47 -07:00
Nicholas Wallace 245df5d934 Remove unnecessary migration, autoformat 2026-07-20 19:06:35 -07:00
Nicholas Wallace dc6184f41d Remove old and slow simplePath from SAF, also autoformatted 2026-07-20 18:59:19 -07:00
Nicholas Wallace b3c3950c55 Check if completed file exists in shared storage before downloading again 2026-07-19 22:31:32 -07:00
Nicholas Wallace 034a134319 Remove retry stubs 2026-07-19 17:54:46 -07:00
Nicholas Wallace 8142d626c0 Ensure token is not part of download URL 2026-07-19 10:24:12 -07:00
Nicholas Wallace 8b20730b6f Cleaning up retry logic and unused return types 2026-07-19 10:24:01 -07:00
Nicholas Wallace d27f431f6f Comment cleanup 2026-07-19 09:23:31 -07:00
Nicholas Wallace 0df0a206e7 Delete partial files after 24 hours 2026-07-19 09:16:35 -07:00
Nicholas Wallace 6aeb31b591 Add support for background download and resumption 2026-07-18 22:56:12 -07:00
Nicholas Wallace eb2483d039 Initial rewrite of 1587 by codex 2026-07-18 17:32:37 -07:00
photown 5099e39f7b Remove the size override in Glide
The override was not needed. It wasn't in the original code, so I'll remove it for consistency.
2026-07-05 23:32:28 -04:00