[GH-ISSUE #833] No devices available - manually restarting spotifyd #349

Open
opened 2026-02-28 14:48:38 +03:00 by kerem · 0 comments
Owner

Originally created by @BeneCollyridam on GitHub (Jun 17, 2021).
Original GitHub issue: https://github.com/Rigellute/spotify-tui/issues/833

I often have the problem, that after a suspend spotifyd is down. The process is still running, but it does not show up in the device list.

I added a quick hack in my local version to solve this problem, by adding the following snippet to main.rs

      if let Ok(device) = spotify.device().await {
        if device.devices.len() == 0 {
          let _ = std::process::Command::new("systemctl")
            .arg("restart")
            .arg("--user")
            .arg("spotifyd.service")
            .output();
        }
      }

I wanted to hear if you're interested in a better solution, where maybe the user could supply a command in the config file to be run if there are no devices available? Maybe it is better to fix it upstream in spotifyd? I'll be happy to implement it properly, if you think it would be useful

Originally created by @BeneCollyridam on GitHub (Jun 17, 2021). Original GitHub issue: https://github.com/Rigellute/spotify-tui/issues/833 I often have the problem, that after a suspend spotifyd is down. The process is still running, but it does not show up in the device list. I added a quick hack in my local version to solve this problem, by adding the following snippet to `main.rs` ```rust if let Ok(device) = spotify.device().await { if device.devices.len() == 0 { let _ = std::process::Command::new("systemctl") .arg("restart") .arg("--user") .arg("spotifyd.service") .output(); } } ``` I wanted to hear if you're interested in a better solution, where maybe the user could supply a command in the config file to be run if there are no devices available? Maybe it is better to fix it upstream in spotifyd? I'll be happy to implement it properly, if you think it would be useful
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-tui#349
No description provided.