#๐Ÿ”’ Rainmeter plugin for Feishin: WebSocket connection issues causing display flicker

6 messages ยท Page 1 of 1 (latest)

viral solsticeBOT
#

@lost musk

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

lost musk
#

I'm developing a Rainmeter plugin to display currently playing song information from Feishin, a music player that uses WebSocket for real-time updates. I'm encountering the following issues:

WebSocket Connection: The WebSocket (ws://localhost:4333) only opens briefly every 5 seconds, making it challenging to maintain a consistent connection.
Display Flicker: Due to the intermittent connection, the displayed information flickers between the current song details and default values ("System Audio", "Windows 11", "Default Output").
Resource Usage: My initial attempts at solving this resulted in a script that runs constantly, consuming more resources than desired.
Consistency: I need to ensure that when the WebSocket is open, it displays the current song information, and when closed, it shows the default values without constant flickering.

I've tried various approaches, including using global variables to track connection status and implementing delays before switching to default values. However, these solutions haven't fully resolved the flickering issue and have led to a complex, resource-intensive script.
I'm looking for guidance on how to create a more efficient script that can handle the intermittent WebSocket connection while providing a smooth, flicker-free display in Rainmeter. I'm brand new to python and coding in general so please be VERY patient with me. lol

viral solsticeBOT
#

@lost musk

Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.