Skip to content

Commit 6b2fc0b

Browse files
committed
Clarify conversion error messages
1 parent 26b3c49 commit 6b2fc0b

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/main.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,16 @@ fn neko_to_kotatsu(input_path: String, output_path: PathBuf, verbose: bool) -> s
210210
let kotatsu_manga = manga_to_kotatsu(&manga)?;
211211

212212
if kotatsu_manga.source == "UNKNOWN" {
213-
let source = get_source(manga.source)?;
214-
if verbose {
215-
println!("[WARNING] Unable to convert {} from source {} ({})", manga.title, source.name, source.baseUrl );
213+
let source = get_source(manga.source);
214+
if let Ok(source) = source {
215+
if verbose {
216+
println!("[WARNING] Unable to convert '{}' from source {} ({}), Kotatsu parser not found", manga.title, source.name, source.baseUrl);
217+
}
218+
errored_sources.insert(source.name, source.baseUrl);
219+
} else if verbose {
220+
println!("[WARNING] Unable to convert '{}', unknown Tachiyomi source (ID {})", manga.title, manga.source)
216221
}
217222
errored_manga += 1;
218-
errored_sources.insert(source.name, source.baseUrl);
219223
continue;
220224
}
221225

0 commit comments

Comments
 (0)