-
Notifications
You must be signed in to change notification settings - Fork 19
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
Ability to refresh Plex Live TV Guide after the channels.json
file is updated
#40
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: Duncan Leo <[email protected]>
@@ -1,4 +1,4 @@ | |||
module github.com/duncanleo/plex-dvr-hls | |||
module plex-dvr-hls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: This change isn't compliant with Go module naming conventions:
The Go standard library uses package paths that do not contain a dot in the first path element, and the go command does not attempt to resolve such paths from network servers.
The non-absolute naming system appears to be suitable for local sub-packages (e.g. config
) but not the root package.
@@ -42,6 +50,31 @@ var ( | |||
Cfg Config | |||
) | |||
|
|||
func RefreshPlexLiveTVGuide() error { | |||
for _, server := range Cfg.PlexServers { | |||
url := server.Endpoint + "/livetv/dvrs/29/reloadGuide?X-Plex-Token=" + server.Token |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: is the ID 29
hardcoded? I think it may change (e.g. if the DVR is removed and re-added).
config.example.json
to show example forplex_servers
.channels.go
andconfig.go
has the actual changes to refresh the Plex Server Live TV Guide when channels are updated.@duncanleo Can you please review this PR.