From 78c2172385be4b70661eb07be8172843f2e6b6b5 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Fri, 16 Mar 2018 00:38:04 +0100 Subject: [PATCH] Added ratings reset tool --- .../reset-animelist-ratings.go | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 patches/reset-animelist-ratings/reset-animelist-ratings.go diff --git a/patches/reset-animelist-ratings/reset-animelist-ratings.go b/patches/reset-animelist-ratings/reset-animelist-ratings.go new file mode 100644 index 00000000..a7b0d356 --- /dev/null +++ b/patches/reset-animelist-ratings/reset-animelist-ratings.go @@ -0,0 +1,20 @@ +package main + +import ( + "github.com/animenotifier/arn" +) + +func main() { + defer arn.Node.Close() + + animeList, err := arn.GetAnimeList("3eoFUr_zg") + arn.PanicOnError(err) + + animeList.Lock() + for _, item := range animeList.Items { + item.Rating.Overall = 0 + } + animeList.Unlock() + + animeList.Save() +}