diff --git a/CHANGELOG.md b/CHANGELOG.md index d6381c7..463cbf8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## v1.0.2 - 2022-11-28 + +* Fix to support string-formatted channel numbers (from papaschloss) + ## v1.0.1 - 2017-11-29 * Update golang to 1.9.3 [Will Boyce] diff --git a/README.md b/README.md index 4bba3a9..aa01661 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Go Report Card](https://goreportcard.com/badge/github.com/wrboyce/plexheadend)](https://goreportcard.com/report/github.com/wrboyce/plexheadend) [![CircleCI](https://circleci.com/gh/wrboyce/plexheadend.png?style=shield)](https://circleci.com/gh/wrboyce/plexheadend) -Proxy requests between PlexDVR and TVHeadend +Proxy requests between PlexDVR and TVHeadend. Now supports non-numeric channel numbers (i.e. "21.1", per changes by papaschloss). ## Installation @@ -86,4 +86,4 @@ services: - 32400:32400 - 32400:32400/udp restart: unless-stopped -``` \ No newline at end of file +``` diff --git a/plex.go b/plex.go index fbe1d30..1b376b2 100644 --- a/plex.go +++ b/plex.go @@ -76,7 +76,7 @@ func (p *plexHeadend) lineupHandler(w http.ResponseWriter, r *http.Request) { for _, channel := range p.tvhGetChannels() { if p.tag == "" || sliceContains(channel.Tags, p.tag) { data = append(data, - lineupResponse{fmt.Sprintf("%d", channel.Number), channel.Name, channel.URL}) + lineupResponse{fmt.Sprintf("%s", channel.Number), channel.Name, channel.URL}) } } json.NewEncoder(w).Encode(data) diff --git a/tvheadenv.go b/tvheadenv.go index 68c92c4..7042ef1 100644 --- a/tvheadenv.go +++ b/tvheadenv.go @@ -39,7 +39,7 @@ type apiChannelsResponse struct { type apiChannel struct { UUID string `json:"uuid"` Name string `json:"name"` - Number int `json:"number"` + Number string `json:"number"` Tags []string `json:"tags"` URL string `json:"url"` }