mirror of
https://git.maid.zone/stuff/soundcloak.git
synced 2025-12-10 05:39:38 +05:00
Compare commits
2 Commits
c83cea39d8
...
9a32e56088
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a32e56088 | ||
|
|
8995409609 |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -17,6 +17,7 @@ fly.toml
|
||||
|
||||
# codegen
|
||||
*_templ.go
|
||||
!rss_templ.go
|
||||
regexp2_codegen.go
|
||||
|
||||
# built binary
|
||||
@@ -25,4 +26,5 @@ main
|
||||
!.gitkeep
|
||||
|
||||
# for development/testing
|
||||
Caddyfile
|
||||
Caddyfile
|
||||
misc/
|
||||
@@ -1,4 +1,4 @@
|
||||
ARG GO_VERSION=1.25.3
|
||||
ARG GO_VERSION=1.25.4
|
||||
|
||||
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION} AS build
|
||||
ARG TARGETOS
|
||||
|
||||
@@ -12,3 +12,11 @@ services:
|
||||
- no-new-privileges:true
|
||||
volumes:
|
||||
- ./soundcloak.json:/soundcloak.json
|
||||
# Or configure with env variables:
|
||||
#environment:
|
||||
# SOUNDCLOAK_CONFIG: 'FROM_ENV' # important to have this, otherwise config loads from json file
|
||||
# CODEGEN_CONFIG: 'true'
|
||||
# DEFAULT_PREFERENCES: '{"ShowAudio": true}'
|
||||
# PROXY_IMAGES: 'true'
|
||||
# PROXY_STREAMS: 'true'
|
||||
# RESTREAM: 'true'
|
||||
|
||||
@@ -16,15 +16,7 @@ git clone https://git.maid.zone/stuff/soundcloak
|
||||
cd soundcloak
|
||||
```
|
||||
|
||||
3. Build binary:
|
||||
|
||||
This uses the `build` script, which generates code from templates, generates code for regular expiressions, and then builds the binary.
|
||||
|
||||
```sh
|
||||
./build
|
||||
```
|
||||
|
||||
4. Download required JS modules:
|
||||
3. Download required JS modules:
|
||||
|
||||
Currently it's just HLS.js. This is what powers the HLS player
|
||||
|
||||
@@ -32,6 +24,14 @@ Currently it's just HLS.js. This is what powers the HLS player
|
||||
go tool soundcloakctl js download
|
||||
```
|
||||
|
||||
4. Build binary:
|
||||
|
||||
This uses the `build` script, which generates code from templates, generates code for regular expiressions, and then builds the binary.
|
||||
|
||||
```sh
|
||||
./build
|
||||
```
|
||||
|
||||
Now, you can run soundcloak with the `./main` binary. By default, it is listening on `127.0.0.1:4664`. For a configuration guide, [refer to here](INSTANCE_GUIDE.md#configuration-guide)
|
||||
|
||||
# Updating your local setup
|
||||
|
||||
4
go.mod
4
go.mod
@@ -1,6 +1,6 @@
|
||||
module git.maid.zone/stuff/soundcloak
|
||||
|
||||
go 1.25.3
|
||||
go 1.25.4
|
||||
|
||||
require (
|
||||
github.com/a-h/templ v0.3.960
|
||||
@@ -35,7 +35,7 @@ require (
|
||||
github.com/philhofer/fwd v1.2.0 // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/sunfish-shogi/bufseekio v0.1.0 // indirect
|
||||
github.com/tinylib/msgp v1.4.0 // indirect
|
||||
github.com/tinylib/msgp v1.5.0 // indirect
|
||||
github.com/valyala/bytebufferpool v1.0.0 // indirect
|
||||
golang.org/x/crypto v0.43.0 // indirect
|
||||
golang.org/x/mod v0.28.0 // indirect
|
||||
|
||||
4
go.sum
4
go.sum
@@ -86,8 +86,8 @@ github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD
|
||||
github.com/sunfish-shogi/bufseekio v0.0.0-20210207115823-a4185644b365/go.mod h1:dEzdXgvImkQ3WLI+0KQpmEx8T/C/ma9KeS3AfmU899I=
|
||||
github.com/sunfish-shogi/bufseekio v0.1.0 h1:zu38kFbv0KuuiwZQeuYeS02U9AM14j0pVA9xkHOCJ2A=
|
||||
github.com/sunfish-shogi/bufseekio v0.1.0/go.mod h1:dEzdXgvImkQ3WLI+0KQpmEx8T/C/ma9KeS3AfmU899I=
|
||||
github.com/tinylib/msgp v1.4.0 h1:SYOeDRiydzOw9kSiwdYp9UcBgPFtLU2WDHaJXyHruf8=
|
||||
github.com/tinylib/msgp v1.4.0/go.mod h1:cvjFkb4RiC8qSBOPMGPSzSAx47nAsfhLVTCZZNuHv5o=
|
||||
github.com/tinylib/msgp v1.5.0 h1:GWnqAE54wmnlFazjq2+vgr736Akg58iiHImh+kPY2pc=
|
||||
github.com/tinylib/msgp v1.5.0/go.mod h1:cvjFkb4RiC8qSBOPMGPSzSAx47nAsfhLVTCZZNuHv5o=
|
||||
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
|
||||
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
|
||||
github.com/valyala/fasthttp v1.68.0 h1:v12Nx16iepr8r9ySOwqI+5RBJ/DqTxhOy1HrHoDFnok=
|
||||
|
||||
16
lib/sc/rss_templ.go
Normal file
16
lib/sc/rss_templ.go
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
// Code generated by hands
|
||||
// Run templ generate to generate the real code
|
||||
package sc
|
||||
|
||||
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
||||
|
||||
import (
|
||||
"git.maid.zone/stuff/soundcloak/lib/cfg"
|
||||
"github.com/a-h/templ"
|
||||
)
|
||||
|
||||
func TrackDescription(prefs cfg.Preferences, t *Track, href string) templ.Component {
|
||||
return templ.NopComponent
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user