You've already forked flix
Model updates, bugfixes, and a new muxing cli tool
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user