(codec string)
| 204 | } |
| 205 | |
| 206 | func rpcSetVideoCodecPreference(codec string) error { |
| 207 | if codec != "auto" && codec != "h265" && codec != "h264" { |
| 208 | return fmt.Errorf("invalid codec preference: %s (must be auto, h265, or h264)", codec) |
| 209 | } |
| 210 | logger.Info().Str("codec", codec).Msg("Setting video codec preference") |
| 211 | config.VideoCodecPreference = codec |
| 212 | if err := SaveConfig(); err != nil { |
| 213 | return fmt.Errorf("failed to save config: %w", err) |
| 214 | } |
| 215 | return nil |
| 216 | } |
| 217 | |
| 218 | func rpcGetAutoUpdateState() (bool, error) { |
| 219 | return config.AutoUpdateEnabled, nil |
nothing calls this directly
no test coverage detected