Cleanup
This commit is contained in:
28
patches/add-mappings/add-mappings.go
Normal file
28
patches/add-mappings/add-mappings.go
Normal file
@ -0,0 +1,28 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/animenotifier/arn"
|
||||
)
|
||||
|
||||
var mappings = map[string]arn.Mapping{
|
||||
"13055": arn.Mapping{
|
||||
Service: "shoboi/anime",
|
||||
ServiceID: "4528",
|
||||
},
|
||||
}
|
||||
|
||||
func main() {
|
||||
for animeID, mapping := range mappings {
|
||||
anime, err := arn.GetAnime(animeID)
|
||||
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
fmt.Println(anime.ID, "=", mapping.Service, mapping.ServiceID)
|
||||
anime.AddMapping(mapping.Service, mapping.ServiceID, "4J6qpK1ve")
|
||||
anime.Save()
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user