Remove dead code
- wire.with_figure: the device uses dataclasses.replace directly. - DeviceConnected/DeviceDisconnected: emitted, never subscribed to, and a duplicate of ConnectionChanged(target="firmware"). - ScreenService.toggle(): never called. - GET /api/lirc (LircConfigOut, api.lircConfig): no front-end reads it. - POST /api/volume's delta_percent (api.nudgeVolume): no front-end sends it. - LibraryCache.shrink_stored_covers: a one-off migration that re-read every cover header on every scan. _INDEX_VERSION 7 rebuilds any cache that could still need it. - Firmware: the MFRC522 library and its unused globals (lib/nfc/rc522.c is the driver in use), and mfrc_version.h, a reader test sketch nothing included. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,6 @@ import type {
|
||||
Album,
|
||||
HaConfig,
|
||||
HaEntityState,
|
||||
LircConfig,
|
||||
PlayerState,
|
||||
RemoteMapping,
|
||||
RemoteSlotInput,
|
||||
@@ -55,9 +54,6 @@ async function fetchOrNullOnError<T>(path: string): Promise<T | null> {
|
||||
/** `null` means the room-control page isn't configured, not an error. */
|
||||
const fetchHaConfig = (): Promise<HaConfig | null> => fetchOrNullOn404<HaConfig>("/ha");
|
||||
|
||||
/** `null` means the IR remote isn't configured, not an error. */
|
||||
const fetchLircConfig = (): Promise<LircConfig | null> => fetchOrNullOn404<LircConfig>("/lirc");
|
||||
|
||||
/** `null` means the typing game isn't configured, not an error - the tab still shows,
|
||||
* just with a "not set up" placeholder instead of a lesson map. */
|
||||
const fetchTippenCurriculum = (): Promise<TippenCurriculum | null> =>
|
||||
@@ -96,7 +92,6 @@ export const api = {
|
||||
previous: () => post("/previous"),
|
||||
seek: (position: number) => post("/seek", { position }),
|
||||
setVolume: (percent: number) => post("/volume", { percent }),
|
||||
nudgeVolume: (deltaPercent: number) => post("/volume", { delta_percent: deltaPercent }),
|
||||
/** One step of the IR remote's volume keys per unit, in the device's own increment. */
|
||||
stepVolume: (steps: number) => post("/volume", { steps }),
|
||||
toggleScreen: () => post("/screen/toggle"),
|
||||
@@ -118,7 +113,6 @@ export const api = {
|
||||
|
||||
trackDetail: fetchTrackDetail,
|
||||
|
||||
lircConfig: fetchLircConfig,
|
||||
pressRemote: (digit: string) => post(`/remote/press/${digit}`),
|
||||
remoteMapping: () => request<RemoteMapping>("/remote/mapping"),
|
||||
saveRemoteMapping: (slots: Record<string, RemoteSlotInput>) =>
|
||||
|
||||
@@ -171,11 +171,6 @@ export interface RemoteSlotInput {
|
||||
track_index?: number;
|
||||
}
|
||||
|
||||
/** Presence-only, like `HaConfig` - there is nothing secret in a host/port. */
|
||||
export interface LircConfig {
|
||||
connected: boolean;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------- tippen
|
||||
//
|
||||
// The typing game. `null` from `GET /tippen/curriculum` means the whole feature isn't
|
||||
|
||||
Reference in New Issue
Block a user