Skip to content

Commit

Permalink
Fix Bazarr integration
Browse files Browse the repository at this point in the history
  • Loading branch information
packruler committed Oct 22, 2024
1 parent 44e94e1 commit f532974
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
3 changes: 2 additions & 1 deletion themepark.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ const bodyBasedApps string = "(?i)" +
"sonarr" + "|" +
"readarr" + "|" +
"lidarr" + "|" +
"whisparr"
"whisparr" + "|" +
"bazarr"

func (config *Config) getRegexTarget() string {
match, _ := regexp.Match(bodyBasedApps, []byte(config.App))
Expand Down
40 changes: 40 additions & 0 deletions themepark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,46 @@ func TestRegexTarget(t *testing.T) {
config: Config{App: "Emby"},
expected: "</body>",
},
{
desc: "Jellyfin should be body based",
config: Config{App: "Bazarr"},
expected: "</body>",
},
{
desc: "Radarr should be body based",
config: Config{App: "Radarr"},
expected: "</body>",
},
{
desc: "Prowlarr should be body based",
config: Config{App: "Prowlarr"},
expected: "</body>",
},
{
desc: "Sonarr should be body based",
config: Config{App: "Sonarr"},
expected: "</body>",
},
{
desc: "Readarr should be body based",
config: Config{App: "Readarr"},
expected: "</body>",
},
{
desc: "Lidarr should be body based",
config: Config{App: "Lidarr"},
expected: "</body>",
},
{
desc: "Whisparr should be body based",
config: Config{App: "Whisparr"},
expected: "</body>",
},
{
desc: "Bazarr should be body based",
config: Config{App: "Bazarr"},
expected: "</body>",
},
{
desc: "Provided Target should be used",
config: Config{App: "Emby", Target: "</footer>"},
Expand Down

0 comments on commit f532974

Please sign in to comment.