mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-21 14:55:43 +00:00
fix: disable souvlaki on Windows to fix startup crash (v1.17.1)
SMTC init via souvlaki requires a valid HWND + COM message loop, which are not available in setup(). Guarded behind #[cfg(not(target_os = "windows"))]. mpris_set_metadata / mpris_set_playback no-op on Windows via the None branch. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [1.17.1] - 2026-03-25
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **Windows crash on startup**: souvlaki SMTC init in `setup()` requires a valid HWND and a running COM message loop, neither of which exists at that point. Media controls are disabled on Windows until init can be properly deferred post-window. All other functionality unaffected.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## [1.17.0] - 2026-03-25
|
## [1.17.0] - 2026-03-25
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "psysonic",
|
"name": "psysonic",
|
||||||
"version": "1.17.0",
|
"version": "1.17.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Maintainer: Psychotoxic <psychotoxic@gmx.de>
|
# Maintainer: Psychotoxic <psychotoxic@gmx.de>
|
||||||
pkgname=psysonic
|
pkgname=psysonic
|
||||||
pkgver=1.17.0
|
pkgver=1.17.1
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Desktop music player for Subsonic API-compatible servers (Navidrome, Gonic, etc.)"
|
pkgdesc="Desktop music player for Subsonic API-compatible servers (Navidrome, Gonic, etc.)"
|
||||||
arch=('x86_64')
|
arch=('x86_64')
|
||||||
|
|||||||
@@ -252,12 +252,18 @@ pub fn run() {
|
|||||||
.build(app)?;
|
.build(app)?;
|
||||||
|
|
||||||
// ── MPRIS2 / OS media controls via souvlaki ──────────────────
|
// ── MPRIS2 / OS media controls via souvlaki ──────────────────
|
||||||
|
// Windows: souvlaki SMTC init requires a valid HWND and a running
|
||||||
|
// COM message loop, neither of which is available this early in
|
||||||
|
// setup(). Disabled on Windows until we can defer init post-window.
|
||||||
|
// mpris_set_metadata / mpris_set_playback no-op via the None branch.
|
||||||
|
#[cfg(target_os = "windows")]
|
||||||
|
app.manage(MprisControls::new(None));
|
||||||
|
|
||||||
|
#[cfg(not(target_os = "windows"))]
|
||||||
{
|
{
|
||||||
use souvlaki::{MediaControlEvent, MediaControls, PlatformConfig};
|
use souvlaki::{MediaControlEvent, MediaControls, PlatformConfig};
|
||||||
|
|
||||||
// On Linux, souvlaki requires a live D-Bus session. If the env var
|
// On Linux, souvlaki requires a live D-Bus session.
|
||||||
// is absent or empty (headless, test, or stripped environment),
|
|
||||||
// skip init entirely — commands will no-op via the None branch.
|
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
let dbus_ok = std::env::var("DBUS_SESSION_BUS_ADDRESS")
|
let dbus_ok = std::env::var("DBUS_SESSION_BUS_ADDRESS")
|
||||||
.map(|v| !v.is_empty())
|
.map(|v| !v.is_empty())
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://schema.tauri.app/config/2",
|
"$schema": "https://schema.tauri.app/config/2",
|
||||||
"productName": "Psysonic",
|
"productName": "Psysonic",
|
||||||
"version": "1.17.0",
|
"version": "1.17.1",
|
||||||
"identifier": "dev.psysonic.player",
|
"identifier": "dev.psysonic.player",
|
||||||
"build": {
|
"build": {
|
||||||
"beforeDevCommand": "npm run dev",
|
"beforeDevCommand": "npm run dev",
|
||||||
|
|||||||
Reference in New Issue
Block a user