Skip to content

Commit 0e5cc2d

Browse files
Merge pull request #1 from GerardPolloRebozado/feat/musicBrainz
Feat/music brainz
2 parents b0635b6 + e777dfa commit 0e5cc2d

24 files changed

Lines changed: 1020 additions & 563 deletions

.air.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ tmp_dir = "tmp"
55
[build]
66
args_bin = []
77
bin = "./tmp/main"
8-
cmd = "go build -o ./tmp/main ./cmd/navitube/main.go"
8+
cmd = "go build -o ./tmp/main ./src/main.go"
99
delay = 1000
1010
exclude_dir = ["assets", "tmp", "vendor", "testdata", "music"]
1111
exclude_file = []

.env.example

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
NAVIDROME_BASE=http://localhost:4533
1+
NAVIDROME_BASE=http://localhost:4533
2+
COUNTRY=ES
3+
METADATA_PROVIDER=musicbrainz
4+
RESULTS_PER_PAGE=20

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RUN go mod download
99

1010
COPY . .
1111

12-
RUN CGO_ENABLED=0 GOOS=linux go build -o navifetch ./cmd/navitube
12+
RUN CGO_ENABLED=0 GOOS=linux go build -o navifetch ./cmd/navifetch
1313

1414
FROM alpine:latest
1515

README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This tool is intended for use with authorized content only. The developer is not
1818
### Features
1919

2020
- Seamless integration with Subsonic-compatible clients.
21-
- Automatic fallback to iTunes API for missing content.
21+
- Automatic fallback to iTunes/MusicBrainz API for missing content. (iTunes doesn't work very well)
2222
- Dynamic downloading and streaming.
2323
- Automatic cleanup of temporary files.
2424
- Persistent storage for tracks added to playlists.
@@ -39,14 +39,20 @@ services:
3939
environment:
4040
- NAVIDROME_BASE=http://navidrome:4533
4141
restart: unless-stopped
42+
volumes:
43+
- /path/to/music:/music
4244

4345
```
4446

4547
### Configuration
4648

4749
Navifetch can be configured using the following environment variables:
48-
49-
| Variable | Description | Default |
50-
|----------|-------------|---------|
51-
| `NAVIDROME_BASE` | **Required**. The base URL of your Subsonic/Navidrome server. | None |
50+
It is recommended to use MusicBrainz for metadata as iTunes wont be able to stream directly when downloading a song it will only be able to downlaod it.
51+
52+
| Variable | Description | Default |
53+
|---------------------|---------------------------------------------------------------|---------|
54+
| `NAVIDROME_BASE` | **Required**. The base URL of your Subsonic/Navidrome server. | None |
55+
| `COUNTRY` | The country code to use for iTunes API requests. | `US` |
56+
| `METADATA_PROVIDER` | The metadata provider to use for. `itunes` or `musicbrainz`. | None |
57+
| `RESULTS_PER_PAGE` | The number of results to display per page. | `10` |
5258

go.mod

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1-
module github.com/GerardPolloRebozado/navitube
1+
module github.com/GerardPolloRebozado/navifetch
22

33
go 1.25.5
44

5-
require github.com/joho/godotenv v1.5.1
5+
require (
6+
github.com/joho/godotenv v1.5.1
7+
github.com/torabit/itunes v0.0.0-20230702053550-80ae037e7f4f
8+
go.uploadedlobster.com/mbtypes v0.4.0
9+
go.uploadedlobster.com/musicbrainzws2 v0.18.0
10+
)
611

7-
require github.com/torabit/itunes v0.0.0-20230702053550-80ae037e7f4f // indirect
12+
require (
13+
github.com/go-resty/resty/v2 v2.17.1 // indirect
14+
golang.org/x/net v0.48.0 // indirect
15+
)

go.sum

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1+
github.com/go-resty/resty/v2 v2.17.1 h1:x3aMpHK1YM9e4va/TMDRlusDDoZiQ+ViDu/WpA6xTM4=
2+
github.com/go-resty/resty/v2 v2.17.1/go.mod h1:kCKZ3wWmwJaNc7S29BRtUhJwy7iqmn+2mLtQrOyQlVA=
13
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
24
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
35
github.com/torabit/itunes v0.0.0-20230702053550-80ae037e7f4f h1:xMCVryBmnnZP14qap4kDHrE7c7YmvhVDaDMCMMT7Pdw=
46
github.com/torabit/itunes v0.0.0-20230702053550-80ae037e7f4f/go.mod h1:Hm4MVfhzwIYmI8+6Az10Gh8VEEM+LTw2TfP8QZJ/G34=
7+
go.uploadedlobster.com/mbtypes v0.4.0 h1:D5asCgHsRWufj4Yn5u0IuH2J9z1UuYImYkYIp1Z1Q7s=
8+
go.uploadedlobster.com/mbtypes v0.4.0/go.mod h1:Bu1K1Hl77QTAE2Z7QKiW/JAp9KqYWQebkRRfG02dlZM=
9+
go.uploadedlobster.com/musicbrainzws2 v0.18.0 h1:fNhAadkhq6L9x+p02xhU6yrQ6AJq892gt+LMkvwf9/w=
10+
go.uploadedlobster.com/musicbrainzws2 v0.18.0/go.mod h1:CUXMHdvAnAV58VOoLtoXGD8MUrI5FkDMKqmrHL84MGo=
11+
golang.org/x/net v0.48.0 h1:zyQRTTrjc33Lhh0fBgT/H3oZq9WuvRR5gPC70xpDiQU=
12+
golang.org/x/net v0.48.0/go.mod h1:+ndRgGjkh8FGtu1w1FGbEC31if4VrNVMuKTgcAAnQRY=
13+
golang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE=
14+
golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg=

0 commit comments

Comments
 (0)