chore(watcher): disable feature due to known DB concurrency issues
This commit is contained in:
+7
-4
@@ -1,10 +1,6 @@
|
|||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"os"
|
|
||||||
|
|
||||||
"github.com/mathismqn/godeez/internal/watcher"
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -13,6 +9,12 @@ var RootCmd = &cobra.Command{
|
|||||||
Short: "GoDeez is a tool to download music from Deezer",
|
Short: "GoDeez is a tool to download music from Deezer",
|
||||||
SilenceUsage: true,
|
SilenceUsage: true,
|
||||||
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
|
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
|
||||||
|
// TEMPORARILY DISABLED:
|
||||||
|
// Watcher autostart (EnsureAutostart) has been disabled due to
|
||||||
|
// concurrency issues with database access (e.g., when using `download`).
|
||||||
|
// To re-enable, uncomment the line below.
|
||||||
|
|
||||||
|
/*
|
||||||
homeDir, err := os.UserHomeDir()
|
homeDir, err := os.UserHomeDir()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to get home directory: %w", err)
|
return fmt.Errorf("failed to get home directory: %w", err)
|
||||||
@@ -21,6 +23,7 @@ var RootCmd = &cobra.Command{
|
|||||||
if err := watcher.EnsureAutostart(homeDir); err != nil {
|
if err := watcher.EnsureAutostart(homeDir); err != nil {
|
||||||
fmt.Fprintf(os.Stderr, "Warning: failed to install autostart for watcher: %v\n", err)
|
fmt.Fprintf(os.Stderr, "Warning: failed to install autostart for watcher: %v\n", err)
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
},
|
},
|
||||||
|
|||||||
+5
-1
@@ -9,6 +9,10 @@ var watchCmd = &cobra.Command{
|
|||||||
Short: "Watch playlists and auto-download new tracks",
|
Short: "Watch playlists and auto-download new tracks",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TEMPORARILY DISABLED:
|
||||||
|
// The `watch` command and all its subcommands are currently disabled
|
||||||
|
// due to known issues (e.g., database access conflicts with `download`).
|
||||||
|
// To re-enable, uncomment the line below.
|
||||||
func init() {
|
func init() {
|
||||||
RootCmd.AddCommand(watchCmd)
|
// RootCmd.AddCommand(watchCmd)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user