treewide: complete book management interface
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: If5a21f16221f3c56a8008e139f93edc46a6a6964
This commit is contained in:
parent
bda36ac152
commit
2f31242442
23 changed files with 1693 additions and 126 deletions
|
|
@ -79,7 +79,7 @@ pub async fn detect_orphans(storage: &DynStorageBackend) -> Result<OrphanReport>
|
|||
for (id, path, hash) in &media_paths {
|
||||
hash_index
|
||||
.entry(hash.clone())
|
||||
.or_insert_with(Vec::new)
|
||||
.or_default()
|
||||
.push((*id, path.clone()));
|
||||
}
|
||||
|
||||
|
|
@ -191,13 +191,12 @@ async fn detect_untracked_files(
|
|||
if e.file_type().is_dir() {
|
||||
let name = e.file_name().to_string_lossy();
|
||||
for pattern in &ignore_patterns {
|
||||
if pattern.starts_with("*.") {
|
||||
if pattern.starts_with("*.")
|
||||
&& let Some(ext) = pattern.strip_prefix("*.")
|
||||
&& name.ends_with(ext)
|
||||
{
|
||||
// Extension pattern
|
||||
if let Some(ext) = pattern.strip_prefix("*.") {
|
||||
if name.ends_with(ext) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
} else if pattern.contains('*') {
|
||||
// Glob pattern - simplified matching
|
||||
let pattern_without_stars = pattern.replace('*', "");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue