Rename project to Navidrome
This commit is contained in:
+1
-1
@@ -7,5 +7,5 @@ data
|
|||||||
*.db
|
*.db
|
||||||
testDB
|
testDB
|
||||||
*_test.go
|
*_test.go
|
||||||
sonic-server
|
navidrome
|
||||||
assets/*gen.go
|
assets/*gen.go
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
.idea
|
.idea
|
||||||
.envrc
|
.envrc
|
||||||
/sonic-server
|
/navidrome
|
||||||
/iTunes*.xml
|
/iTunes*.xml
|
||||||
/tmp
|
/tmp
|
||||||
data/*
|
data/*
|
||||||
@@ -10,7 +10,7 @@ wiki
|
|||||||
TODO.md
|
TODO.md
|
||||||
var
|
var
|
||||||
Artwork
|
Artwork
|
||||||
sonic.toml
|
navidrome.toml
|
||||||
master.zip
|
master.zip
|
||||||
Jamstash-master
|
Jamstash-master
|
||||||
testDB
|
testDB
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
|
|
||||||
### Supported Subsonic API endpoints
|
### 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
|
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)
|
* Right now, Navidrome only works with a single Music Library (Music Folder)
|
||||||
* CloudSonic does not mark songs as played by calls to `stream`, only when
|
* Navidrome does not mark songs as played by calls to `stream`, only when
|
||||||
`scrobble` is called with `submission=true`
|
`scrobble` is called with `submission=true`
|
||||||
* Next features to be implemented: Playlists (WIP), MultiUser (WIP), Jukebox, Sharing, Podcasts, Bookmarks, Internet Radio.
|
* Next features to be implemented: Playlists (WIP), MultiUser (WIP), Jukebox, Sharing, Podcasts, Bookmarks, Internet Radio.
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -40,14 +40,14 @@ RUN cd /tmp && tar xJf ffmpeg.tar.xz
|
|||||||
#####################################################
|
#####################################################
|
||||||
### Build Final Image
|
### Build Final Image
|
||||||
FROM alpine
|
FROM alpine
|
||||||
COPY --from=gobuilder /src/sonic-server /app/
|
COPY --from=gobuilder /src/navidrome /app/
|
||||||
COPY --from=gobuilder /tmp/ffmpeg*/ffmpeg /usr/bin/
|
COPY --from=gobuilder /tmp/ffmpeg*/ffmpeg /usr/bin/
|
||||||
|
|
||||||
VOLUME ["/data", "/music"]
|
VOLUME ["/data", "/music"]
|
||||||
ENV SONIC_DBPATH /data/cloudsonic.db
|
ENV SONIC_DBPATH /data/navidrome.db
|
||||||
ENV SONIC_MUSICFOLDER /music
|
ENV SONIC_MUSICFOLDER /music
|
||||||
ENV SONIC_LOGLEVEL info
|
ENV SONIC_LOGLEVEL info
|
||||||
EXPOSE 4533
|
EXPOSE 4533
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
CMD "/app/sonic-server"
|
CMD "/app/navidrome"
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
# CloudSonic Server
|
# Navidrome Music Streamer
|
||||||
|
|
||||||
[](https://github.com/cloudsonic/sonic-server/actions)
|
[](https://github.com/deluan/navidrome/actions)
|
||||||
[](https://goreportcard.com/report/github.com/cloudsonic/sonic-server)
|
[](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),
|
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/)
|
[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
|
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
|
[configuration.go](conf/configuration.go) file
|
||||||
|
|
||||||
### Development Environment
|
### Development Environment
|
||||||
@@ -66,6 +66,6 @@ $ make test
|
|||||||
|
|
||||||
### Copying
|
### 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)
|
The source code is licensed under GNU Affero GPL v3. License is available [here](/LICENSE)
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ package assets
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/consts"
|
"github.com/deluan/navidrome/consts"
|
||||||
)
|
)
|
||||||
|
|
||||||
func AssetFile() http.FileSystem {
|
func AssetFile() http.FileSystem {
|
||||||
|
|||||||
@@ -3,14 +3,15 @@ package conf
|
|||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/log"
|
"github.com/deluan/navidrome/consts"
|
||||||
|
"github.com/deluan/navidrome/log"
|
||||||
"github.com/koding/multiconfig"
|
"github.com/koding/multiconfig"
|
||||||
)
|
)
|
||||||
|
|
||||||
type sonic struct {
|
type sonic struct {
|
||||||
Port string `default:"4533"`
|
Port string `default:"4533"`
|
||||||
MusicFolder string `default:"./music"`
|
MusicFolder string `default:"./music"`
|
||||||
DbPath string `default:"./data/cloudsonic.db"`
|
DbPath string `default:"./data/navidrome.db"`
|
||||||
LogLevel string `default:"info"`
|
LogLevel string `default:"info"`
|
||||||
|
|
||||||
IgnoredArticles string `default:"The El La Los Las Le Les Os As O A"`
|
IgnoredArticles string `default:"The El La Los Las Le Les Os As O A"`
|
||||||
@@ -62,8 +63,8 @@ func LoadFromFile(tomlFile string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func LoadFromLocalFile() {
|
func LoadFromLocalFile() {
|
||||||
if _, err := os.Stat("./sonic.toml"); err == nil {
|
if _, err := os.Stat(consts.LocalConfigFile); err == nil {
|
||||||
LoadFromFile("./sonic.toml")
|
LoadFromFile(consts.LocalConfigFile)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -3,10 +3,11 @@ package consts
|
|||||||
import "time"
|
import "time"
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
LocalConfigFile = "./navidrome.toml"
|
||||||
InitialSetupFlagKey = "InitialSetup"
|
InitialSetupFlagKey = "InitialSetup"
|
||||||
|
|
||||||
JWTSecretKey = "JWTSecret"
|
JWTSecretKey = "JWTSecret"
|
||||||
JWTIssuer = "CloudSonic"
|
JWTIssuer = "Navidrome"
|
||||||
JWTTokenExpiration = 30 * time.Minute
|
JWTTokenExpiration = 30 * time.Minute
|
||||||
|
|
||||||
InitialUserName = "admin"
|
InitialUserName = "admin"
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
version: "3"
|
version: "3"
|
||||||
services:
|
services:
|
||||||
cloudsonic:
|
navidrome:
|
||||||
build: .
|
build: .
|
||||||
ports:
|
ports:
|
||||||
- "4533:4533"
|
- "4533:4533"
|
||||||
|
|||||||
+3
-3
@@ -8,9 +8,9 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/log"
|
"github.com/deluan/navidrome/log"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
"github.com/cloudsonic/sonic-server/utils"
|
"github.com/deluan/navidrome/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Browser interface {
|
type Browser interface {
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
"github.com/cloudsonic/sonic-server/persistence"
|
"github.com/deluan/navidrome/persistence"
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
)
|
)
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Entry struct {
|
type Entry struct {
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
"github.com/dhowden/tag"
|
"github.com/dhowden/tag"
|
||||||
"github.com/nfnt/resize"
|
"github.com/nfnt/resize"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ import (
|
|||||||
"image"
|
"image"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/engine"
|
"github.com/deluan/navidrome/engine"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
"github.com/cloudsonic/sonic-server/persistence"
|
"github.com/deluan/navidrome/persistence"
|
||||||
. "github.com/cloudsonic/sonic-server/tests"
|
. "github.com/deluan/navidrome/tests"
|
||||||
. "github.com/smartystreets/goconvey/convey"
|
. "github.com/smartystreets/goconvey/convey"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package engine
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/log"
|
"github.com/deluan/navidrome/log"
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ListGenerator interface {
|
type ListGenerator interface {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package engine
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func CreateMockPropertyRepo() *MockProperty {
|
func CreateMockPropertyRepo() *MockProperty {
|
||||||
|
|||||||
+3
-3
@@ -3,9 +3,9 @@ package engine
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/consts"
|
"github.com/deluan/navidrome/consts"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
"github.com/cloudsonic/sonic-server/utils"
|
"github.com/deluan/navidrome/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Playlists interface {
|
type Playlists interface {
|
||||||
|
|||||||
+2
-2
@@ -3,8 +3,8 @@ package engine
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/log"
|
"github.com/deluan/navidrome/log"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Ratings interface {
|
type Ratings interface {
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Scrobbler interface {
|
type Scrobbler interface {
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
"github.com/kennygrant/sanitize"
|
"github.com/kennygrant/sanitize"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -8,8 +8,8 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/conf"
|
"github.com/deluan/navidrome/conf"
|
||||||
"github.com/cloudsonic/sonic-server/log"
|
"github.com/deluan/navidrome/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TODO Encapsulate as a io.Reader
|
// TODO Encapsulate as a io.Reader
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package engine
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
. "github.com/cloudsonic/sonic-server/tests"
|
. "github.com/deluan/navidrome/tests"
|
||||||
. "github.com/smartystreets/goconvey/convey"
|
. "github.com/smartystreets/goconvey/convey"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -7,8 +7,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/log"
|
"github.com/deluan/navidrome/log"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Users interface {
|
type Users interface {
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package engine
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
"github.com/cloudsonic/sonic-server/persistence"
|
"github.com/deluan/navidrome/persistence"
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
module github.com/cloudsonic/sonic-server
|
module github.com/deluan/navidrome
|
||||||
|
|
||||||
go 1.13
|
go 1.13
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/cloudsonic/sonic-server/conf"
|
"github.com/deluan/navidrome/conf"
|
||||||
"github.com/cloudsonic/sonic-server/server"
|
"github.com/deluan/navidrome/server"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import (
|
|||||||
|
|
||||||
"github.com/Masterminds/squirrel"
|
"github.com/Masterminds/squirrel"
|
||||||
"github.com/astaxie/beego/orm"
|
"github.com/astaxie/beego/orm"
|
||||||
"github.com/cloudsonic/sonic-server/log"
|
"github.com/deluan/navidrome/log"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
type album struct {
|
type album struct {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package persistence
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/astaxie/beego/orm"
|
"github.com/astaxie/beego/orm"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/astaxie/beego/orm"
|
"github.com/astaxie/beego/orm"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ import (
|
|||||||
|
|
||||||
"github.com/Masterminds/squirrel"
|
"github.com/Masterminds/squirrel"
|
||||||
"github.com/astaxie/beego/orm"
|
"github.com/astaxie/beego/orm"
|
||||||
"github.com/cloudsonic/sonic-server/conf"
|
"github.com/deluan/navidrome/conf"
|
||||||
"github.com/cloudsonic/sonic-server/log"
|
"github.com/deluan/navidrome/log"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
"github.com/cloudsonic/sonic-server/utils"
|
"github.com/deluan/navidrome/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type artist struct {
|
type artist struct {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package persistence
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/astaxie/beego/orm"
|
"github.com/astaxie/beego/orm"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/astaxie/beego/orm"
|
"github.com/astaxie/beego/orm"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
type genreRepository struct {
|
type genreRepository struct {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package persistence
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/astaxie/beego/orm"
|
"github.com/astaxie/beego/orm"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
|
|
||||||
"github.com/Masterminds/squirrel"
|
"github.com/Masterminds/squirrel"
|
||||||
"github.com/astaxie/beego/orm"
|
"github.com/astaxie/beego/orm"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
type mediaFile struct {
|
type mediaFile struct {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/astaxie/beego/orm"
|
"github.com/astaxie/beego/orm"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package persistence
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/astaxie/beego/orm"
|
"github.com/astaxie/beego/orm"
|
||||||
"github.com/cloudsonic/sonic-server/conf"
|
"github.com/deluan/navidrome/conf"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
type mediaFolderRepository struct {
|
type mediaFolderRepository struct {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func CreateMockAlbumRepo() *MockAlbum {
|
func CreateMockAlbumRepo() *MockAlbum {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func CreateMockArtistRepo() *MockArtist {
|
func CreateMockArtistRepo() *MockArtist {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func CreateMockMediaFileRepo() *MockMediaFile {
|
func CreateMockMediaFileRepo() *MockMediaFile {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package persistence
|
package persistence
|
||||||
|
|
||||||
import "github.com/cloudsonic/sonic-server/model"
|
import "github.com/deluan/navidrome/model"
|
||||||
|
|
||||||
type MockDataStore struct {
|
type MockDataStore struct {
|
||||||
MockedGenre model.GenreRepository
|
MockedGenre model.GenreRepository
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/astaxie/beego/orm"
|
"github.com/astaxie/beego/orm"
|
||||||
"github.com/cloudsonic/sonic-server/conf"
|
"github.com/deluan/navidrome/conf"
|
||||||
"github.com/cloudsonic/sonic-server/log"
|
"github.com/deluan/navidrome/log"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
_ "github.com/lib/pq"
|
_ "github.com/lib/pq"
|
||||||
_ "github.com/mattn/go-sqlite3"
|
_ "github.com/mattn/go-sqlite3"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/astaxie/beego/orm"
|
"github.com/astaxie/beego/orm"
|
||||||
"github.com/cloudsonic/sonic-server/conf"
|
"github.com/deluan/navidrome/conf"
|
||||||
"github.com/cloudsonic/sonic-server/log"
|
"github.com/deluan/navidrome/log"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
)
|
)
|
||||||
@@ -60,7 +60,7 @@ func P(path string) string {
|
|||||||
var _ = Describe("Initialize test DB", func() {
|
var _ = Describe("Initialize test DB", func() {
|
||||||
BeforeSuite(func() {
|
BeforeSuite(func() {
|
||||||
//log.SetLevel(log.LevelTrace)
|
//log.SetLevel(log.LevelTrace)
|
||||||
//conf.Sonic.DbPath, _ = ioutil.TempDir("", "cloudsonic_tests")
|
//conf.Sonic.DbPath, _ = ioutil.TempDir("", "navidrome_tests")
|
||||||
//os.MkdirAll(conf.Sonic.DbPath, 0700)
|
//os.MkdirAll(conf.Sonic.DbPath, 0700)
|
||||||
conf.Sonic.DbPath = ":memory:"
|
conf.Sonic.DbPath = ":memory:"
|
||||||
ds := New()
|
ds := New()
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/astaxie/beego/orm"
|
"github.com/astaxie/beego/orm"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package persistence
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/astaxie/beego/orm"
|
"github.com/astaxie/beego/orm"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
type property struct {
|
type property struct {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package persistence
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/astaxie/beego/orm"
|
"github.com/astaxie/beego/orm"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/astaxie/beego/orm"
|
"github.com/astaxie/beego/orm"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
"github.com/deluan/rest"
|
"github.com/deluan/rest"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
|
|
||||||
"github.com/Masterminds/squirrel"
|
"github.com/Masterminds/squirrel"
|
||||||
"github.com/astaxie/beego/orm"
|
"github.com/astaxie/beego/orm"
|
||||||
"github.com/cloudsonic/sonic-server/log"
|
"github.com/deluan/navidrome/log"
|
||||||
"github.com/kennygrant/sanitize"
|
"github.com/kennygrant/sanitize"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package persistence
|
|||||||
import (
|
import (
|
||||||
"github.com/Masterminds/squirrel"
|
"github.com/Masterminds/squirrel"
|
||||||
"github.com/astaxie/beego/orm"
|
"github.com/astaxie/beego/orm"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
type sqlRepository struct {
|
type sqlRepository struct {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/astaxie/beego/orm"
|
"github.com/astaxie/beego/orm"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
"github.com/deluan/rest"
|
"github.com/deluan/rest"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
-s -r "(\.go$$|sonic.toml)" -R "(Jamstash-master|^ui)" -- go run .
|
-s -r "(\.go$$|navidrome.toml)" -R "(Jamstash-master|^ui)" -- go run .
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/log"
|
"github.com/deluan/navidrome/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
type dirInfo struct {
|
type dirInfo struct {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ var _ = Describe("ChangeDetector", func() {
|
|||||||
lastModifiedSince := time.Time{}
|
lastModifiedSince := time.Time{}
|
||||||
|
|
||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
testFolder, _ = ioutil.TempDir("", "cloudsonic_tests")
|
testFolder, _ = ioutil.TempDir("", "navidrome_tests")
|
||||||
err := os.MkdirAll(testFolder, 0700)
|
err := os.MkdirAll(testFolder, 0700)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/conf"
|
"github.com/deluan/navidrome/conf"
|
||||||
"github.com/cloudsonic/sonic-server/log"
|
"github.com/deluan/navidrome/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Metadata struct {
|
type Metadata struct {
|
||||||
|
|||||||
+2
-2
@@ -7,8 +7,8 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/log"
|
"github.com/deluan/navidrome/log"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Scanner struct {
|
type Scanner struct {
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/conf"
|
"github.com/deluan/navidrome/conf"
|
||||||
"github.com/cloudsonic/sonic-server/log"
|
"github.com/deluan/navidrome/log"
|
||||||
"github.com/cloudsonic/sonic-server/persistence"
|
"github.com/deluan/navidrome/persistence"
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
)
|
)
|
||||||
@@ -25,7 +25,7 @@ var _ = XDescribe("TODO: REMOVE", func() {
|
|||||||
ds := persistence.New()
|
ds := persistence.New()
|
||||||
|
|
||||||
t := NewTagScanner("/Users/deluan/Music/iTunes/iTunes Media/Music", ds)
|
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())
|
Expect(t.Scan(nil, time.Time{})).To(BeNil())
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/log"
|
"github.com/deluan/navidrome/log"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TagScanner struct {
|
type TagScanner struct {
|
||||||
|
|||||||
+3
-3
@@ -6,9 +6,9 @@ import (
|
|||||||
"net/url"
|
"net/url"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/assets"
|
"github.com/deluan/navidrome/assets"
|
||||||
"github.com/cloudsonic/sonic-server/conf"
|
"github.com/deluan/navidrome/conf"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
"github.com/deluan/rest"
|
"github.com/deluan/rest"
|
||||||
"github.com/go-chi/chi"
|
"github.com/go-chi/chi"
|
||||||
"github.com/go-chi/jwtauth"
|
"github.com/go-chi/jwtauth"
|
||||||
|
|||||||
+2
-2
@@ -8,8 +8,8 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/consts"
|
"github.com/deluan/navidrome/consts"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
"github.com/deluan/rest"
|
"github.com/deluan/rest"
|
||||||
"github.com/dgrijalva/jwt-go"
|
"github.com/dgrijalva/jwt-go"
|
||||||
"github.com/go-chi/jwtauth"
|
"github.com/go-chi/jwtauth"
|
||||||
|
|||||||
+16
-11
@@ -1,19 +1,24 @@
|
|||||||
package server
|
package server
|
||||||
|
|
||||||
import "fmt"
|
import (
|
||||||
|
"encoding/base64"
|
||||||
|
"fmt"
|
||||||
|
)
|
||||||
|
|
||||||
// http://patorjk.com/software/taag/#p=display&f=ANSI%20Shadow&t=Cloud%20Sonic
|
// http://patorjk.com/software/taag/#p=display&f=Doom&t=Navidrome
|
||||||
const banner = `
|
// 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="
|
||||||
╚═════╝╚══════╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝ ╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═════╝
|
|
||||||
Version %s
|
const banner = `%s
|
||||||
|
Version %s
|
||||||
|
|
||||||
`
|
`
|
||||||
|
|
||||||
func ShowBanner() {
|
func ShowBanner() {
|
||||||
fmt.Printf(banner, Version)
|
decodedBanner, _ := base64.StdEncoding.DecodeString(encodedBanner)
|
||||||
|
fmt.Printf(banner, string(decodedBanner), Version)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/conf"
|
"github.com/deluan/navidrome/conf"
|
||||||
"github.com/cloudsonic/sonic-server/consts"
|
"github.com/deluan/navidrome/consts"
|
||||||
"github.com/cloudsonic/sonic-server/log"
|
"github.com/deluan/navidrome/log"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
+6
-6
@@ -6,16 +6,16 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/conf"
|
"github.com/deluan/navidrome/conf"
|
||||||
"github.com/cloudsonic/sonic-server/log"
|
"github.com/deluan/navidrome/log"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
"github.com/cloudsonic/sonic-server/scanner"
|
"github.com/deluan/navidrome/scanner"
|
||||||
"github.com/go-chi/chi"
|
"github.com/go-chi/chi"
|
||||||
"github.com/go-chi/chi/middleware"
|
"github.com/go-chi/chi/middleware"
|
||||||
"github.com/go-chi/cors"
|
"github.com/go-chi/cors"
|
||||||
)
|
)
|
||||||
|
|
||||||
const Version = "0.2"
|
const Version = "0.2.0"
|
||||||
|
|
||||||
type Server struct {
|
type Server struct {
|
||||||
Scanner *scanner.Scanner
|
Scanner *scanner.Scanner
|
||||||
@@ -41,7 +41,7 @@ func (a *Server) MountRouter(path string, subRouter http.Handler) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (a *Server) Run(addr string) {
|
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))
|
log.Error(http.ListenAndServe(addr, a.router))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/engine"
|
"github.com/deluan/navidrome/engine"
|
||||||
"github.com/cloudsonic/sonic-server/log"
|
"github.com/deluan/navidrome/log"
|
||||||
"github.com/cloudsonic/sonic-server/server/subsonic/responses"
|
"github.com/deluan/navidrome/server/subsonic/responses"
|
||||||
"github.com/cloudsonic/sonic-server/utils"
|
"github.com/deluan/navidrome/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AlbumListController struct {
|
type AlbumListController struct {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/engine"
|
"github.com/deluan/navidrome/engine"
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/conf"
|
"github.com/deluan/navidrome/conf"
|
||||||
"github.com/cloudsonic/sonic-server/engine"
|
"github.com/deluan/navidrome/engine"
|
||||||
"github.com/cloudsonic/sonic-server/server/subsonic/responses"
|
"github.com/deluan/navidrome/server/subsonic/responses"
|
||||||
"github.com/go-chi/chi"
|
"github.com/go-chi/chi"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package subsonic
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/log"
|
"github.com/deluan/navidrome/log"
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,12 +5,12 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/conf"
|
"github.com/deluan/navidrome/conf"
|
||||||
"github.com/cloudsonic/sonic-server/engine"
|
"github.com/deluan/navidrome/engine"
|
||||||
"github.com/cloudsonic/sonic-server/log"
|
"github.com/deluan/navidrome/log"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
"github.com/cloudsonic/sonic-server/server/subsonic/responses"
|
"github.com/deluan/navidrome/server/subsonic/responses"
|
||||||
"github.com/cloudsonic/sonic-server/utils"
|
"github.com/deluan/navidrome/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type BrowsingController struct {
|
type BrowsingController struct {
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/engine"
|
"github.com/deluan/navidrome/engine"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
"github.com/cloudsonic/sonic-server/server/subsonic/responses"
|
"github.com/deluan/navidrome/server/subsonic/responses"
|
||||||
"github.com/cloudsonic/sonic-server/utils"
|
"github.com/deluan/navidrome/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewResponse() *responses.Subsonic {
|
func NewResponse() *responses.Subsonic {
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/engine"
|
"github.com/deluan/navidrome/engine"
|
||||||
"github.com/cloudsonic/sonic-server/log"
|
"github.com/deluan/navidrome/log"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
"github.com/cloudsonic/sonic-server/server/subsonic/responses"
|
"github.com/deluan/navidrome/server/subsonic/responses"
|
||||||
)
|
)
|
||||||
|
|
||||||
type MediaAnnotationController struct {
|
type MediaAnnotationController struct {
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/engine"
|
"github.com/deluan/navidrome/engine"
|
||||||
"github.com/cloudsonic/sonic-server/log"
|
"github.com/deluan/navidrome/log"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
"github.com/cloudsonic/sonic-server/server/subsonic/responses"
|
"github.com/deluan/navidrome/server/subsonic/responses"
|
||||||
)
|
)
|
||||||
|
|
||||||
type MediaRetrievalController struct {
|
type MediaRetrievalController struct {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/engine"
|
"github.com/deluan/navidrome/engine"
|
||||||
"github.com/cloudsonic/sonic-server/log"
|
"github.com/deluan/navidrome/log"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
"github.com/cloudsonic/sonic-server/server/subsonic/responses"
|
"github.com/deluan/navidrome/server/subsonic/responses"
|
||||||
)
|
)
|
||||||
|
|
||||||
func checkRequiredParameters(next http.Handler) http.Handler {
|
func checkRequiredParameters(next http.Handler) http.Handler {
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import (
|
|||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/engine"
|
"github.com/deluan/navidrome/engine"
|
||||||
"github.com/cloudsonic/sonic-server/log"
|
"github.com/deluan/navidrome/log"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/engine"
|
"github.com/deluan/navidrome/engine"
|
||||||
"github.com/cloudsonic/sonic-server/log"
|
"github.com/deluan/navidrome/log"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
"github.com/cloudsonic/sonic-server/server/subsonic/responses"
|
"github.com/deluan/navidrome/server/subsonic/responses"
|
||||||
)
|
)
|
||||||
|
|
||||||
type PlaylistsController struct {
|
type PlaylistsController struct {
|
||||||
|
|||||||
+1
-1
@@ -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]}}
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
<subsonic-response xmlns="http://subsonic.org/restapi" 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</folder></user></subsonic-response>
|
<subsonic-response xmlns="http://subsonic.org/restapi" 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</folder></user></subsonic-response>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/bradleyjkemp/cupaloy"
|
"github.com/bradleyjkemp/cupaloy"
|
||||||
"github.com/cloudsonic/sonic-server/log"
|
"github.com/deluan/navidrome/log"
|
||||||
"github.com/onsi/ginkgo"
|
"github.com/onsi/ginkgo"
|
||||||
"github.com/onsi/gomega"
|
"github.com/onsi/gomega"
|
||||||
"github.com/onsi/gomega/types"
|
"github.com/onsi/gomega/types"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
"encoding/xml"
|
"encoding/xml"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
. "github.com/cloudsonic/sonic-server/server/subsonic/responses"
|
. "github.com/deluan/navidrome/server/subsonic/responses"
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
)
|
)
|
||||||
@@ -206,7 +206,7 @@ var _ = Describe("Responses", func() {
|
|||||||
|
|
||||||
Context("with data", func() {
|
Context("with data", func() {
|
||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
response.User.Email = "cloudsonic@deluan.com"
|
response.User.Email = "navidrome@deluan.com"
|
||||||
response.User.Folder = []int{1}
|
response.User.Folder = []int{1}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/engine"
|
"github.com/deluan/navidrome/engine"
|
||||||
"github.com/cloudsonic/sonic-server/log"
|
"github.com/deluan/navidrome/log"
|
||||||
"github.com/cloudsonic/sonic-server/server/subsonic/responses"
|
"github.com/deluan/navidrome/server/subsonic/responses"
|
||||||
)
|
)
|
||||||
|
|
||||||
type SearchingController struct {
|
type SearchingController struct {
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/engine"
|
"github.com/deluan/navidrome/engine"
|
||||||
"github.com/cloudsonic/sonic-server/log"
|
"github.com/deluan/navidrome/log"
|
||||||
"github.com/cloudsonic/sonic-server/model"
|
"github.com/deluan/navidrome/model"
|
||||||
"github.com/cloudsonic/sonic-server/server/subsonic/responses"
|
"github.com/deluan/navidrome/server/subsonic/responses"
|
||||||
"github.com/cloudsonic/sonic-server/utils"
|
"github.com/deluan/navidrome/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type StreamController struct {
|
type StreamController struct {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package subsonic
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/server/subsonic/responses"
|
"github.com/deluan/navidrome/server/subsonic/responses"
|
||||||
)
|
)
|
||||||
|
|
||||||
type SystemController struct{}
|
type SystemController struct{}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package subsonic
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/server/subsonic/responses"
|
"github.com/deluan/navidrome/server/subsonic/responses"
|
||||||
)
|
)
|
||||||
|
|
||||||
type UsersController struct{}
|
type UsersController struct{}
|
||||||
|
|||||||
+3
-3
@@ -6,8 +6,8 @@ import (
|
|||||||
"runtime"
|
"runtime"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/conf"
|
"github.com/deluan/navidrome/conf"
|
||||||
"github.com/cloudsonic/sonic-server/log"
|
"github.com/deluan/navidrome/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Init(t *testing.T, skipOnShort bool) {
|
func Init(t *testing.T, skipOnShort bool) {
|
||||||
@@ -16,7 +16,7 @@ func Init(t *testing.T, skipOnShort bool) {
|
|||||||
}
|
}
|
||||||
_, file, _, _ := runtime.Caller(0)
|
_, file, _, _ := runtime.Caller(0)
|
||||||
appPath, _ := filepath.Abs(filepath.Join(filepath.Dir(file), ".."))
|
appPath, _ := filepath.Abs(filepath.Join(filepath.Dir(file), ".."))
|
||||||
confPath, _ := filepath.Abs(filepath.Join(appPath, "tests", "sonic-test.toml"))
|
confPath, _ := filepath.Abs(filepath.Join(appPath, "tests", "navidrome-test.toml"))
|
||||||
|
|
||||||
os.Chdir(appPath)
|
os.Chdir(appPath)
|
||||||
conf.LoadFromFile(confPath)
|
conf.LoadFromFile(confPath)
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@ import (
|
|||||||
"encoding/xml"
|
"encoding/xml"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/server/subsonic/responses"
|
"github.com/deluan/navidrome/server/subsonic/responses"
|
||||||
"github.com/smartystreets/goconvey/convey"
|
"github.com/smartystreets/goconvey/convey"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Generated
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "sonic-ui",
|
"name": "navidrome-ui",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "sonic-ui",
|
"name": "navidrome-ui",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
work correctly both with client-side routing and a non-root public URL.
|
work correctly both with client-side routing and a non-root public URL.
|
||||||
Learn how to configure a non-root public URL by running `npm run build`.
|
Learn how to configure a non-root public URL by running `npm run build`.
|
||||||
-->
|
-->
|
||||||
<title>Cloud Sonic</title>
|
<title>Navidrome</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
|
||||||
const Title = ({ subTitle }) => {
|
const Title = ({ subTitle }) => {
|
||||||
return <span>CloudSonic {subTitle ? ` - ${subTitle}` : ''}</span>
|
return <span>Navidrome {subTitle ? ` - ${subTitle}` : ''}</span>
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Title
|
export default Title
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ const Login = ({ location }) => {
|
|||||||
<LockIcon />
|
<LockIcon />
|
||||||
</Avatar>
|
</Avatar>
|
||||||
</div>
|
</div>
|
||||||
<div className={classes.systemName}>CloudSonic</div>
|
<div className={classes.systemName}>Navidrome</div>
|
||||||
<div className={classes.form}>
|
<div className={classes.form}>
|
||||||
<div className={classes.input}>
|
<div className={classes.input}>
|
||||||
<Field
|
<Field
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ package utils
|
|||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/cloudsonic/sonic-server/conf"
|
"github.com/deluan/navidrome/conf"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NoArticle(name string) string {
|
func NoArticle(name string) string {
|
||||||
|
|||||||
+6
-6
@@ -6,12 +6,12 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/cloudsonic/sonic-server/engine"
|
"github.com/deluan/navidrome/engine"
|
||||||
"github.com/cloudsonic/sonic-server/persistence"
|
"github.com/deluan/navidrome/persistence"
|
||||||
"github.com/cloudsonic/sonic-server/scanner"
|
"github.com/deluan/navidrome/scanner"
|
||||||
"github.com/cloudsonic/sonic-server/server"
|
"github.com/deluan/navidrome/server"
|
||||||
"github.com/cloudsonic/sonic-server/server/app"
|
"github.com/deluan/navidrome/server/app"
|
||||||
"github.com/cloudsonic/sonic-server/server/subsonic"
|
"github.com/deluan/navidrome/server/subsonic"
|
||||||
"github.com/google/wire"
|
"github.com/google/wire"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
+6
-6
@@ -3,12 +3,12 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/cloudsonic/sonic-server/engine"
|
"github.com/deluan/navidrome/engine"
|
||||||
"github.com/cloudsonic/sonic-server/persistence"
|
"github.com/deluan/navidrome/persistence"
|
||||||
"github.com/cloudsonic/sonic-server/scanner"
|
"github.com/deluan/navidrome/scanner"
|
||||||
"github.com/cloudsonic/sonic-server/server"
|
"github.com/deluan/navidrome/server"
|
||||||
"github.com/cloudsonic/sonic-server/server/app"
|
"github.com/deluan/navidrome/server/app"
|
||||||
"github.com/cloudsonic/sonic-server/server/subsonic"
|
"github.com/deluan/navidrome/server/subsonic"
|
||||||
"github.com/google/wire"
|
"github.com/google/wire"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user