Skip to content

Commit 76e9e72

Browse files
fix test and build
1 parent 2ec6a6d commit 76e9e72

File tree

5 files changed

+30
-8
lines changed

5 files changed

+30
-8
lines changed

.github/workflows/docker-publish.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
with:
6565
context: .
6666
# platforms: linux/amd64,linux/arm64,linux/arm/v6,linux/arm/v7
67-
push: ${{ github.event_name == 'pull_request' && github.head_ref == 'develop' }}
67+
push: ${{ github.head_ref == 'master' || github.event_name == 'pull_request' && github.head_ref == 'develop' }}
6868
tags: ${{ steps.meta.outputs.tags }}
6969
# cache-from: type=gha
7070
# cache-to: type=gha,mode=max

changelog.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,5 @@ Modify UUID filter to accept comma for multiple
4040
* fix cache on resume
4141
* various speedups
4242
* remove listen port config
43-
* improve search by using tmdb
43+
* improve search by using tmdb
44+
* add author name to mqtt topic and logs

internal/ezbeq/ezbeq.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ func (c *BeqClient) LoadBeqProfile(m *models.SearchRequest) error {
353353
}
354354

355355
if m.DryrunMode {
356-
return fmt.Errorf("BEQ Dry run msg - Would load title %s -- codec %s -- edition: %s, ezbeq entry ID %s", catalog.SortTitle, m.Codec, catalog.Edition, m.EntryID)
356+
return fmt.Errorf("BEQ Dry run msg - Would load title %s -- codec %s -- edition: %s, ezbeq entry ID %s - author %s", catalog.Title, m.Codec, catalog.Edition, m.EntryID, catalog.Author)
357357
}
358358

359359
// build payload
@@ -392,7 +392,7 @@ func (c *BeqClient) LoadBeqProfile(m *models.SearchRequest) error {
392392
}
393393
}
394394

395-
return mqtt.PublishWrapper(config.GetString("mqtt.topicBeqCurrentProfile"), fmt.Sprintf("%s: Codec: %s, Author: %s", catalog.SortTitle, m.Codec, catalog.Author))
395+
return mqtt.PublishWrapper(config.GetString("mqtt.topicBeqCurrentProfile"), fmt.Sprintf("%s: %s by %s", catalog.Title, m.Codec, catalog.Author))
396396
}
397397

398398
// UnloadBeqProfile will unload all profiles from all devices

internal/jellyfin/jellyfin.go

+2
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ func (c *JellyfinClient) GetPlexMovieDb(payload interface{}) string {
5454

5555
// TODO: finish
5656
func (c *JellyfinClient) GetAudioCodec(payload interface{}) (string, error) {
57+
// codec, title, profile, err := c.GetCodec(payload.(models.JellyfinMetadata))
58+
// TODO: parse the response and map this to the beq codec standards
5759
return "", nil
5860
}
5961
// generic function to make a request

test.sh

+23-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,33 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
unset LOG_LEVEL
44

5-
set -euo pipefail
6-
readarray -t dirs < <(find . -type d -not -path "./.git*")
5+
set -uo pipefail
6+
7+
while IFS=\= read -r dir; do
8+
dirs+=("$dir")
9+
done < <(find . -type d -not -path "./.git*")
10+
11+
# readarray -t dirs < <(find . -type d -not -path "./.git*")
712

813
run_tests() {
914
local dir=$1
1015
echo "Testing $dir"
11-
(cd "$dir" && go test -cover -coverprofile=coverage.out)
16+
(
17+
cd "$dir" || exit 1
18+
out=$(go test -cover -coverprofile=coverage.out 2>&1)
19+
code=$?
20+
if [ $code -ne 0 ]; then
21+
if echo "$out"| grep -q "files in"; then
22+
code=0
23+
else
24+
echo "Error testing $dir"
25+
echo "$out"
26+
exit $code
27+
fi
28+
fi
29+
30+
)
1231
}
1332

1433

0 commit comments

Comments
 (0)