Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
goicy.ini
playlist.txt
README.md
.gitattributes
.gitignore
19 changes: 19 additions & 0 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Build and Publish Docker Image
on:
release:
types: [published]
jobs:
push_to_registry:
name: Build and Push to Github Packages
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Build and Push
uses: docker/build-push-action@v1
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
repository: bgroupe/goicy/goicy
tag_with_ref: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
*.exe
.idea/
tests/
.DS_Store
32 changes: 32 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
before:
hooks:
# You may remove this if you don't use go modules.
- go mod download
# you may remove this if you don't need go generate
- go generate ./...
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
golang 1.13
35 changes: 35 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"editor.fontFamily": "JetBrains Mono",
"todohighlight.defaultStyle": {
"color": "#fff",
"backgroundColor": "#783"
},
"todohighlight.keywords": [
{
"text": "DONE:",
"color": "#fff",
"backgroundColor": "#319410",
"overviewRulerColor": "#ffab00",
// "cursor": "pointer",
"border": "1px solid #eee",
"borderRadius": "2spx",
},
{
"text": "TODO:",
"color": "#f7f7f7",
"backgroundColor": "#F6B205",
"overviewRulerColor": "#ffab00",
// "cursor": "pointer",
"border": "1px solid #eee",
"borderRadius": "2px",
},
{
"text": "STEP:",
"color": "#f7f7f7",
"backgroundColor": "#892C7D",
"overviewRulerColor": "#ffab00",
// "cursor": "pointer",
"border": "1px solid #eee",
"borderRadius": "2px",
}
]
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM golang:1.13-alpine

WORKDIR /app


COPY . /app

RUN go mod download

RUN go build ./goicy.go


ENTRYPOINT [ "/app/goicy" ]
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ for example here: https://sourceforge.net/projects/ffmpeg-hi/
## How do I install goicy?
The `go get` command will automatically fetch all dependencies required, compile the binary and place it in your $GOPATH/bin directory.

go get github.com/stunndard/goicy
go get github.com/bgroupe/goicy

## How do I configure it?
Read `goicy.ini`. Tune it for your needs.
Expand Down Expand Up @@ -109,7 +109,7 @@ In `file` mode, though, you can only use AAC or MP1/MP2/MP3 files:
/home/goicy/tracks/track5.aac
```

or
or
```
/home/goicy/tracks/track1.mp3
/home/goicy/tracks/track2.mp3
Expand All @@ -127,4 +127,3 @@ mode.
goicy inifile, i.e.:

./goicy /etc/goicy/rock.ini

6 changes: 3 additions & 3 deletions aac/aac.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package aac

import (
"github.com/stunndard/goicy/logger"
"github.com/stunndard/goicy/util"
"github.com/bgroupe/goicy/logger"
"github.com/bgroupe/goicy/util"
"io"
"os"
"strconv"
Expand Down Expand Up @@ -348,7 +348,7 @@ func GetFileInfo(filename string, br *float64, spf, sr, frames, ch *int) error {
*frames = frame - 1
nsamples := 1024 * *frames
playtime := nsamples / *sr
*br = float64(fsize - firstFramePos) / float64(playtime)
*br = float64(fsize-firstFramePos) / float64(playtime)
*br = *br * 8 / 1000

logger.Log("frames : "+strconv.Itoa(*frames), logger.LOG_DEBUG)
Expand Down
14 changes: 12 additions & 2 deletions config/config.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package config

// TODO: ini is out of date - update to v1
import (
"github.com/go-ini/ini"
)
Expand All @@ -21,6 +22,10 @@ type Config struct {
BufferSize int `ini:"buffersize"`
Playlist string `ini:"playlist"`
PlaylistType string `ini:"playlistype"`
BasePath string `ini:"basepath"`
StorageType string `ini:"storagetype"`
AccessKey string `ini:"accesskey"`
SecretKey string `ini:"secretkey"`
NpFile string `ini:"npfile"`
LogFile string `ini:"logfile"`
ScriptFile string `ini:"logfile"`
Expand All @@ -32,7 +37,6 @@ type Config struct {
StreamURL string `ini:"url"`
StreamGenre string `ini:"genre"`
StreamPublic bool `ini:"public"`
IsDaemon bool `ini:"daemon"`
PidFile string
FFMPEGPath string
}
Expand Down Expand Up @@ -70,18 +74,24 @@ func LoadConfig(filename string) error {
Cfg.StreamGenre = ini.Section("stream").Key("genre").Value()
Cfg.StreamPublic, _ = ini.Section("stream").Key("public").Bool()

// [playlist]
Cfg.PlaylistType = ini.Section("playlist").Key("playlisttype").Value()
Cfg.Playlist = ini.Section("playlist").Key("playlist").Value()
Cfg.BasePath = ini.Section("playlist").Key("basepath").Value()
Cfg.PlayRandom, _ = ini.Section("playlist").Key("playrandom").Bool()

// [remotefs]
Cfg.StorageType = ini.Section("remotefs").Key("storagetype").Value()
Cfg.AccessKey = ini.Section("remotefs").Key("accesskey").Value()
Cfg.SecretKey = ini.Section("remotefs").Key("secretkey").Value()

Cfg.BufferSize, _ = ini.Section("misc").Key("buffersize").Int()
Cfg.BufferSize *= 1000
Cfg.UpdateMetadata, _ = ini.Section("misc").Key("updatemetadata").Bool()
Cfg.ScriptFile = ini.Section("misc").Key("script").Value()
Cfg.NpFile = ini.Section("misc").Key("npfile").Value()
Cfg.LogFile = ini.Section("misc").Key("logfile").Value()
Cfg.LogLevel, _ = ini.Section("misc").Key("loglevel").Int()
Cfg.IsDaemon, _ = ini.Section("misc").Key("daemon").Bool()
Cfg.PidFile = ini.Section("misc").Key("pidfile").Value()

return nil
Expand Down
4 changes: 2 additions & 2 deletions cuesheet/cuesheet.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package cuesheet

import (
"bufio"
"github.com/stunndard/goicy/logger"
"github.com/stunndard/goicy/metadata"
"github.com/bgroupe/goicy/logger"
"github.com/bgroupe/goicy/metadata"
"io"
"os"
"strconv"
Expand Down
99 changes: 0 additions & 99 deletions daemon/command_linux.go

This file was deleted.

Loading