diff --git a/internal/services/ebook_scanner.go b/internal/services/ebook_scanner.go index 54e1da1..a5441f3 100644 --- a/internal/services/ebook_scanner.go +++ b/internal/services/ebook_scanner.go @@ -226,7 +226,7 @@ func (s *EbookScanner) processEbookFile(ctx context.Context, path string) error } fmt.Printf("Ebook already exists with same size, skipping: %s\n", path) return nil // Skip if already exists and size matches - } else if err != pgx.ErrNoRows && !strings.Contains(err.Error(), "no rows") { + } else if err != pgx.ErrNoRows { fmt.Printf("Database error checking ebook existence: %v\n", err) // Some other error occurred return fmt.Errorf("failed to check if ebook exists: %v", err)