diff --git a/.dockerignore b/.dockerignore
index 56e62ecfc..8402e7126 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -7,5 +7,5 @@ data
*.db
testDB
*_test.go
-sonic-server
+navidrome
assets/*gen.go
diff --git a/.gitignore b/.gitignore
index 13bfc672d..1c0d86791 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,7 @@
.DS_Store
.idea
.envrc
-/sonic-server
+/navidrome
/iTunes*.xml
/tmp
data/*
@@ -10,7 +10,7 @@ wiki
TODO.md
var
Artwork
-sonic.toml
+navidrome.toml
master.zip
Jamstash-master
testDB
diff --git a/API_COMPATIBILITY.md b/API_COMPATIBILITY.md
index e92723ed9..b7e747255 100644
--- a/API_COMPATIBILITY.md
+++ b/API_COMPATIBILITY.md
@@ -1,14 +1,14 @@
### Supported Subsonic API endpoints
-CloudSonic is currently compatible with [Subsonic API](subsonic.org/pages/api.jsp) v1.8.0, with some exceptions.
+Navidrome is currently compatible with [Subsonic API](subsonic.org/pages/api.jsp) v1.8.0, with some exceptions.
-This is an (almost) up to date list of all Subsonic API endpoints implemented by CloudSonic.
+This is an (almost) up to date list of all Subsonic API endpoints implemented by Navidrome.
Check the "Notes" column for limitations/missing behaviour. Also keep in mind these differences between
-CloudSonic and Subsonic:
+Navidrome and Subsonic:
-* Right now, CloudSonic only works with a single Music Library (Music Folder)
-* CloudSonic does not mark songs as played by calls to `stream`, only when
+* Right now, Navidrome only works with a single Music Library (Music Folder)
+* Navidrome does not mark songs as played by calls to `stream`, only when
`scrobble` is called with `submission=true`
* Next features to be implemented: Playlists (WIP), MultiUser (WIP), Jukebox, Sharing, Podcasts, Bookmarks, Internet Radio.
diff --git a/Dockerfile b/Dockerfile
index b8c283992..824ce403c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -40,14 +40,14 @@ RUN cd /tmp && tar xJf ffmpeg.tar.xz
#####################################################
### Build Final Image
FROM alpine
-COPY --from=gobuilder /src/sonic-server /app/
+COPY --from=gobuilder /src/navidrome /app/
COPY --from=gobuilder /tmp/ffmpeg*/ffmpeg /usr/bin/
VOLUME ["/data", "/music"]
-ENV SONIC_DBPATH /data/cloudsonic.db
+ENV SONIC_DBPATH /data/navidrome.db
ENV SONIC_MUSICFOLDER /music
ENV SONIC_LOGLEVEL info
EXPOSE 4533
WORKDIR /app
-CMD "/app/sonic-server"
+CMD "/app/navidrome"
diff --git a/README.md b/README.md
index c46daae86..f22059834 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,9 @@
-# CloudSonic Server
+# Navidrome Music Streamer
-[](https://github.com/cloudsonic/sonic-server/actions)
-[](https://goreportcard.com/report/github.com/cloudsonic/sonic-server)
+[](https://github.com/deluan/navidrome/actions)
+[](https://goreportcard.com/report/github.com/deluan/navidrome)
-CloudSonic is a music collection server and streamer, allowing you to listen to your music collection from anywhere.
+Navidrome is a music collection server and streamer, allowing you to listen to your music collection from anywhere.
It relies on the huge selection of available mobile and web apps compatible with [Subsonic](http://www.subsonic.org),
[Airsonic](https://airsonic.github.io/) and [Madsonic](https://www.madsonic.org/)
@@ -41,7 +41,7 @@ Creating initial user. Please change the password! password=be32e686-d59b-4f57-
You can change this password using the UI. Just login in with this temporary password at http://localhost:4533
-To change any configuration, create a file named `sonic.toml` in the project folder. For all options see the
+To change any configuration, create a file named `navidrome.toml` in the project folder. For all options see the
[configuration.go](conf/configuration.go) file
### Development Environment
@@ -66,6 +66,6 @@ $ make test
### Copying
-CloudSonic - Copyright (C) 2017-2020 Deluan Cotts Quintao
+Navidrome - Copyright (C) 2017-2020 Deluan Cotts Quintao
The source code is licensed under GNU Affero GPL v3. License is available [here](/LICENSE)
diff --git a/assets/external.go b/assets/external.go
index 16040c9e7..ce2b9814a 100644
--- a/assets/external.go
+++ b/assets/external.go
@@ -5,7 +5,7 @@ package assets
import (
"net/http"
- "github.com/cloudsonic/sonic-server/consts"
+ "github.com/deluan/navidrome/consts"
)
func AssetFile() http.FileSystem {
diff --git a/conf/configuration.go b/conf/configuration.go
index 3497152ab..90764d87c 100644
--- a/conf/configuration.go
+++ b/conf/configuration.go
@@ -3,14 +3,15 @@ package conf
import (
"os"
- "github.com/cloudsonic/sonic-server/log"
+ "github.com/deluan/navidrome/consts"
+ "github.com/deluan/navidrome/log"
"github.com/koding/multiconfig"
)
type sonic struct {
Port string `default:"4533"`
MusicFolder string `default:"./music"`
- DbPath string `default:"./data/cloudsonic.db"`
+ DbPath string `default:"./data/navidrome.db"`
LogLevel string `default:"info"`
IgnoredArticles string `default:"The El La Los Las Le Les Os As O A"`
@@ -62,8 +63,8 @@ func LoadFromFile(tomlFile string) {
}
func LoadFromLocalFile() {
- if _, err := os.Stat("./sonic.toml"); err == nil {
- LoadFromFile("./sonic.toml")
+ if _, err := os.Stat(consts.LocalConfigFile); err == nil {
+ LoadFromFile(consts.LocalConfigFile)
}
}
diff --git a/consts/consts.go b/consts/consts.go
index d7ab41813..ce14187b4 100644
--- a/consts/consts.go
+++ b/consts/consts.go
@@ -3,10 +3,11 @@ package consts
import "time"
const (
+ LocalConfigFile = "./navidrome.toml"
InitialSetupFlagKey = "InitialSetup"
JWTSecretKey = "JWTSecret"
- JWTIssuer = "CloudSonic"
+ JWTIssuer = "Navidrome"
JWTTokenExpiration = 30 * time.Minute
InitialUserName = "admin"
diff --git a/docker-compose.yml b/docker-compose.yml
index 8eab28b07..d45a8b83c 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -2,7 +2,7 @@
version: "3"
services:
- cloudsonic:
+ navidrome:
build: .
ports:
- "4533:4533"
diff --git a/engine/browser.go b/engine/browser.go
index abd22bb72..123c7f24e 100644
--- a/engine/browser.go
+++ b/engine/browser.go
@@ -8,9 +8,9 @@ import (
"strings"
"time"
- "github.com/cloudsonic/sonic-server/log"
- "github.com/cloudsonic/sonic-server/model"
- "github.com/cloudsonic/sonic-server/utils"
+ "github.com/deluan/navidrome/log"
+ "github.com/deluan/navidrome/model"
+ "github.com/deluan/navidrome/utils"
)
type Browser interface {
diff --git a/engine/browser_test.go b/engine/browser_test.go
index 968f08b93..92a7c711c 100644
--- a/engine/browser_test.go
+++ b/engine/browser_test.go
@@ -4,8 +4,8 @@ import (
"context"
"errors"
- "github.com/cloudsonic/sonic-server/model"
- "github.com/cloudsonic/sonic-server/persistence"
+ "github.com/deluan/navidrome/model"
+ "github.com/deluan/navidrome/persistence"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/engine/common.go b/engine/common.go
index f7d84cf0f..c95a04c6a 100644
--- a/engine/common.go
+++ b/engine/common.go
@@ -5,7 +5,7 @@ import (
"fmt"
"time"
- "github.com/cloudsonic/sonic-server/model"
+ "github.com/deluan/navidrome/model"
)
type Entry struct {
diff --git a/engine/cover.go b/engine/cover.go
index 8f46c0868..6fb22c152 100644
--- a/engine/cover.go
+++ b/engine/cover.go
@@ -12,7 +12,7 @@ import (
"os"
"strings"
- "github.com/cloudsonic/sonic-server/model"
+ "github.com/deluan/navidrome/model"
"github.com/dhowden/tag"
"github.com/nfnt/resize"
)
diff --git a/engine/cover_test.go b/engine/cover_test.go
index 8f068fc54..5253955b4 100644
--- a/engine/cover_test.go
+++ b/engine/cover_test.go
@@ -6,10 +6,10 @@ import (
"image"
"testing"
- "github.com/cloudsonic/sonic-server/engine"
- "github.com/cloudsonic/sonic-server/model"
- "github.com/cloudsonic/sonic-server/persistence"
- . "github.com/cloudsonic/sonic-server/tests"
+ "github.com/deluan/navidrome/engine"
+ "github.com/deluan/navidrome/model"
+ "github.com/deluan/navidrome/persistence"
+ . "github.com/deluan/navidrome/tests"
. "github.com/smartystreets/goconvey/convey"
)
diff --git a/engine/engine_suite_test.go b/engine/engine_suite_test.go
index 11743888d..72ec93112 100644
--- a/engine/engine_suite_test.go
+++ b/engine/engine_suite_test.go
@@ -3,7 +3,7 @@ package engine
import (
"testing"
- "github.com/cloudsonic/sonic-server/log"
+ "github.com/deluan/navidrome/log"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/engine/list_generator.go b/engine/list_generator.go
index d625fca1d..d83c060c6 100644
--- a/engine/list_generator.go
+++ b/engine/list_generator.go
@@ -4,7 +4,7 @@ import (
"context"
"time"
- "github.com/cloudsonic/sonic-server/model"
+ "github.com/deluan/navidrome/model"
)
type ListGenerator interface {
diff --git a/engine/mock_property_repo.go b/engine/mock_property_repo.go
index 5f595a410..d796abd0f 100644
--- a/engine/mock_property_repo.go
+++ b/engine/mock_property_repo.go
@@ -3,7 +3,7 @@ package engine
import (
"errors"
- "github.com/cloudsonic/sonic-server/model"
+ "github.com/deluan/navidrome/model"
)
func CreateMockPropertyRepo() *MockProperty {
diff --git a/engine/playlists.go b/engine/playlists.go
index a5bcb33d2..1a5fb9091 100644
--- a/engine/playlists.go
+++ b/engine/playlists.go
@@ -3,9 +3,9 @@ package engine
import (
"context"
- "github.com/cloudsonic/sonic-server/consts"
- "github.com/cloudsonic/sonic-server/model"
- "github.com/cloudsonic/sonic-server/utils"
+ "github.com/deluan/navidrome/consts"
+ "github.com/deluan/navidrome/model"
+ "github.com/deluan/navidrome/utils"
)
type Playlists interface {
diff --git a/engine/ratings.go b/engine/ratings.go
index 06f86c41c..4f968ef6e 100644
--- a/engine/ratings.go
+++ b/engine/ratings.go
@@ -3,8 +3,8 @@ package engine
import (
"context"
- "github.com/cloudsonic/sonic-server/log"
- "github.com/cloudsonic/sonic-server/model"
+ "github.com/deluan/navidrome/log"
+ "github.com/deluan/navidrome/model"
)
type Ratings interface {
diff --git a/engine/scrobbler.go b/engine/scrobbler.go
index 99bc20a51..b65533b6f 100644
--- a/engine/scrobbler.go
+++ b/engine/scrobbler.go
@@ -6,7 +6,7 @@ import (
"fmt"
"time"
- "github.com/cloudsonic/sonic-server/model"
+ "github.com/deluan/navidrome/model"
)
type Scrobbler interface {
diff --git a/engine/search.go b/engine/search.go
index 6ba8364f8..6a913d456 100644
--- a/engine/search.go
+++ b/engine/search.go
@@ -4,7 +4,7 @@ import (
"context"
"strings"
- "github.com/cloudsonic/sonic-server/model"
+ "github.com/deluan/navidrome/model"
"github.com/kennygrant/sanitize"
)
diff --git a/engine/stream.go b/engine/stream.go
index 4cfc31f4f..a902f1541 100644
--- a/engine/stream.go
+++ b/engine/stream.go
@@ -8,8 +8,8 @@ import (
"strconv"
"strings"
- "github.com/cloudsonic/sonic-server/conf"
- "github.com/cloudsonic/sonic-server/log"
+ "github.com/deluan/navidrome/conf"
+ "github.com/deluan/navidrome/log"
)
// TODO Encapsulate as a io.Reader
diff --git a/engine/stream_test.go b/engine/stream_test.go
index 5ea366ab8..953b8ecb4 100644
--- a/engine/stream_test.go
+++ b/engine/stream_test.go
@@ -3,7 +3,7 @@ package engine
import (
"testing"
- . "github.com/cloudsonic/sonic-server/tests"
+ . "github.com/deluan/navidrome/tests"
. "github.com/smartystreets/goconvey/convey"
)
diff --git a/engine/users.go b/engine/users.go
index 2bb5fba80..120d90751 100644
--- a/engine/users.go
+++ b/engine/users.go
@@ -7,8 +7,8 @@ import (
"fmt"
"strings"
- "github.com/cloudsonic/sonic-server/log"
- "github.com/cloudsonic/sonic-server/model"
+ "github.com/deluan/navidrome/log"
+ "github.com/deluan/navidrome/model"
)
type Users interface {
diff --git a/engine/users_test.go b/engine/users_test.go
index 53a9a3e7b..07068f4ee 100644
--- a/engine/users_test.go
+++ b/engine/users_test.go
@@ -3,8 +3,8 @@ package engine
import (
"context"
- "github.com/cloudsonic/sonic-server/model"
- "github.com/cloudsonic/sonic-server/persistence"
+ "github.com/deluan/navidrome/model"
+ "github.com/deluan/navidrome/persistence"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/go.mod b/go.mod
index 81e14e6fc..22905089c 100644
--- a/go.mod
+++ b/go.mod
@@ -1,4 +1,4 @@
-module github.com/cloudsonic/sonic-server
+module github.com/deluan/navidrome
go 1.13
diff --git a/main.go b/main.go
index 43d4c383e..00530d9a7 100644
--- a/main.go
+++ b/main.go
@@ -1,8 +1,8 @@
package main
import (
- "github.com/cloudsonic/sonic-server/conf"
- "github.com/cloudsonic/sonic-server/server"
+ "github.com/deluan/navidrome/conf"
+ "github.com/deluan/navidrome/server"
)
func main() {
diff --git a/persistence/album_repository.go b/persistence/album_repository.go
index 7f1565ccd..15e5691c6 100644
--- a/persistence/album_repository.go
+++ b/persistence/album_repository.go
@@ -7,8 +7,8 @@ import (
"github.com/Masterminds/squirrel"
"github.com/astaxie/beego/orm"
- "github.com/cloudsonic/sonic-server/log"
- "github.com/cloudsonic/sonic-server/model"
+ "github.com/deluan/navidrome/log"
+ "github.com/deluan/navidrome/model"
)
type album struct {
diff --git a/persistence/album_repository_test.go b/persistence/album_repository_test.go
index 0346c8093..e60cd5268 100644
--- a/persistence/album_repository_test.go
+++ b/persistence/album_repository_test.go
@@ -2,7 +2,7 @@ package persistence
import (
"github.com/astaxie/beego/orm"
- "github.com/cloudsonic/sonic-server/model"
+ "github.com/deluan/navidrome/model"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/persistence/annotation_repository.go b/persistence/annotation_repository.go
index 7954a1e9a..cf3a86a8e 100644
--- a/persistence/annotation_repository.go
+++ b/persistence/annotation_repository.go
@@ -4,7 +4,7 @@ import (
"time"
"github.com/astaxie/beego/orm"
- "github.com/cloudsonic/sonic-server/model"
+ "github.com/deluan/navidrome/model"
"github.com/google/uuid"
)
diff --git a/persistence/artist_repository.go b/persistence/artist_repository.go
index cf09aabf2..29a3fab4c 100644
--- a/persistence/artist_repository.go
+++ b/persistence/artist_repository.go
@@ -8,10 +8,10 @@ import (
"github.com/Masterminds/squirrel"
"github.com/astaxie/beego/orm"
- "github.com/cloudsonic/sonic-server/conf"
- "github.com/cloudsonic/sonic-server/log"
- "github.com/cloudsonic/sonic-server/model"
- "github.com/cloudsonic/sonic-server/utils"
+ "github.com/deluan/navidrome/conf"
+ "github.com/deluan/navidrome/log"
+ "github.com/deluan/navidrome/model"
+ "github.com/deluan/navidrome/utils"
)
type artist struct {
diff --git a/persistence/artist_repository_test.go b/persistence/artist_repository_test.go
index 1c974c680..22036dc6c 100644
--- a/persistence/artist_repository_test.go
+++ b/persistence/artist_repository_test.go
@@ -2,7 +2,7 @@ package persistence
import (
"github.com/astaxie/beego/orm"
- "github.com/cloudsonic/sonic-server/model"
+ "github.com/deluan/navidrome/model"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/persistence/genre_repository.go b/persistence/genre_repository.go
index edb17f2aa..700f5d70a 100644
--- a/persistence/genre_repository.go
+++ b/persistence/genre_repository.go
@@ -4,7 +4,7 @@ import (
"strconv"
"github.com/astaxie/beego/orm"
- "github.com/cloudsonic/sonic-server/model"
+ "github.com/deluan/navidrome/model"
)
type genreRepository struct {
diff --git a/persistence/genre_repository_test.go b/persistence/genre_repository_test.go
index 1e82f3dd1..f21ab9550 100644
--- a/persistence/genre_repository_test.go
+++ b/persistence/genre_repository_test.go
@@ -2,7 +2,7 @@ package persistence
import (
"github.com/astaxie/beego/orm"
- "github.com/cloudsonic/sonic-server/model"
+ "github.com/deluan/navidrome/model"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/persistence/mediafile_repository.go b/persistence/mediafile_repository.go
index 307192394..19798bc99 100644
--- a/persistence/mediafile_repository.go
+++ b/persistence/mediafile_repository.go
@@ -7,7 +7,7 @@ import (
"github.com/Masterminds/squirrel"
"github.com/astaxie/beego/orm"
- "github.com/cloudsonic/sonic-server/model"
+ "github.com/deluan/navidrome/model"
)
type mediaFile struct {
diff --git a/persistence/mediafile_repository_test.go b/persistence/mediafile_repository_test.go
index 3326d878b..a972aaf5d 100644
--- a/persistence/mediafile_repository_test.go
+++ b/persistence/mediafile_repository_test.go
@@ -5,7 +5,7 @@ import (
"path/filepath"
"github.com/astaxie/beego/orm"
- "github.com/cloudsonic/sonic-server/model"
+ "github.com/deluan/navidrome/model"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/persistence/mediafolders_repository.go b/persistence/mediafolders_repository.go
index 364e15c7a..2b4298333 100644
--- a/persistence/mediafolders_repository.go
+++ b/persistence/mediafolders_repository.go
@@ -2,8 +2,8 @@ package persistence
import (
"github.com/astaxie/beego/orm"
- "github.com/cloudsonic/sonic-server/conf"
- "github.com/cloudsonic/sonic-server/model"
+ "github.com/deluan/navidrome/conf"
+ "github.com/deluan/navidrome/model"
)
type mediaFolderRepository struct {
diff --git a/persistence/mock_album_repo.go b/persistence/mock_album_repo.go
index fce7e5ff9..6af1b9488 100644
--- a/persistence/mock_album_repo.go
+++ b/persistence/mock_album_repo.go
@@ -5,7 +5,7 @@ import (
"errors"
"fmt"
- "github.com/cloudsonic/sonic-server/model"
+ "github.com/deluan/navidrome/model"
)
func CreateMockAlbumRepo() *MockAlbum {
diff --git a/persistence/mock_artist_repo.go b/persistence/mock_artist_repo.go
index bb85b974d..4c4686142 100644
--- a/persistence/mock_artist_repo.go
+++ b/persistence/mock_artist_repo.go
@@ -5,7 +5,7 @@ import (
"errors"
"fmt"
- "github.com/cloudsonic/sonic-server/model"
+ "github.com/deluan/navidrome/model"
)
func CreateMockArtistRepo() *MockArtist {
diff --git a/persistence/mock_mediafile_repo.go b/persistence/mock_mediafile_repo.go
index 85a27cb1a..40a3b66fd 100644
--- a/persistence/mock_mediafile_repo.go
+++ b/persistence/mock_mediafile_repo.go
@@ -5,7 +5,7 @@ import (
"errors"
"fmt"
- "github.com/cloudsonic/sonic-server/model"
+ "github.com/deluan/navidrome/model"
)
func CreateMockMediaFileRepo() *MockMediaFile {
diff --git a/persistence/mock_persistence.go b/persistence/mock_persistence.go
index cd2f64f84..ab268cbb1 100644
--- a/persistence/mock_persistence.go
+++ b/persistence/mock_persistence.go
@@ -1,6 +1,6 @@
package persistence
-import "github.com/cloudsonic/sonic-server/model"
+import "github.com/deluan/navidrome/model"
type MockDataStore struct {
MockedGenre model.GenreRepository
diff --git a/persistence/persistence.go b/persistence/persistence.go
index 59969f39a..ceffe1634 100644
--- a/persistence/persistence.go
+++ b/persistence/persistence.go
@@ -6,9 +6,9 @@ import (
"sync"
"github.com/astaxie/beego/orm"
- "github.com/cloudsonic/sonic-server/conf"
- "github.com/cloudsonic/sonic-server/log"
- "github.com/cloudsonic/sonic-server/model"
+ "github.com/deluan/navidrome/conf"
+ "github.com/deluan/navidrome/log"
+ "github.com/deluan/navidrome/model"
_ "github.com/lib/pq"
_ "github.com/mattn/go-sqlite3"
)
diff --git a/persistence/persistence_suite_test.go b/persistence/persistence_suite_test.go
index 8bd684a7b..3f72002e2 100644
--- a/persistence/persistence_suite_test.go
+++ b/persistence/persistence_suite_test.go
@@ -6,9 +6,9 @@ import (
"testing"
"github.com/astaxie/beego/orm"
- "github.com/cloudsonic/sonic-server/conf"
- "github.com/cloudsonic/sonic-server/log"
- "github.com/cloudsonic/sonic-server/model"
+ "github.com/deluan/navidrome/conf"
+ "github.com/deluan/navidrome/log"
+ "github.com/deluan/navidrome/model"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
@@ -60,7 +60,7 @@ func P(path string) string {
var _ = Describe("Initialize test DB", func() {
BeforeSuite(func() {
//log.SetLevel(log.LevelTrace)
- //conf.Sonic.DbPath, _ = ioutil.TempDir("", "cloudsonic_tests")
+ //conf.Sonic.DbPath, _ = ioutil.TempDir("", "navidrome_tests")
//os.MkdirAll(conf.Sonic.DbPath, 0700)
conf.Sonic.DbPath = ":memory:"
ds := New()
diff --git a/persistence/playlist_repository.go b/persistence/playlist_repository.go
index 480600a8f..6eb23b824 100644
--- a/persistence/playlist_repository.go
+++ b/persistence/playlist_repository.go
@@ -4,7 +4,7 @@ import (
"strings"
"github.com/astaxie/beego/orm"
- "github.com/cloudsonic/sonic-server/model"
+ "github.com/deluan/navidrome/model"
"github.com/google/uuid"
)
diff --git a/persistence/property_repository.go b/persistence/property_repository.go
index 091293474..b54a3c7fd 100644
--- a/persistence/property_repository.go
+++ b/persistence/property_repository.go
@@ -2,7 +2,7 @@ package persistence
import (
"github.com/astaxie/beego/orm"
- "github.com/cloudsonic/sonic-server/model"
+ "github.com/deluan/navidrome/model"
)
type property struct {
diff --git a/persistence/property_repository_test.go b/persistence/property_repository_test.go
index bc95d9ac2..9c75bab0f 100644
--- a/persistence/property_repository_test.go
+++ b/persistence/property_repository_test.go
@@ -2,7 +2,7 @@ package persistence
import (
"github.com/astaxie/beego/orm"
- "github.com/cloudsonic/sonic-server/model"
+ "github.com/deluan/navidrome/model"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/persistence/resource_repository.go b/persistence/resource_repository.go
index dca0dce67..972610dd8 100644
--- a/persistence/resource_repository.go
+++ b/persistence/resource_repository.go
@@ -7,7 +7,7 @@ import (
"strings"
"github.com/astaxie/beego/orm"
- "github.com/cloudsonic/sonic-server/model"
+ "github.com/deluan/navidrome/model"
"github.com/deluan/rest"
"github.com/google/uuid"
)
diff --git a/persistence/searchable_repository.go b/persistence/searchable_repository.go
index f0fce62d7..14700ddaa 100644
--- a/persistence/searchable_repository.go
+++ b/persistence/searchable_repository.go
@@ -5,7 +5,7 @@ import (
"github.com/Masterminds/squirrel"
"github.com/astaxie/beego/orm"
- "github.com/cloudsonic/sonic-server/log"
+ "github.com/deluan/navidrome/log"
"github.com/kennygrant/sanitize"
)
diff --git a/persistence/sql_repository.go b/persistence/sql_repository.go
index 706596673..f6172a2a0 100644
--- a/persistence/sql_repository.go
+++ b/persistence/sql_repository.go
@@ -3,7 +3,7 @@ package persistence
import (
"github.com/Masterminds/squirrel"
"github.com/astaxie/beego/orm"
- "github.com/cloudsonic/sonic-server/model"
+ "github.com/deluan/navidrome/model"
)
type sqlRepository struct {
diff --git a/persistence/user_repository.go b/persistence/user_repository.go
index 833794878..ac768cb1a 100644
--- a/persistence/user_repository.go
+++ b/persistence/user_repository.go
@@ -4,7 +4,7 @@ import (
"time"
"github.com/astaxie/beego/orm"
- "github.com/cloudsonic/sonic-server/model"
+ "github.com/deluan/navidrome/model"
"github.com/deluan/rest"
)
diff --git a/reflex.conf b/reflex.conf
index 86694975b..f18325134 100644
--- a/reflex.conf
+++ b/reflex.conf
@@ -1 +1 @@
--s -r "(\.go$$|sonic.toml)" -R "(Jamstash-master|^ui)" -- go run .
+-s -r "(\.go$$|navidrome.toml)" -R "(Jamstash-master|^ui)" -- go run .
diff --git a/scanner/change_detector.go b/scanner/change_detector.go
index 159c7a446..91a28160f 100644
--- a/scanner/change_detector.go
+++ b/scanner/change_detector.go
@@ -6,7 +6,7 @@ import (
"strings"
"time"
- "github.com/cloudsonic/sonic-server/log"
+ "github.com/deluan/navidrome/log"
)
type dirInfo struct {
diff --git a/scanner/change_detector_test.go b/scanner/change_detector_test.go
index 7d8ed4ec6..43415481c 100644
--- a/scanner/change_detector_test.go
+++ b/scanner/change_detector_test.go
@@ -17,7 +17,7 @@ var _ = Describe("ChangeDetector", func() {
lastModifiedSince := time.Time{}
BeforeEach(func() {
- testFolder, _ = ioutil.TempDir("", "cloudsonic_tests")
+ testFolder, _ = ioutil.TempDir("", "navidrome_tests")
err := os.MkdirAll(testFolder, 0700)
if err != nil {
panic(err)
diff --git a/scanner/metadata_ffmpeg.go b/scanner/metadata_ffmpeg.go
index 3ec3361df..ff453793a 100644
--- a/scanner/metadata_ffmpeg.go
+++ b/scanner/metadata_ffmpeg.go
@@ -12,8 +12,8 @@ import (
"strings"
"time"
- "github.com/cloudsonic/sonic-server/conf"
- "github.com/cloudsonic/sonic-server/log"
+ "github.com/deluan/navidrome/conf"
+ "github.com/deluan/navidrome/log"
)
type Metadata struct {
diff --git a/scanner/scanner.go b/scanner/scanner.go
index 2319d5c73..7c03e9b10 100644
--- a/scanner/scanner.go
+++ b/scanner/scanner.go
@@ -7,8 +7,8 @@ import (
"strconv"
"time"
- "github.com/cloudsonic/sonic-server/log"
- "github.com/cloudsonic/sonic-server/model"
+ "github.com/deluan/navidrome/log"
+ "github.com/deluan/navidrome/model"
)
type Scanner struct {
diff --git a/scanner/scanner_suite_test.go b/scanner/scanner_suite_test.go
index 7704d47ae..d87b0d70e 100644
--- a/scanner/scanner_suite_test.go
+++ b/scanner/scanner_suite_test.go
@@ -4,9 +4,9 @@ import (
"testing"
"time"
- "github.com/cloudsonic/sonic-server/conf"
- "github.com/cloudsonic/sonic-server/log"
- "github.com/cloudsonic/sonic-server/persistence"
+ "github.com/deluan/navidrome/conf"
+ "github.com/deluan/navidrome/log"
+ "github.com/deluan/navidrome/persistence"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
@@ -25,7 +25,7 @@ var _ = XDescribe("TODO: REMOVE", func() {
ds := persistence.New()
t := NewTagScanner("/Users/deluan/Music/iTunes/iTunes Media/Music", ds)
- //t := NewTagScanner("/Users/deluan/Development/cloudsonic/sonic-server/tests/fixtures", ds)
+ //t := NewTagScanner("/Users/deluan/Development/navidrome/navidrome/tests/fixtures", ds)
Expect(t.Scan(nil, time.Time{})).To(BeNil())
})
})
diff --git a/scanner/tag_scanner.go b/scanner/tag_scanner.go
index bd2ec555a..2fb053f33 100644
--- a/scanner/tag_scanner.go
+++ b/scanner/tag_scanner.go
@@ -11,8 +11,8 @@ import (
"strings"
"time"
- "github.com/cloudsonic/sonic-server/log"
- "github.com/cloudsonic/sonic-server/model"
+ "github.com/deluan/navidrome/log"
+ "github.com/deluan/navidrome/model"
)
type TagScanner struct {
diff --git a/server/app/app.go b/server/app/app.go
index 028864894..3f20c2c5e 100644
--- a/server/app/app.go
+++ b/server/app/app.go
@@ -6,9 +6,9 @@ import (
"net/url"
"strings"
- "github.com/cloudsonic/sonic-server/assets"
- "github.com/cloudsonic/sonic-server/conf"
- "github.com/cloudsonic/sonic-server/model"
+ "github.com/deluan/navidrome/assets"
+ "github.com/deluan/navidrome/conf"
+ "github.com/deluan/navidrome/model"
"github.com/deluan/rest"
"github.com/go-chi/chi"
"github.com/go-chi/jwtauth"
diff --git a/server/app/auth.go b/server/app/auth.go
index b46e893c3..dfb85cc13 100644
--- a/server/app/auth.go
+++ b/server/app/auth.go
@@ -8,8 +8,8 @@ import (
"sync"
"time"
- "github.com/cloudsonic/sonic-server/consts"
- "github.com/cloudsonic/sonic-server/model"
+ "github.com/deluan/navidrome/consts"
+ "github.com/deluan/navidrome/model"
"github.com/deluan/rest"
"github.com/dgrijalva/jwt-go"
"github.com/go-chi/jwtauth"
diff --git a/server/banner.go b/server/banner.go
index 9da9e2894..00a7c72c9 100644
--- a/server/banner.go
+++ b/server/banner.go
@@ -1,19 +1,24 @@
package server
-import "fmt"
+import (
+ "encoding/base64"
+ "fmt"
+)
-// http://patorjk.com/software/taag/#p=display&f=ANSI%20Shadow&t=Cloud%20Sonic
-const banner = `
- ██████╗██╗ ██████╗ ██╗ ██╗██████╗ ███████╗ ██████╗ ███╗ ██╗██╗ ██████╗
-██╔════╝██║ ██╔═══██╗██║ ██║██╔══██╗ ██╔════╝██╔═══██╗████╗ ██║██║██╔════╝
-██║ ██║ ██║ ██║██║ ██║██║ ██║ ███████╗██║ ██║██╔██╗ ██║██║██║
-██║ ██║ ██║ ██║██║ ██║██║ ██║ ╚════██║██║ ██║██║╚██╗██║██║██║
-╚██████╗███████╗╚██████╔╝╚██████╔╝██████╔╝ ███████║╚██████╔╝██║ ╚████║██║╚██████╗
- ╚═════╝╚══════╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝ ╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═════╝
-Version %s
+// http://patorjk.com/software/taag/#p=display&f=Doom&t=Navidrome
+// Need to be Base64 encoded, as it contains a lot of escaping chars.
+// May try to find another way to do it without an external file
+const encodedBanner = "IF8gICBfICAgICAgICAgICAgIF8gICAgIF8gICAgICAgICAgICAgICAgICAgICAgICAgIAp8IFwgfCB8ICAgICAgICAgIC" +
+ "AoXykgICB8IHwgICAgICAgICAgICAgICAgICAgICAgICAgCnwgIFx8IHwgX18gX19fICAgX19fICBfX3wgfF8gX18gX19fICBfIF9fIF9fXyAgIF" +
+ "9fXyAKfCAuIGAgfC8gX2AgXCBcIC8gLyB8LyBfYCB8ICdfXy8gXyBcfCAnXyBgIF8gXCAvIF8gXAp8IHxcICB8IChffCB8XCBWIC98IHwgKF98IH" +
+ "wgfCB8IChfKSB8IHwgfCB8IHwgfCAgX18vClxffCBcXy9cX18sX3wgXF8vIHxffFxfXyxffF98ICBcX19fL3xffCB8X3wgfF98XF9fX3w="
+
+const banner = `%s
+ Version %s
`
func ShowBanner() {
- fmt.Printf(banner, Version)
+ decodedBanner, _ := base64.StdEncoding.DecodeString(encodedBanner)
+ fmt.Printf(banner, string(decodedBanner), Version)
}
diff --git a/server/initial_setup.go b/server/initial_setup.go
index 957bb9375..5bbb200c4 100644
--- a/server/initial_setup.go
+++ b/server/initial_setup.go
@@ -4,10 +4,10 @@ import (
"fmt"
"time"
- "github.com/cloudsonic/sonic-server/conf"
- "github.com/cloudsonic/sonic-server/consts"
- "github.com/cloudsonic/sonic-server/log"
- "github.com/cloudsonic/sonic-server/model"
+ "github.com/deluan/navidrome/conf"
+ "github.com/deluan/navidrome/consts"
+ "github.com/deluan/navidrome/log"
+ "github.com/deluan/navidrome/model"
"github.com/google/uuid"
)
diff --git a/server/server.go b/server/server.go
index 55c4f2b7d..3aaec6546 100644
--- a/server/server.go
+++ b/server/server.go
@@ -6,16 +6,16 @@ import (
"path/filepath"
"time"
- "github.com/cloudsonic/sonic-server/conf"
- "github.com/cloudsonic/sonic-server/log"
- "github.com/cloudsonic/sonic-server/model"
- "github.com/cloudsonic/sonic-server/scanner"
+ "github.com/deluan/navidrome/conf"
+ "github.com/deluan/navidrome/log"
+ "github.com/deluan/navidrome/model"
+ "github.com/deluan/navidrome/scanner"
"github.com/go-chi/chi"
"github.com/go-chi/chi/middleware"
"github.com/go-chi/cors"
)
-const Version = "0.2"
+const Version = "0.2.0"
type Server struct {
Scanner *scanner.Scanner
@@ -41,7 +41,7 @@ func (a *Server) MountRouter(path string, subRouter http.Handler) {
}
func (a *Server) Run(addr string) {
- log.Info("CloudSonic server is accepting requests", "address", addr)
+ log.Info("Navidrome server is accepting requests", "address", addr)
log.Error(http.ListenAndServe(addr, a.router))
}
diff --git a/server/subsonic/album_lists.go b/server/subsonic/album_lists.go
index 8de9b8416..58075d01d 100644
--- a/server/subsonic/album_lists.go
+++ b/server/subsonic/album_lists.go
@@ -5,10 +5,10 @@ import (
"errors"
"net/http"
- "github.com/cloudsonic/sonic-server/engine"
- "github.com/cloudsonic/sonic-server/log"
- "github.com/cloudsonic/sonic-server/server/subsonic/responses"
- "github.com/cloudsonic/sonic-server/utils"
+ "github.com/deluan/navidrome/engine"
+ "github.com/deluan/navidrome/log"
+ "github.com/deluan/navidrome/server/subsonic/responses"
+ "github.com/deluan/navidrome/utils"
)
type AlbumListController struct {
diff --git a/server/subsonic/album_lists_test.go b/server/subsonic/album_lists_test.go
index 62a854ab8..6a4d97c4b 100644
--- a/server/subsonic/album_lists_test.go
+++ b/server/subsonic/album_lists_test.go
@@ -5,7 +5,7 @@ import (
"errors"
"net/http/httptest"
- "github.com/cloudsonic/sonic-server/engine"
+ "github.com/deluan/navidrome/engine"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/server/subsonic/api.go b/server/subsonic/api.go
index 7e4c77832..a3d73f664 100644
--- a/server/subsonic/api.go
+++ b/server/subsonic/api.go
@@ -6,9 +6,9 @@ import (
"fmt"
"net/http"
- "github.com/cloudsonic/sonic-server/conf"
- "github.com/cloudsonic/sonic-server/engine"
- "github.com/cloudsonic/sonic-server/server/subsonic/responses"
+ "github.com/deluan/navidrome/conf"
+ "github.com/deluan/navidrome/engine"
+ "github.com/deluan/navidrome/server/subsonic/responses"
"github.com/go-chi/chi"
)
diff --git a/server/subsonic/api_suite_test.go b/server/subsonic/api_suite_test.go
index a9204bd4e..aca136f84 100644
--- a/server/subsonic/api_suite_test.go
+++ b/server/subsonic/api_suite_test.go
@@ -3,7 +3,7 @@ package subsonic
import (
"testing"
- "github.com/cloudsonic/sonic-server/log"
+ "github.com/deluan/navidrome/log"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/server/subsonic/browsing.go b/server/subsonic/browsing.go
index 9d6237f9f..b8565d73d 100644
--- a/server/subsonic/browsing.go
+++ b/server/subsonic/browsing.go
@@ -5,12 +5,12 @@ import (
"net/http"
"time"
- "github.com/cloudsonic/sonic-server/conf"
- "github.com/cloudsonic/sonic-server/engine"
- "github.com/cloudsonic/sonic-server/log"
- "github.com/cloudsonic/sonic-server/model"
- "github.com/cloudsonic/sonic-server/server/subsonic/responses"
- "github.com/cloudsonic/sonic-server/utils"
+ "github.com/deluan/navidrome/conf"
+ "github.com/deluan/navidrome/engine"
+ "github.com/deluan/navidrome/log"
+ "github.com/deluan/navidrome/model"
+ "github.com/deluan/navidrome/server/subsonic/responses"
+ "github.com/deluan/navidrome/utils"
)
type BrowsingController struct {
diff --git a/server/subsonic/helpers.go b/server/subsonic/helpers.go
index e1d9036e4..016d6b257 100644
--- a/server/subsonic/helpers.go
+++ b/server/subsonic/helpers.go
@@ -7,10 +7,10 @@ import (
"strings"
"time"
- "github.com/cloudsonic/sonic-server/engine"
- "github.com/cloudsonic/sonic-server/model"
- "github.com/cloudsonic/sonic-server/server/subsonic/responses"
- "github.com/cloudsonic/sonic-server/utils"
+ "github.com/deluan/navidrome/engine"
+ "github.com/deluan/navidrome/model"
+ "github.com/deluan/navidrome/server/subsonic/responses"
+ "github.com/deluan/navidrome/utils"
)
func NewResponse() *responses.Subsonic {
diff --git a/server/subsonic/media_annotation.go b/server/subsonic/media_annotation.go
index cfd36d820..eba94f14e 100644
--- a/server/subsonic/media_annotation.go
+++ b/server/subsonic/media_annotation.go
@@ -5,10 +5,10 @@ import (
"net/http"
"time"
- "github.com/cloudsonic/sonic-server/engine"
- "github.com/cloudsonic/sonic-server/log"
- "github.com/cloudsonic/sonic-server/model"
- "github.com/cloudsonic/sonic-server/server/subsonic/responses"
+ "github.com/deluan/navidrome/engine"
+ "github.com/deluan/navidrome/log"
+ "github.com/deluan/navidrome/model"
+ "github.com/deluan/navidrome/server/subsonic/responses"
)
type MediaAnnotationController struct {
diff --git a/server/subsonic/media_retrieval.go b/server/subsonic/media_retrieval.go
index 611adf9d0..f651bd772 100644
--- a/server/subsonic/media_retrieval.go
+++ b/server/subsonic/media_retrieval.go
@@ -5,10 +5,10 @@ import (
"net/http"
"os"
- "github.com/cloudsonic/sonic-server/engine"
- "github.com/cloudsonic/sonic-server/log"
- "github.com/cloudsonic/sonic-server/model"
- "github.com/cloudsonic/sonic-server/server/subsonic/responses"
+ "github.com/deluan/navidrome/engine"
+ "github.com/deluan/navidrome/log"
+ "github.com/deluan/navidrome/model"
+ "github.com/deluan/navidrome/server/subsonic/responses"
)
type MediaRetrievalController struct {
diff --git a/server/subsonic/media_retrieval_test.go b/server/subsonic/media_retrieval_test.go
index e4e0e36bf..5f14c542a 100644
--- a/server/subsonic/media_retrieval_test.go
+++ b/server/subsonic/media_retrieval_test.go
@@ -6,7 +6,7 @@ import (
"io"
"net/http/httptest"
- "github.com/cloudsonic/sonic-server/model"
+ "github.com/deluan/navidrome/model"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/server/subsonic/middlewares.go b/server/subsonic/middlewares.go
index 0f5f0ac16..f977c82b8 100644
--- a/server/subsonic/middlewares.go
+++ b/server/subsonic/middlewares.go
@@ -5,10 +5,10 @@ import (
"fmt"
"net/http"
- "github.com/cloudsonic/sonic-server/engine"
- "github.com/cloudsonic/sonic-server/log"
- "github.com/cloudsonic/sonic-server/model"
- "github.com/cloudsonic/sonic-server/server/subsonic/responses"
+ "github.com/deluan/navidrome/engine"
+ "github.com/deluan/navidrome/log"
+ "github.com/deluan/navidrome/model"
+ "github.com/deluan/navidrome/server/subsonic/responses"
)
func checkRequiredParameters(next http.Handler) http.Handler {
diff --git a/server/subsonic/middlewares_test.go b/server/subsonic/middlewares_test.go
index 89ca9ee8c..c3cf48c1c 100644
--- a/server/subsonic/middlewares_test.go
+++ b/server/subsonic/middlewares_test.go
@@ -6,9 +6,9 @@ import (
"net/http/httptest"
"strings"
- "github.com/cloudsonic/sonic-server/engine"
- "github.com/cloudsonic/sonic-server/log"
- "github.com/cloudsonic/sonic-server/model"
+ "github.com/deluan/navidrome/engine"
+ "github.com/deluan/navidrome/log"
+ "github.com/deluan/navidrome/model"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
diff --git a/server/subsonic/playlists.go b/server/subsonic/playlists.go
index 7bd1477ea..079bd3d26 100644
--- a/server/subsonic/playlists.go
+++ b/server/subsonic/playlists.go
@@ -5,10 +5,10 @@ import (
"fmt"
"net/http"
- "github.com/cloudsonic/sonic-server/engine"
- "github.com/cloudsonic/sonic-server/log"
- "github.com/cloudsonic/sonic-server/model"
- "github.com/cloudsonic/sonic-server/server/subsonic/responses"
+ "github.com/deluan/navidrome/engine"
+ "github.com/deluan/navidrome/log"
+ "github.com/deluan/navidrome/model"
+ "github.com/deluan/navidrome/server/subsonic/responses"
)
type PlaylistsController struct {
diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses User with data should match .JSON b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses User with data should match .JSON
index 3b60ed95e..79db8035b 100644
--- a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses User with data should match .JSON
+++ b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses User with data should match .JSON
@@ -1 +1 @@
-{"status":"ok","version":"1.8.0","user":{"username":"deluan","email":"cloudsonic@deluan.com","scrobblingEnabled":false,"adminRole":false,"settingsRole":false,"downloadRole":false,"uploadRole":false,"playlistRole":false,"coverArtRole":false,"commentRole":false,"podcastRole":false,"streamRole":false,"jukeboxRole":false,"shareRole":false,"videoConversionRole":false,"folder":[1]}}
+{"status":"ok","version":"1.8.0","user":{"username":"deluan","email":"navidrome@deluan.com","scrobblingEnabled":false,"adminRole":false,"settingsRole":false,"downloadRole":false,"uploadRole":false,"playlistRole":false,"coverArtRole":false,"commentRole":false,"podcastRole":false,"streamRole":false,"jukeboxRole":false,"shareRole":false,"videoConversionRole":false,"folder":[1]}}
diff --git a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses User with data should match .XML b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses User with data should match .XML
index 6ec872d18..72e5872a5 100644
--- a/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses User with data should match .XML
+++ b/server/subsonic/responses/.snapshots/responses-snapshotMatcher-Match-Responses User with data should match .XML
@@ -1 +1 @@
-