[PR #252] [MERGED] Set PulseAudio app properties using environment variables #687

Closed
opened 2026-03-02 23:49:23 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/aome510/spotify-player/pull/252
Author: @Schnouki
Created: 9/13/2023
Status: Merged
Merged: 9/15/2023
Merged by: @aome510

Base: masterHead: pulseaudio-env-variables


📝 Commits (2)

  • 8693f2d Set PulseAudio app properties using environment variables
  • 34335f0 Include device name in PulseAudio stream description

📊 Changes

1 file changed (+26 additions, -0 deletions)

View changed files

📝 spotify_player/src/main.rs (+26 -0)

📄 Description

This allows other PulseAudio clients (like mixers etc.) to show more details about the audio stream.

For example, using the standard PulseAudio volume control (pavucontrol):

  • before:
    2023-09-13-10_38_34
  • after:
    2023-09-13-11_05_22

It would even be possible to do things like add the current track's title and artist in env variables, but I don't think anyone actually makes use of this, so it seems rather pointless to me. Instead, I decided to focus on the most useful ones.

Librespot only sets those when used as a standalone binary, but not as a library: github.com/librespot-org/librespot@054074c920/src/main.rs (L1211-L1246)

Documentation about this PulseAudio feature: https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/Clients/ApplicationProperties/


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/aome510/spotify-player/pull/252 **Author:** [@Schnouki](https://github.com/Schnouki) **Created:** 9/13/2023 **Status:** ✅ Merged **Merged:** 9/15/2023 **Merged by:** [@aome510](https://github.com/aome510) **Base:** `master` ← **Head:** `pulseaudio-env-variables` --- ### 📝 Commits (2) - [`8693f2d`](https://github.com/aome510/spotify-player/commit/8693f2df20063ab323a045e0c5d5078d265852b2) Set PulseAudio app properties using environment variables - [`34335f0`](https://github.com/aome510/spotify-player/commit/34335f0b724ff6e3c0ac9d3bbd86fccd0170c9dc) Include device name in PulseAudio stream description ### 📊 Changes **1 file changed** (+26 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `spotify_player/src/main.rs` (+26 -0) </details> ### 📄 Description This allows other PulseAudio clients (like mixers etc.) to show more details about the audio stream. For example, using the standard PulseAudio volume control (`pavucontrol`): - before: ![2023-09-13-10_38_34](https://github.com/aome510/spotify-player/assets/64833/0ea5a04b-7652-44d6-a206-2ab1337c7acd) - after: ![2023-09-13-11_05_22](https://github.com/aome510/spotify-player/assets/64833/3f457180-e13b-49d7-a6f8-723575c21abb) It would even be possible to do things like add the current track's title and artist in env variables, but I don't think anyone actually makes use of this, so it seems rather pointless to me. Instead, I decided to focus on the most useful ones. Librespot only sets those when used as a standalone binary, but not as a library: https://github.com/librespot-org/librespot/blob/054074c920d5c6acf0210faa3cd849dc4e065828/src/main.rs#L1211-L1246 Documentation about this PulseAudio feature: https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/Clients/ApplicationProperties/ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 23:49:23 +03:00
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-player#687
No description provided.