Added patch to fix image IDs
This commit is contained in:
parent
1609a0db75
commit
7e7747e517
23
patches/fix-image-ids/fix-image-ids.go
Normal file
23
patches/fix-image-ids/fix-image-ids.go
Normal file
@ -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)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user