Skip to content

🎧 Your Personal Streaming Service

Removed support for Jamstash in dev mode. Not needed anymore :)

Deluan15a06fcd27c4
diff --git a/.dockerignore b/.dockerignore
index 9bf6d78f6..f68d039df 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -1,6 +1,5 @@
.DS_Store
ui/node_modules
-Jamstash-master
Dockerfile
docker-compose*.yml
data
diff --git a/.gitignore b/.gitignore
index 77c75439d..bba4da222 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,7 +12,6 @@ TODO.md
var
navidrome.toml
master.zip
-Jamstash-master
testDB
navidrome.db
*.swp
diff --git a/Makefile b/Makefile
index 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_env
diff --git a/reflex.conf b/reflex.conf
index 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.go
deleted file mode 100644
index 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.go
index 7e589bc4c..5a261da4c 100644
--- a/server/server.go
+++ b/server/server.go
@@ -2,9 +2,7 @@ package server
import (
"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
}