Add clear downloads and clear torrents command

This commit is contained in:
Ben Sarmiento
2024-01-08 12:30:38 +01:00
parent 62de3723c1
commit b1116dfcca
6 changed files with 171 additions and 20 deletions

View File

@@ -37,7 +37,23 @@ func main() {
},
}
rootCmd.AddCommand(versionCmd, networkTestCmd)
var clearDownloadsCmd = &cobra.Command{
Use: "clear-downloads",
Short: "Clear all downloads (unrestricted links) in your account",
Run: func(cmd *cobra.Command, args []string) {
internal.ClearDownloads()
},
}
var clearTorrentsCmd = &cobra.Command{
Use: "clear-torrents",
Short: "Clear all torrents in your account",
Run: func(cmd *cobra.Command, args []string) {
internal.ClearTorrents()
},
}
rootCmd.AddCommand(versionCmd, networkTestCmd, clearDownloadsCmd, clearTorrentsCmd)
if err := rootCmd.Execute(); err != nil {
fmt.Println(err)