diff --git a/patches/fix-image-ids/fix-image-ids.go b/patches/fix-image-ids/fix-image-ids.go new file mode 100644 index 00000000..ac286cd8 --- /dev/null +++ b/patches/fix-image-ids/fix-image-ids.go @@ -0,0 +1,23 @@ +package main + +import ( + "github.com/animenotifier/arn" + "github.com/fatih/color" +) + +func main() { + color.Yellow("Moving Kitsu IDs to new IDs") + + defer color.Green("Finished.") + defer arn.Node.Close() + + for anime := range arn.StreamAnime() { + kitsuID := anime.GetMapping("kitsu/anime") + + if kitsuID == "" { + continue + } + + anime.MoveImageFiles(kitsuID, anime.ID) + } +}