You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor to instance-based core with suspend-native internals (#6)
Replace static/companion-object state with a single CoreManager instance
created by init() and released by cleanup(): the engine owns its scope,
discovery, controllers and caches, so re-initialization cannot leak or
resurrect stale state. CacheManager and LocalCastManager become
suspend-native (callback adapters removed) and castLocalFile throws
typed UPnPException subclasses raised at the failure source instead of
parsing message strings. Calling APIs before init() now returns neutral
defaults instead of silently auto-initializing. Public API signatures
are unchanged.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
22
22
-**Local file server**: serve correct MIME types by file extension (some TVs reject `application/octet-stream`) and skip reliably to the requested Range offset (`InputStream.skip` may under-skip, corrupting seeked streams); bound the token registry (LRU, 64 entries) so repeated casts no longer leak entries
23
23
24
24
### 🔧 Changed
25
+
-**Internal architecture**: the whole casting stack (coroutine scope, SSDP discovery, media controllers, caches) is now owned by a single `CoreManager` instance created in `init()` and released in `cleanup()` — the static/companion-object state, the global scope registry and the weak-reference controller registry are gone, so repeated `cleanup()` → `init()` cycles can no longer leak or resurrect stale state
26
+
-**Native suspend internals**: internal layers (`CacheManager`, `LocalCastManager`, progress/volume queries) are suspend-native; the `suspendCancellableCoroutine` callback adapters and callback-threading through the internals were removed. Public API signatures are unchanged
27
+
-**Typed errors for local casting**: `castLocalFile()` now throws `UPnPException.FileError` / `NetworkError` / `DeviceError` raised at the failure source, instead of mapping message strings back to exception types after the fact
28
+
-**Not-initialized behavior**: calling cast/control/query APIs before `init()` returns neutral defaults (`false` / `null` / `IDLE` / empty list) instead of silently auto-initializing; `castLocalFile()` throws `UPnPException.UnknownError` instead of hanging forever
25
29
-`DeviceDescriptionParser` is now `internal` (was accidentally public)
26
30
- Removed unused `okhttp`/`gson` dependencies
27
31
- Removed phantom `VideoSelectorActivity` declaration from the library manifest
0 commit comments