PUT /devices/:id/channels panics for M3U/TVE sources — interface conversion error

I'm trying to hide channels programmatically via the API on M3U and TVE sources. The endpoint works for HDHomeRun (returns 400 but no crash) but panics for M3U and TVE devices.

Channels DVR version: 2026.02.09.1530

Steps to reproduce:

curl -X PUT http://localhost:8089/devices/M3U-Pluto/channels \
  -H "Content-Type: application/json" \
  -d '{"ID":"pluto-rawhide-ca","Hidden":true}'

Expected: 200 or a structured error response

Actual: HTTP 500, server log shows:

[Recovery] panic recovered:
interface conversion: interface {} is *m3u.Device, not *hdhr.Device
github.com/fancybits/channels-server/http_device.go:554

The handler at http_device.go:554 appears to assume the device is always *hdhr.Device regardless of the source type.

Question: Is there a supported way to hide channels on M3U and TVE sources via the API? I'm trying to automate duplicate channel cleanup across HDHomeRun, Pluto (M3U), and Fubo/Sling (TVE) sources.

Welcome to the community! :smiley:

Sorry, I don't have a direct answer to your question but I thought you may be interested in this project created by @KineticMan:

By the way, what do you check to detect duplicate channels programmatically? I'm interested as a software engineer who enjoys writing scripts in my spare time. :slightly_smiling_face:

Are you using the same undocumented API that Channels DVR Server uses to mark source channels as hidden?

curl -XPUT http://host:port/devices/M3U-Pluto/channels/[numeric_channel#]/toggle_hidden

There is no documented API for doing that yet AFAIK