Added function to get all Types (#36)
All checks were successful
Release Tagging / release (push) Successful in 33s
Rust Build / Check (push) Successful in 26s
Rust Build / Test Suite (push) Successful in 29s
Rust Build / Rustfmt (push) Successful in 27s
Rust Build / Clippy (push) Successful in 29s
Rust Build / build (push) Successful in 34s
Rust Build / Check (pull_request) Successful in 36s
Rust Build / Test Suite (pull_request) Successful in 41s
Rust Build / Rustfmt (pull_request) Successful in 28s
Rust Build / Clippy (pull_request) Successful in 38s
Rust Build / build (pull_request) Successful in 32s
All checks were successful
Release Tagging / release (push) Successful in 33s
Rust Build / Check (push) Successful in 26s
Rust Build / Test Suite (push) Successful in 29s
Rust Build / Rustfmt (push) Successful in 27s
Rust Build / Clippy (push) Successful in 29s
Rust Build / build (push) Successful in 34s
Rust Build / Check (pull_request) Successful in 36s
Rust Build / Test Suite (pull_request) Successful in 41s
Rust Build / Rustfmt (pull_request) Successful in 28s
Rust Build / Clippy (pull_request) Successful in 38s
Rust Build / build (pull_request) Successful in 32s
Reviewed-on: #36 Co-authored-by: phoenix <kundeng00@pm.me> Co-committed-by: phoenix <kundeng00@pm.me>
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -81,7 +81,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "icarus_meta"
|
name = "icarus_meta"
|
||||||
version = "0.2.1"
|
version = "0.2.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"lofty",
|
"lofty",
|
||||||
"tempfile",
|
"tempfile",
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "icarus_meta"
|
name = "icarus_meta"
|
||||||
version = "0.2.1"
|
version = "0.2.2"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
rust-version = "1.86"
|
rust-version = "1.86"
|
||||||
|
|
||||||
|
15
src/types.rs
15
src/types.rs
@@ -32,6 +32,21 @@ impl MetadataType {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn all_metadata_types() -> Vec<Type> {
|
||||||
|
vec![
|
||||||
|
Type::Album,
|
||||||
|
Type::Artist,
|
||||||
|
Type::AlbumArtist,
|
||||||
|
Type::Date,
|
||||||
|
Type::Disc,
|
||||||
|
Type::Genre,
|
||||||
|
Type::Title,
|
||||||
|
Type::Track,
|
||||||
|
Type::TrackCount,
|
||||||
|
Type::DiscCount,
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
pub mod access {
|
pub mod access {
|
||||||
pub fn get_type(t: super::Type) -> Result<String, std::io::Error> {
|
pub fn get_type(t: super::Type) -> Result<String, std::io::Error> {
|
||||||
match t {
|
match t {
|
||||||
|
Reference in New Issue
Block a user