Skip to content

Commit

Permalink
feat(jukebox): use mpv over ipc as a player backend
Browse files Browse the repository at this point in the history
  • Loading branch information
sentriz committed Nov 16, 2022
1 parent ec97289 commit e1488b0
Show file tree
Hide file tree
Showing 26 changed files with 677 additions and 251 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nightly-release.yaml
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt update -qq
sudo apt install -y -qq build-essential git sqlite libtag1-dev ffmpeg libasound-dev zlib1g-dev
sudo apt install -y -qq build-essential git sqlite libtag1-dev ffmpeg mpv zlib1g-dev
- name: Lint
uses: golangci/golangci-lint-action@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt update -qq
sudo apt install -y -qq build-essential git sqlite libtag1-dev ffmpeg libasound-dev zlib1g-dev
sudo apt install -y -qq build-essential git sqlite libtag1-dev ffmpeg mpv zlib1g-dev
- name: Lint
uses: golangci/golangci-lint-action@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt update -qq
sudo apt install -y -qq build-essential git sqlite libtag1-dev ffmpeg libasound-dev zlib1g-dev
sudo apt install -y -qq build-essential git sqlite libtag1-dev ffmpeg mpv zlib1g-dev
- name: Lint
uses: golangci/golangci-lint-action@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Expand Up @@ -5,7 +5,6 @@ RUN apk add -U --no-cache \
git \
sqlite \
taglib-dev \
alsa-lib-dev \
zlib-dev \
go
WORKDIR /src
Expand All @@ -15,10 +14,11 @@ RUN go mod download
COPY . .
RUN GOOS=linux go build -o gonic cmd/gonic/gonic.go

FROM alpine:3.15
FROM alpine:3.16
LABEL org.opencontainers.image.source https://github.com/sentriz/gonic
RUN apk add -U --no-cache \
ffmpeg \
mpv \
ca-certificates \
tzdata \
tini
Expand Down
1 change: 0 additions & 1 deletion Dockerfile.debug
Expand Up @@ -5,6 +5,5 @@ RUN apk add -U --no-cache \
git \
sqlite \
taglib-dev \
alsa-lib-dev \
zlib-dev
WORKDIR /src
4 changes: 2 additions & 2 deletions Dockerfile.dev
Expand Up @@ -7,17 +7,17 @@ RUN apk add -U --no-cache \
git \
sqlite \
taglib-dev \
alsa-lib-dev \
zlib-dev
WORKDIR /src
COPY . .
RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
GOOS=linux go build -o gonic cmd/gonic/gonic.go

FROM alpine:3.15
FROM alpine:3.16
RUN apk add -U --no-cache \
ffmpeg \
mpv \
ca-certificates
COPY --from=builder \
/usr/lib/libgcc_s.so.1 \
Expand Down
2 changes: 1 addition & 1 deletion cmd/gonic/gonic.go
Expand Up @@ -142,7 +142,7 @@ func main() {
g.Add(server.StartScanWatcher())
}
if *confJukeboxEnabled {
g.Add(server.StartJukebox())
g.Add(server.StartJukebox(nil))
}
if *confPodcastPurgeAgeDays > 0 {
g.Add(server.StartPodcastPurger(time.Duration(*confPodcastPurgeAgeDays) * 24 * time.Hour))
Expand Down
13 changes: 4 additions & 9 deletions go.mod
Expand Up @@ -4,9 +4,9 @@ go 1.19

require (
github.com/Masterminds/sprig v2.22.0+incompatible
github.com/dexterlb/mpvipc v0.0.0-20210824102722-5d27ef06b6c3
github.com/disintegration/imaging v1.6.2
github.com/dustin/go-humanize v1.0.0
github.com/faiface/beep v1.1.0
github.com/fsnotify/fsnotify v1.6.0
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
github.com/gorilla/mux v1.8.0
Expand All @@ -16,6 +16,7 @@ require (
github.com/josephburnett/jd v1.5.2
github.com/matryer/is v1.4.0
github.com/mattn/go-sqlite3 v1.14.16
github.com/mitchellh/mapstructure v1.5.0
github.com/mmcdole/gofeed v1.1.3
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
github.com/nicksellen/audiotags v0.0.0-20160226222119-94015fa599bd
Expand All @@ -24,6 +25,7 @@ require (
github.com/peterbourgon/ff v1.7.1
github.com/rainycape/unidecode v0.0.0-20150907023854-cb7f23ec59be
github.com/sentriz/gormstore v0.0.0-20220105134332-64e31f7f6981
golang.org/x/exp v0.0.0-20221114191408-850992195362
gopkg.in/gormigrate.v1 v1.6.0
)

Expand All @@ -36,32 +38,25 @@ require (
github.com/go-openapi/swag v0.21.1 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/context v1.1.1 // indirect
github.com/hajimehoshi/go-mp3 v0.3.4 // indirect
github.com/hajimehoshi/oto v1.0.1 // indirect
github.com/huandu/xstrings v1.3.3 // indirect
github.com/icza/bitio v1.1.0 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.2 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/lib/pq v1.3.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mewkiz/flac v1.0.7 // indirect
github.com/mewkiz/pkg v0.0.0-20220820102221-bbbca16e2a6c // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/mmcdole/goxpp v0.0.0-20200921145534-2f3784f67354 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/stretchr/testify v1.7.0 // indirect
golang.org/x/crypto v0.2.0 // indirect
golang.org/x/exp/shiny v0.0.0-20221114191408-850992195362 // indirect
golang.org/x/image v0.1.0 // indirect
golang.org/x/mobile v0.0.0-20221110043201-43a038452099 // indirect
golang.org/x/net v0.2.0 // indirect
golang.org/x/sys v0.2.0 // indirect
golang.org/x/text v0.4.0 // indirect
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)

0 comments on commit e1488b0

Please sign in to comment.