Skip to content

Commit

Permalink
Remove no timeout for plex (#603)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidnewhall authored Sep 19, 2023
2 parents c0e0161 + 83727cb commit b42dbd2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
9 changes: 9 additions & 0 deletions pkg/apps/integrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package apps
import (
"fmt"
"strings"
"time"

"github.com/Notifiarr/notifiarr/pkg/apps/apppkg/plex"
"github.com/Notifiarr/notifiarr/pkg/apps/apppkg/sabnzbd"
Expand All @@ -23,6 +24,10 @@ type PlexConfig struct {
}

func (c *PlexConfig) Setup(maxBody int, logger mnd.Logger) {
if c.Timeout.Duration == 0 {
c.Timeout.Duration = time.Minute
}

if logger != nil && logger.DebugEnabled() {
c.Client = starr.ClientWithDebug(c.Timeout.Duration, c.ValidSSL, debuglog.Config{
MaxBody: maxBody,
Expand Down Expand Up @@ -54,6 +59,10 @@ func (c *TautulliConfig) Setup(maxBody int, logger mnd.Logger) {
return
}

if c.Timeout.Duration == 0 {
c.Timeout.Duration = time.Minute
}

if logger != nil && logger.DebugEnabled() {
c.Config.Client = starr.ClientWithDebug(c.Timeout.Duration, c.ValidSSL, debuglog.Config{
MaxBody: maxBody,
Expand Down
1 change: 0 additions & 1 deletion pkg/bindata/templates/media/plex.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ <h2 class="mb-3" style="margin-bottom:-45px">Plex</h2>
{{- end}}
<select type="select" id="Plex.Timeout" name="Plex.Timeout" class="client-parameter form-control input-sm" data-group="media" data-label="Plex Timeout" data-original="{{.Config.Apps.Plex.Timeout}}">
<option value="-1s" {{if eq $.Config.Apps.Plex.Timeout.Seconds (add -1 0)}}selected {{end}}>Disabled</option>
<option value="0s" {{if eq $.Config.Apps.Plex.Timeout.Seconds (add 0 0)}}selected {{end}}>No Timeout</option>
{{- range $i := one259 }}
<option {{if eq $.Config.Apps.Plex.Timeout.Seconds $i}}selected {{end}}value="{{$i}}s">{{$i}} second{{if not (eq $i (add 0 1))}}s{{end}}</option>
{{- end}}
Expand Down
1 change: 0 additions & 1 deletion pkg/bindata/templates/media/tautulli.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ <h2 class="mb-3" style="margin-bottom:-45px">Tautulli</h2>
{{- end}}
<select type="select" id="Apps.Tautulli.extraConfig.Timeout" name="Apps.Tautulli.extraConfig.Timeout" class="client-parameter form-control input-sm" data-group="media" data-label="Tautulli Timeout" data-original="{{.Config.Apps.Tautulli.Timeout}}">
<option value="-1s" {{if eq $.Config.Tautulli.Timeout.Seconds (add -1 0)}}selected {{end}}>Disabled</option>
<option value="0s" {{if eq $.Config.Tautulli.Timeout.Seconds (add 0 0)}}selected {{end}}>No Timeout</option>
{{- range $i := one259 }}
<option {{if eq $.Config.Apps.Tautulli.Timeout.Seconds $i}}selected {{end}}value="{{$i}}s">{{$i}} second{{if not (eq $i (add 0 1))}}s{{end}}</option>
{{- end}}
Expand Down

0 comments on commit b42dbd2

Please sign in to comment.