From 78f919158e79b92a6b518535d8e2c85d69f77525 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=CC=81scar=20M=2E=20Lage?= Date: Fri, 11 Oct 2024 21:24:46 +0200 Subject: [PATCH] Fix: priting errors --- internal/books/controller.go | 4 ++-- internal/games/controller.go | 4 ++-- internal/movies/controller.go | 6 +++--- internal/music/controller.go | 4 ++-- internal/series/controller.go | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/books/controller.go b/internal/books/controller.go index 1249016..951ea40 100644 --- a/internal/books/controller.go +++ b/internal/books/controller.go @@ -35,7 +35,7 @@ func ProcessBooks(books []Book) error { if book.ID == "" { err := SearchBookByTitle(book.Title, &book) if err != nil { - fmt.Printf("Error searching book by title %s: %s\n", book.Title, err) + fmt.Printf(" ! Error searching book by title %s: %s\n", book.Title, err) continue } } @@ -46,7 +46,7 @@ func ProcessBooks(books []Book) error { if imageURL != "" { err := DownloadImage(imageURL, book.Slug) if err != nil { - fmt.Printf("Error downloading %s: %s\n", imageURL, err) + fmt.Printf(" ! Error downloading %s: %s\n", imageURL, err) } } book.Image = fmt.Sprintf("%s.jpg", book.Slug) diff --git a/internal/games/controller.go b/internal/games/controller.go index 445b49d..189e02f 100644 --- a/internal/games/controller.go +++ b/internal/games/controller.go @@ -35,7 +35,7 @@ func ProcessGames(games []Game) error { if game.ID == 0 { err := SearchGameByTitle(game.Title, &game) if err != nil { - fmt.Printf("Error searching game by title %s: %s\n", game.Title, err) + fmt.Printf(" ! Error searching game by title %s: %s\n", game.Title, err) continue } } @@ -46,7 +46,7 @@ func ProcessGames(games []Game) error { suffix := "" err := DownloadImage(game.Image, game.Slug, suffix) if err != nil { - fmt.Printf("Error downloading %s: %s\n", game.Image, err) + fmt.Printf(" ! Error downloading %s: %s\n", game.Image, err) } game.Image = fmt.Sprintf("%s.jpg", game.Slug) } diff --git a/internal/movies/controller.go b/internal/movies/controller.go index 3cbdae6..8b25fa3 100644 --- a/internal/movies/controller.go +++ b/internal/movies/controller.go @@ -37,7 +37,7 @@ func ProcessMovies(movies []Movie) error { if movie.IDs.Trakt == 0 { err := SearchMovieByTitle(movie.Title, &movie) if err != nil { - fmt.Printf("Error searching movie by title %s: %s\n", movie.Title, err) + fmt.Printf(" ! Error searching movie by title %s: %s\n", movie.Title, err) continue } } @@ -45,7 +45,7 @@ func ProcessMovies(movies []Movie) error { // Now we need to get the images from fanart posterURL, backgroundURL, logoURL, err := FetchImagesFromFanart(movie.IDs.TMDB) if err != nil { - fmt.Printf("Error fetching images from Fanart.tv for %s: %s\n", movie.Title, err) + fmt.Printf(" ! Error fetching images from Fanart.tv for %s: %s\n", movie.Title, err) continue } @@ -75,7 +75,7 @@ func ProcessMovies(movies []Movie) error { if image.URL != "" { err := DownloadImage(image.URL, movie.IDs.Slug, image.ImageType) if err != nil { - fmt.Printf("Error downloading %s for %s: %s\n", image.ImageType, movie.Title, err) + fmt.Printf(" ! Error downloading %s for %s: %s\n", image.ImageType, movie.Title, err) } else { image.SetField(fmt.Sprintf("%s-%s.jpg", movie.IDs.Slug, image.ImageType)) } diff --git a/internal/music/controller.go b/internal/music/controller.go index adbde1e..1404b3c 100644 --- a/internal/music/controller.go +++ b/internal/music/controller.go @@ -35,7 +35,7 @@ func ProcessAlbum(albumList []Album) error { if album.ID == "" { err := SearchAlbumByTitle(album.Title, &album) if err != nil { - fmt.Printf("Error searching album by title %s: %s\n", album.Title, err) + fmt.Printf(" ! Error searching album by title %s: %s\n", album.Title, err) continue } } @@ -45,7 +45,7 @@ func ProcessAlbum(albumList []Album) error { if album.Image != "" { err := DownloadImage(album.Image, album.Slug) if err != nil { - fmt.Printf("Error downloading %s: %s\n", album.Image, err) + fmt.Printf(" ! Error downloading %s: %s\n", album.Image, err) } } album.Image = fmt.Sprintf("%s.jpg", album.Slug) diff --git a/internal/series/controller.go b/internal/series/controller.go index 3a73507..baacfbd 100644 --- a/internal/series/controller.go +++ b/internal/series/controller.go @@ -37,7 +37,7 @@ func ProcessSeries(series []Serie) error { if serie.IDs.Trakt == 0 { err := SearchSerieByTitle(serie.Title, &serie) if err != nil { - fmt.Printf("Error searching serie by title %s: %s\n", serie.Title, err) + fmt.Printf(" ! Error searching serie by title %s: %s\n", serie.Title, err) continue } } @@ -45,7 +45,7 @@ func ProcessSeries(series []Serie) error { // Now we need to get the images from fanart posterURL, backgroundURL, logoURL, err := FetchImagesFromFanart(serie.IDs.TVDB) if err != nil { - fmt.Printf("Error fetching images from Fanart.tv for %s: %s\n", serie.Title, err) + fmt.Printf(" ! Error fetching images from Fanart.tv for %s: %s\n", serie.Title, err) continue } @@ -75,7 +75,7 @@ func ProcessSeries(series []Serie) error { if image.URL != "" { err := DownloadImage(image.URL, serie.IDs.Slug, image.ImageType) if err != nil { - fmt.Printf("Error downloading %s for %s: %s\n", image.ImageType, serie.Title, err) + fmt.Printf(" ! Error downloading %s for %s: %s\n", image.ImageType, serie.Title, err) } else { image.SetField(fmt.Sprintf("%s-%s.jpg", serie.IDs.Slug, image.ImageType)) }