refactor: remove skeleton toggle/shortcut feature from control server
show_skeleton is now managed by the Plasma wallpaper config directly, so the server no longer needs toggle-skeleton, set-shortcut endpoints, pynput hotkey listener, or the show_skeleton field in /current. Also fixes unclosed file handle in the /art handler. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
1453c3ba3c
commit
db2fda70bd
1 changed files with 8 additions and 7 deletions
|
|
@ -109,12 +109,12 @@ class ControlState:
|
|||
verse_lines, verse_active = find_active_verse(verses, position)
|
||||
line = verse_lines[verse_active] if verse_active >= 0 and verse_lines else ""
|
||||
return {
|
||||
"art_url": getattr(self, "_art_url", None),
|
||||
"rgb": list(getattr(self, "_rgb", [0, 200, 255])),
|
||||
"rgb2": list(getattr(self, "_rgb2", [255, 0, 150])),
|
||||
"lyric_line": line,
|
||||
"verse_lines": verse_lines,
|
||||
"verse_active": verse_active,
|
||||
"art_url": getattr(self, "_art_url", None),
|
||||
"rgb": list(getattr(self, "_rgb", [0, 200, 255])),
|
||||
"rgb2": list(getattr(self, "_rgb2", [255, 0, 150])),
|
||||
"lyric_line": line,
|
||||
"verse_lines": verse_lines,
|
||||
"verse_active": verse_active,
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -139,7 +139,8 @@ class ControlHandler(BaseHTTPRequestHandler):
|
|||
return
|
||||
try:
|
||||
if art_url.startswith("file://"):
|
||||
body = open(art_url[7:], "rb").read()
|
||||
with open(art_url[7:], "rb") as f:
|
||||
body = f.read()
|
||||
ctype = "image/png" if art_url.endswith(".png") else "image/jpeg"
|
||||
else:
|
||||
resp = requests.get(art_url, timeout=5)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue