mirror of
https://github.com/riwiwa/muzi.git
synced 2025-12-30 04:35:26 -08:00
Cleaned up project structure more and simplified the app installation
This commit is contained in:
@@ -31,7 +31,6 @@ func TableExists(name string, conn *pgx.Conn) bool {
|
||||
func DbExists() bool {
|
||||
conn, err := pgx.Connect(context.Background(), "postgres://postgres:postgres@localhost:5432/muzi")
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Cannot connect to muzi database: %v\n", err)
|
||||
return false
|
||||
}
|
||||
defer conn.Close(context.Background())
|
||||
@@ -152,8 +151,8 @@ func AddDirToDB(path string, platform int) {
|
||||
}
|
||||
|
||||
func ImportSpotify() {
|
||||
path := filepath.Join(".", "spotify-data", "zip")
|
||||
targetBase := filepath.Join(".", "spotify-data", "extracted")
|
||||
path := filepath.Join(".", "imports", "spotify", "zip")
|
||||
targetBase := filepath.Join(".", "imports", "spotify", "extracted")
|
||||
entries, err := os.ReadDir(path)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
||||
Reference in New Issue
Block a user