Skip to content

Commit 46b6e6b

Browse files
Merge pull request #52 from iloveicedgreentea/develop
Fix missing volume
2 parents db2ee87 + 133fd07 commit 46b6e6b

File tree

6 files changed

+35
-48
lines changed

6 files changed

+35
-48
lines changed

.github/workflows/docker-publish.yml

+5-41
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,13 @@
11
name: Docker
22

3-
# This workflow uses actions that are not certified by GitHub.
4-
# They are provided by a third-party and are governed by
5-
# separate terms of service, privacy policy, and support
6-
# documentation.
7-
83
on:
94
push:
10-
branches: ["master"]
11-
# Publish semver tags as releases.
12-
tags: ["v*.*.*"]
5+
tags: ['v*.*.*'] # Triggers on tag following semantic versioning
136
pull_request:
14-
branches: ["master", "develop", "clip_support"]
7+
branches: ['master', 'develop'] # Triggers on PR to these branches
158

169
env:
17-
# Use docker.io for Docker Hub if empty
1810
REGISTRY: ghcr.io
19-
# github.repository as <account>/<repo>
2011
IMAGE_NAME: ${{ github.repository }}
2112

2213
jobs:
@@ -25,59 +16,32 @@ jobs:
2516
permissions:
2617
contents: read
2718
packages: write
28-
# This is used to complete the identity challenge
29-
# with sigstore/fulcio when running outside of PRs.
3019
id-token: write
3120

3221
steps:
3322
- name: Checkout repository
3423
uses: actions/checkout@v4
35-
# Workaround: https://github.com/docker/build-push-action/issues/461
24+
3625
- name: Setup Docker buildx
3726
uses: docker/[email protected]
3827

39-
# TODO: run tests
40-
41-
# Login against a Docker registry except on PR
42-
# https://github.com/docker/login-action
4328
- name: Log into registry ${{ env.REGISTRY }}
44-
if: ${{ github.ref == 'refs/heads/master' || github.event_name == 'pull_request' && github.head_ref == 'develop' }}
29+
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
4530
uses: docker/[email protected]
4631
with:
4732
registry: ${{ env.REGISTRY }}
4833
username: ${{ github.actor }}
4934
password: ${{ secrets.GITHUB_TOKEN }}
5035

51-
# Extract metadata (tags, labels) for Docker
52-
# https://github.com/docker/metadata-action
5336
- name: Extract Docker metadata
5437
id: meta
5538
uses: docker/[email protected]
5639
with:
5740
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
5841

59-
# Build and push Docker image with Buildx (don't push on PR)
60-
# https://github.com/docker/build-push-action
6142
- name: Build and push Docker image
62-
id: build-and-push
6343
uses: docker/[email protected]
6444
with:
6545
context: .
66-
# platforms: linux/amd64,linux/arm64,linux/arm/v6,linux/arm/v7
67-
push: ${{ github.ref == 'refs/heads/master' || github.event_name == 'pull_request' && github.head_ref == 'develop' }}
46+
push: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
6847
tags: ${{ steps.meta.outputs.tags }}
69-
# cache-from: type=gha
70-
# cache-to: type=gha,mode=max
71-
72-
# # Sign the resulting Docker image digest except on PRs.
73-
# # This will only write to the public Rekor transparency log when the Docker
74-
# # repository is public to avoid leaking data. If you would like to publish
75-
# # transparency data even for private images, pass --force to cosign below.
76-
# # https://github.com/sigstore/cosign
77-
# - name: Sign the published Docker image
78-
# if: ${{ github.event_name != 'pull_request' }}
79-
# env:
80-
# COSIGN_EXPERIMENTAL: "true"
81-
# # This step uses the identity token to provision an ephemeral certificate
82-
# # against the sigstore community Fulcio instance.
83-
# run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign sign {}@${{ steps.build-and-push.outputs.digest }}

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/handlers/plex_handler.go

+1
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ func interfaceRemote(cmd string, c *homeassistant.HomeAssistantClient) error {
143143
// play is both the "resume" button and play
144144
func mediaPlay(client *plex.PlexClient, beqClient *ezbeq.BeqClient, haClient *homeassistant.HomeAssistantClient, avrClient avr.AVRClient, payload models.PlexWebhookPayload, m *models.SearchRequest, useAvrCodec bool, data models.MediaContainer, skipActions *bool, wg *sync.WaitGroup) {
145145
go common.ChangeLight("off")
146+
go common.ChangeMasterVolume(m.MediaType)
146147
var err error
147148
// slower but more accurate
148149
// TODO: abstract library this for any AVR

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)