Skip to content

Releases: GenessyX/p-cast

v2.0.0

01 Mar 10:46

Choose a tag to compare

v2.0.0 (2026-03-01)

Bug Fixes

  • Disconnect idle chromecasts, fix failed-device handling and duplicate sinks. didn't know pychromecast maintains a persistent TCP connection with PING/PONG heartbeats from the moment we wait on a Chromecast object (5522a9a)

  • Gracefully handle multiple SIGTERMs at once (42f2ed5)

  • Ignore benign race where two CCs are simultaneously initializing (143a79e)

  • Once detached from terminal, sigterm wasn't being handled (a9b78dc)

so graceful exit wasn't possible. Now we have explicit sigterm handling. This also greatly speeds up clean shutdown. Finally, we now also tell CC we're quitting if there's an active stream, rather than just killing ffmpeg and httpd and letting it fail.

  • Regression and various minor issues (3db7076)

Kindly telling CC to quit_app() was a regression; this causes it to disconnect from US triggering recovery attempts -- use stop() instead. Don't wait for chromecast.disconnect() to complete. Avoid race when handle_device_add is called in rapid succession. Register BufferingWatchdog before subscribing, so we can log load_media_failed messages. Don't exit if we don't immediately find chromecasts, we will find them later. Defer finding IP address until we actually do find some (so we have network).

Chores

  • Merge commit 'e4cee86f' into multi-sink (8b838fb)

and make required pre-commit changes. No functional changes

  • Minor refactoring (7b35765)

  • Set up & configure linters (e4cee86)

  • Simplify handle_device_add and always check availability (0bb5988)

  • Update readme (d7b985d)

  • Update readme and add excalidraw diagram (1da3e79)

  • Update readme and pyproject (9d5ad51)

Features

  • Add ability to run in background (2f129ec)

via explicit double-forking. Using OS-level backgrounding caused the pychromecast thread to stall. Also acquire an instance lock to ensure there are not multiple p-casts running simultaneously. Adds systemd service file to enable running as a service.

  • Better ffmpeg error handling (a6f3e58)

Exit upon immediate ffmpeg exit: that indicates ffmpeg or configuration error or programming mistake. Remove ffmpeg_watcher. Now that we monitor media events, it's redundant.

  • Better resilience to network errors (efdca40)

  • handle device updates including changed device IPs/ports or newly-re-available devices that never left mDNS. now more responsive to devices reappearing.

  • cleanly handle benign race condition where temp dir is cleaned up while http requests are still incoming

  • include name of sending computer with stream

  • improved logging

  • Handle cc device failure. time out quickly if tcp connection to device fails. then remove sink & don't re-add it from zeroconf until tcp probe succeeds (zeroconf ttl is ~75m) (7f13976)

  • Monitor for cc buffering and recover; add input ffmpeg queue (49d5246)

  • Only resample if above chromecast maximum. use friendly sink name. add command line arguments. tcp port configurable. (30fc774)

  • Remove/don't re-add sinks for unresponsive chromecasts in a timely manner (29967e6)

  • Support logging to file. minor simplification. (1af7b14)

  • Sync CC-initiated volume changes (cf71b08)

Monitor CC volume-change events, keep internal shared volume in SinkController. Now volume control is seamless in both directions.

  • Update_service can also indicate unresponsive cast devices (1982906)

So just use the handle_device_add to handle both add and updates, but update to handle change of address case.

  • Use systemd type=notify, as recommended for services, not forking (2fff7b2)

systemd was floundering at PID file not being written when parent process ends with --daemonize, and also didn't like it being overwritten


Detailed Changes: v1.1.0...v2.0.0