From b3ded07500d3b8edaf4f2a0b8d45ec951a6fa78b Mon Sep 17 00:00:00 2001 From: laker-93 Date: Thu, 2 Jan 2025 08:09:25 +0000 Subject: [PATCH] fixes after rebasing with upstream/master (#3) --- db/migrations/20241209172239_duplicate.go | 25 ------------------- db/migrations/20241227222849_duplicate.go | 25 +++++++++++++++++++ server/subsonic/api.go | 1 - .../{DeleteButton.js => DeleteButton.jsx} | 0 ...leteMenuDialog.js => DeleteMenuDialog.jsx} | 0 5 files changed, 25 insertions(+), 26 deletions(-) delete mode 100644 db/migrations/20241209172239_duplicate.go create mode 100644 db/migrations/20241227222849_duplicate.go rename ui/src/common/{DeleteButton.js => DeleteButton.jsx} (100%) rename ui/src/dialogs/{DeleteMenuDialog.js => DeleteMenuDialog.jsx} (100%) diff --git a/db/migrations/20241209172239_duplicate.go b/db/migrations/20241209172239_duplicate.go deleted file mode 100644 index bcdba0495..000000000 --- a/db/migrations/20241209172239_duplicate.go +++ /dev/null @@ -1,25 +0,0 @@ -package migrations - -import ( - "context" - "database/sql" - "github.com/pressly/goose/v3" -) - -func init() { - goose.AddMigrationContext(upDuplicate, downDuplicate) -} - -func upDuplicate(ctx context.Context, tx *sql.Tx) error { - _, err := tx.Exec(` -alter table media_file - add is_duplicate bool not null default false; - -`) - return err -} - -func downDuplicate(ctx context.Context, tx *sql.Tx) error { - // This code is executed when the migration is rolled back. - return nil -} diff --git a/db/migrations/20241227222849_duplicate.go b/db/migrations/20241227222849_duplicate.go new file mode 100644 index 000000000..6121ad7ef --- /dev/null +++ b/db/migrations/20241227222849_duplicate.go @@ -0,0 +1,25 @@ +package migrations + +import ( + "context" + "database/sql" + "github.com/pressly/goose/v3" +) + +func init() { + goose.AddMigrationContext(upDuplicate, downDuplicate) +} + +func upDuplicate(ctx context.Context, tx *sql.Tx) error { + _, err := tx.Exec(` +alter table media_file + add is_duplicate bool not null default false; + +`) + return err +} + +func downDuplicate(ctx context.Context, tx *sql.Tx) error { + // This code is executed when the migration is rolled back. + return nil +} \ No newline at end of file diff --git a/server/subsonic/api.go b/server/subsonic/api.go index 5471c8c66..dfa945086 100644 --- a/server/subsonic/api.go +++ b/server/subsonic/api.go @@ -158,7 +158,6 @@ func (api *Router) routes() http.Handler { h(r, "getLyricsBySongId", api.GetLyricsBySongId) hr(r, "stream", api.Stream) hr(r, "download", api.Download) - hr(r, "delete", api.Delete) }) r.Group(func(r chi.Router) { // configure request throttling diff --git a/ui/src/common/DeleteButton.js b/ui/src/common/DeleteButton.jsx similarity index 100% rename from ui/src/common/DeleteButton.js rename to ui/src/common/DeleteButton.jsx diff --git a/ui/src/dialogs/DeleteMenuDialog.js b/ui/src/dialogs/DeleteMenuDialog.jsx similarity index 100% rename from ui/src/dialogs/DeleteMenuDialog.js rename to ui/src/dialogs/DeleteMenuDialog.jsx