Compare commits
3 Commits
1eb81d2da5
...
1888592d07
Author | SHA1 | Date |
---|---|---|
Stein Ivar Berghei | 1888592d07 | |
Stein Ivar Berghei | 1d2374a398 | |
Stein Ivar Berghei | bec3683b44 |
|
@ -0,0 +1,16 @@
|
|||
ambiance
|
||||
bin
|
||||
cache
|
||||
config
|
||||
cookies.txt
|
||||
dndmusicbot
|
||||
Dockerfile
|
||||
.git
|
||||
.gitignore
|
||||
.dockerignore
|
||||
.jsimage
|
||||
k8s
|
||||
MPD
|
||||
oauth.cfg
|
||||
test
|
||||
src
|
|
@ -1,14 +1,14 @@
|
|||
FROM golang:1.20 as builder
|
||||
FROM golang:1.21-bookworm as builder
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN apt-get update && apt-get -y install libopus-dev libopusfile-dev && \
|
||||
go build
|
||||
|
||||
FROM debian:bullseye-slim
|
||||
FROM debian:bookworm-slim
|
||||
RUN apt-get update && apt-get -y install \
|
||||
ca-certificates \
|
||||
libopus-dev libopusfile-dev \
|
||||
mpd
|
||||
mpd ffmpeg
|
||||
|
||||
COPY --from=builder /src/dndmusicbot /app/
|
||||
ADD tmpl /app/tmpl
|
||||
|
|
12
events.go
12
events.go
|
@ -374,16 +374,8 @@ func (app *App) songPosition(payload ...interface{}) {
|
|||
msg := make(map[string]interface{})
|
||||
out := make(map[string]interface{})
|
||||
|
||||
slen, err := strconv.ParseFloat(status["duration"], 64)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
return
|
||||
}
|
||||
|
||||
spos, err := strconv.ParseFloat(status["elapsed"], 64)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
slen, _ := strconv.ParseFloat(status["duration"], 64)
|
||||
spos, _ := strconv.ParseFloat(status["elapsed"], 64)
|
||||
|
||||
msg["event"] = "song_position"
|
||||
out["len"] = time.Duration(slen * float64(time.Second)).Milliseconds()
|
||||
|
|
|
@ -70,13 +70,13 @@
|
|||
<section>
|
||||
<div id="volume_playlist" class="input-container">
|
||||
<label for="playlist-volume">Playlist</label>
|
||||
<input type="range" id="playlist-volume" min="-6" max="1" step="0.1">
|
||||
<input id="playlist-volume-number" type="number" min="-6" max="1" step="0.1" style="width:50px" />
|
||||
<input type="range" id="playlist-volume" min="-10" max="4" step="0.1">
|
||||
<input id="playlist-volume-number" type="number" min="-10" max="4" step="0.1" style="width:50px" />
|
||||
</div>
|
||||
<div id="volume_ambiance" class="input-container">
|
||||
<label for="ambiance-volume">Ambiance</label>
|
||||
<input type="range" id="ambiance-volume" min="-4" max="4" step="0.1">
|
||||
<input id="ambiance-volume-number" type="number" min="-4" max="4" step="0.1" style="width:50px" />
|
||||
<input type="range" id="ambiance-volume" min="-10" max="4" step="0.1">
|
||||
<input id="ambiance-volume-number" type="number" min="-10" max="4" step="0.1" style="width:50px" />
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
|
Loading…
Reference in New Issue