-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from iloveicedgreentea/develop
prelim jellyfin support, fixes and speedups
- Loading branch information
Showing
45 changed files
with
2,705 additions
and
467 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ build | |
*config.json | ||
media.*.priv* | ||
docker/data | ||
coverage.* | ||
|
||
# Binaries for programs and plugins | ||
*.exe | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
version: '3.8' | ||
|
||
services: | ||
plex-webhook-automation: | ||
image: ghcr.io/iloveicedgreentea/gowatchit:latest | ||
ports: | ||
- '9999:9999' | ||
environment: | ||
SUPER_DEBUG: 'false' | ||
LOG_LEVEL: 'info' | ||
volumes: | ||
- data_volume:/data | ||
|
||
volumes: | ||
data_volume: | ||
driver: local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package avr | ||
|
||
import ( | ||
"github.com/reiver/go-telnet" | ||
"github.com/iloveicedgreentea/go-plex/internal/config" | ||
) | ||
// AVRClient is an interface for interacting with any AVR | ||
type AVRClient interface { | ||
GetCodec() (string, error) | ||
} | ||
|
||
// GetAVRClient returns a new instance of an AVRClient based on a brand like denon | ||
func GetAVRClient(url string) AVRClient { | ||
|
||
log.Debug(config.GetString("ezbeq.avrbrand")) | ||
switch config.GetString("ezbeq.avrbrand") { | ||
case "denon": | ||
log.Debug("Creating Denon AVR client") | ||
return &DenonClient{ServerURL: url, Port: "23", TelClient: telnet.StandardCaller} | ||
// Add cases for other brands | ||
default: | ||
log.Error("No AVR brand set in config") | ||
return nil | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package avr | ||
|
||
import ( | ||
"testing" | ||
"github.com/stretchr/testify/assert" | ||
"github.com/iloveicedgreentea/go-plex/internal/config" | ||
) | ||
|
||
func setupAvrTest() AVRClient { | ||
|
||
return GetAVRClient("192.168.88.40") | ||
} | ||
func TestAvrGetAudioMode(t *testing.T) { | ||
config.Set("ezbeq.avrbrand", "denon") | ||
c := setupAvrTest() | ||
|
||
mode, err := c.GetCodec() | ||
assert.NoError(t, err) | ||
t.Log(mode) | ||
assert.NotEmpty(t, mode) | ||
|
||
} | ||
func TestAvrGetAudioModeFail(t *testing.T) { | ||
original := config.GetString("ezbeq.avrbrand") | ||
config.Set("ezbeq.avrbrand", "") | ||
c := setupAvrTest() | ||
|
||
assert.Nil(t, c) | ||
config.Set("ezbeq.avrbrand", original) | ||
} |
Oops, something went wrong.