Fix: prevent api calls if we are updating

main
Óscar M. Lage 2024-10-14 13:44:07 +02:00
parent ad98329552
commit 5ce0c35a11
2 changed files with 6 additions and 0 deletions

View File

@ -46,6 +46,9 @@ func ProcessBooks(books []Book, update bool) error {
fmt.Printf(" ! Error saving updated markdown for book %s: %v\n", book.Title, err) fmt.Printf(" ! Error saving updated markdown for book %s: %v\n", book.Title, err)
continue continue
} }
// We want to continue the loop here, in update's cases we don't
// want to do any api calls for info nor for images
continue
} }
// If we dont have ID, search movie by Title and get the ID // If we dont have ID, search movie by Title and get the ID

View File

@ -46,6 +46,9 @@ func ProcessGames(games []Game, update bool) error {
fmt.Printf(" ! Error saving updated markdown for game %s: %v\n", game.Title, err) fmt.Printf(" ! Error saving updated markdown for game %s: %v\n", game.Title, err)
continue continue
} }
// We want to continue the loop here, in update's cases we don't
// want to do any api calls for info nor for images
continue
} }
// If we dont have ID, search movie by Title and get the ID // If we dont have ID, search movie by Title and get the ID