Model updates, bugfixes, and a new muxing cli tool

This commit is contained in:
2026-05-29 22:26:22 -06:00
parent cf4327389a
commit b6ad592951
32 changed files with 2246 additions and 453 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "flix-fs"
version = "0.0.18"
version = "0.0.19"
license-file.workspace = true
description = "Filesystem scanner for flix media"
+3 -2
View File
@@ -72,11 +72,12 @@ impl From<show::Scanner> for Scanner {
impl Scanner {
/// Helper function for stripping allowed numerical prefixes for sorting ("01 - ")
fn strip_numeric_prefix(mut s: &str) -> &str {
fn strip_numeric_prefix(original: &str) -> &str {
let mut s = original;
while let Some('0'..='9') = s.chars().next() {
s = &s[1..]
}
s.strip_prefix(" - ").unwrap_or(s)
s.strip_prefix(" - ").unwrap_or(original)
}
/// Detect the type of a folder and call the correct scanner. Use
+10
View File
@@ -27,6 +27,16 @@ pub enum MediaRef<ID> {
Slug(String),
}
impl<ID> MediaRef<ID> {
/// Get the slug if it exists
pub fn into_slug(self) -> Option<String> {
match self {
MediaRef::Id(_) => None,
MediaRef::Slug(slug) => Some(slug),
}
}
}
/// A scanned collection
#[derive(Debug)]
pub struct CollectionScan {