Skip to content
This repository was archived by the owner on Jun 16, 2025. It is now read-only.

Commit 3acc0f8

Browse files
committed
Add Windows Media Session support
1 parent 9f91e82 commit 3acc0f8

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
## Operating System Support
1919

2020
![](https://img.shields.io/badge/Windows-0078D6?style=for-the-badge&logo=windows&logoColor=white) ![](https://img.shields.io/badge/mac%20os-000000?style=for-the-badge&logo=apple&logoColor=white) ![](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black)
21-
<!---
21+
2222
## Desktop Player Support
2323
![](https://img.shields.io/badge/Windows-0078D6?style=for-the-badge&logo=windows&logoColor=white)
24-
--->
24+
2525
</div>
2626

2727

@@ -68,7 +68,7 @@ Here're some of the project's best features:
6868
* YouTube Embeds
6969
* YouTube Music
7070
* For having rich presence for unsupported sites please check [UNSUPPORTED.md](UNSUPPORTED.md)
71-
* ~Support for Desktop Players (Exclusive to Windows as of right now)~ (Work In Progress)
71+
* Support for Desktop Players (Exclusive to Windows as of right now)
7272
* ~Application does not emit RPC signals when game is launched~ (TODO)
7373

7474
## 🛠️ Installation Steps:

script.pyw

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,11 @@ def RPCUpdate(state, details, pltform):
169169
elif pltform == "YouTube Music":
170170
small_image = "ytm"
171171
small_text = "YouTube Music"
172+
173+
elif pltform == "Windows Media Session":
174+
large_image = "wms"
175+
large_text = "Windows Media Session"
176+
state = "Windows Media Session"
172177
else:
173178
large_image = "base"
174179
large_text = "My PC"
@@ -180,7 +185,7 @@ def RPCUpdate(state, details, pltform):
180185
details = f"{computer.Win32_Processor()[0].Name}"
181186

182187
# set the large image and text to the cover and title of the song only when the song is playing
183-
if WNPRedux.is_started and isinstance(WNPRedux.media_info.artist, str) and WNPRedux.media_info.state == "PLAYING":
188+
if WNPRedux.is_started and isinstance(WNPRedux.media_info.artist, str) and WNPRedux.media_info.state == "PLAYING" and pltform != "Windows Media Session":
184189
large_image = arr["cover"]
185190
large_text = arr["title_only"]
186191
else:

0 commit comments

Comments
 (0)