fix(api): delete series files and media_files rows

This commit is contained in:
Miguel Palhas
2026-08-23 18:23:41 +01:00
parent 17949c0848
commit b0f56f59aa
6 changed files with 291 additions and 1 deletions
+1 -1
View File
@@ -478,7 +478,7 @@ async fn remove_library_files(state: &AppState, id: i64) -> Result<(), ApiError>
/// root, or the file itself when it sits in the root with no folder of its
/// own. `None` when the file is not under the root at all, which is the
/// guard that keeps a delete inside the library it belongs to.
fn title_target(root: &str, file: &str) -> Option<std::path::PathBuf> {
pub(crate) fn title_target(root: &str, file: &str) -> Option<std::path::PathBuf> {
let root = std::path::Path::new(root);
let relative = std::path::Path::new(file).strip_prefix(root).ok()?;
let first = relative.components().next()?;