🎧 Your Personal Streaming Service
Go airsonicmadsonicmedia-servermusicmusic-servernavidromeopensubsonicraspberry-piself-hostedstreamerstreaming-apistreaming-audiosubsonicsubsonic-server
Removed support for Jamstash in dev mode. Not needed anymore :)
Deluan15a06fcd27c4
diff --git a/.dockerignore b/.dockerignoreindex 9bf6d78f6..f68d039df 100644--- a/.dockerignore+++ b/.dockerignore@@ -1,6 +1,5 @@.DS_Storeui/node_modules-Jamstash-masterDockerfiledocker-compose*.ymldatadiff --git a/.gitignore b/.gitignoreindex 77c75439d..bba4da222 100644--- a/.gitignore+++ b/.gitignore@@ -12,7 +12,6 @@ TODO.mdvarnavidrome.tomlmaster.zip-Jamstash-mastertestDBnavidrome.db*.swpdiff --git a/Makefile b/Makefileindex a8640fe40..1404597ed 100644--- a/Makefile+++ b/Makefile@@ -62,13 +62,6 @@ setup-git:(cd .git/hooks && ln -sf ../../git/* .).PHONY: setup-git-Jamstash-master:- wget -N https://github.com/tsquillario/Jamstash/archive/master.zip- unzip -o master.zip- rm master.zip- (cd Jamstash-master && npm ci && npx bower install && npx grunt build)- rm -rf Jamstash-master/node_modules Jamstash-master/bower_components-check_env: check_go_env check_node_env.PHONY: check_envdiff --git a/reflex.conf b/reflex.confindex fc43f934a..0540d131e 100644--- a/reflex.conf+++ b/reflex.conf@@ -1 +1 @@--s -r "(\.go$$|navidrome.toml|resources)" -R "(Jamstash-master|^ui|^data|^db/migration)" -- go run .+-s -r "(\.go$$|navidrome.toml|resources)" -R "(^ui|^data|^db/migration)" -- go run .diff --git a/server/fileserver.go b/server/fileserver.godeleted file mode 100644index deedb52a8..000000000--- a/server/fileserver.go+++ /dev/null@@ -1,47 +0,0 @@-package server--import (- "net/http"- "os"- "strings"-- "github.com/go-chi/chi"-)--func FileServer(r chi.Router, fullPath, subPath string, root http.FileSystem) {- if strings.ContainsAny(fullPath, "{}*") {- panic("FileServer does not permit URL parameters.")- }-- fs := http.StripPrefix(fullPath, http.FileServer(justFilesFilesystem{root}))-- if subPath != "/" && subPath[len(subPath)-1] != '/' {- r.Get(subPath, http.RedirectHandler(fullPath+"/", 302).ServeHTTP)- subPath += "/"- }- subPath += "*"-- r.Get(subPath, func(w http.ResponseWriter, r *http.Request) {- fs.ServeHTTP(w, r)- })-}--type justFilesFilesystem struct {- fs http.FileSystem-}--func (fs justFilesFilesystem) Open(name string) (http.File, error) {- f, err := fs.fs.Open(name)- if err != nil {- return nil, err- }- return neuteredReaddirFile{f}, nil-}--type neuteredReaddirFile struct {- http.File-}--func (f neuteredReaddirFile) Readdir(count int) ([]os.FileInfo, error) {- return nil, nil-}diff --git a/server/server.go b/server/server.goindex 7e589bc4c..5a261da4c 100644--- a/server/server.go+++ b/server/server.go@@ -2,9 +2,7 @@ package serverimport ("net/http"- "os""path"- "path/filepath""time""github.com/deluan/navidrome/conf"@@ -67,10 +65,6 @@ func (a *Server) initRoutes() {http.Redirect(w, r, indexHtml, 302)})- workDir, _ := os.Getwd()- filesDir := filepath.Join(workDir, "Jamstash-master/dist")- FileServer(r, "/Jamstash", "/Jamstash", http.Dir(filesDir))-a.router = r}