Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support non numeric channels #7

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -86,4 +86,4 @@ services:
- 32400:32400
- 32400:32400/udp
restart: unless-stopped
```
```
2 changes: 1 addition & 1 deletion plex.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tvheadenv.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
Expand Down