refactor: Phase A — extraction des helpers partagés et micro-fixes
- Centralise remap_libraries_path/unmap_libraries_path dans crates/core/paths.rs (supprime 4 copies dupliquées dans API + indexer) - Centralise mode_to_interval_minutes/validate_schedule_mode dans crates/core/schedule.rs (remplace 8 match blocks + 4 validations inline) - Ajoute helpers env_or<T>/env_string_or dans config.rs, utilise ThumbnailConfig::default() comme base dans from_env() (élimine la duplication des valeurs par défaut) - Supprime std::mem::take inutile dans books.rs - Cible #[allow(dead_code)] sur le champ plutôt que le struct (metadata.rs) - Remplace eprintln! par tracing::warn! dans parsers - Fix clippy boolean logic bug dans prowlarr.rs 10 nouveaux tests unitaires (paths + schedule) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -88,7 +88,7 @@ fn extract_series(path: &Path, library_root: &Path) -> Option<String> {
|
||||
} else if let Ok(relative) = parent.strip_prefix(library_root) {
|
||||
relative
|
||||
} else {
|
||||
eprintln!(
|
||||
tracing::warn!(
|
||||
"[PARSER] Cannot determine series: parent '{}' doesn't start with root '{}'",
|
||||
parent.display(),
|
||||
library_root.display()
|
||||
|
||||
Reference in New Issue
Block a user