Skip to content

Commit 0ba05a7

Browse files
committed
Adding list of extensions
1 parent 062ec3e commit 0ba05a7

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

lofty/src/file/file_type.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ use crate::tag::TagType;
55
use std::ffi::OsStr;
66
use std::path::Path;
77

8+
/// Audio extensions
9+
pub const EXTENSIONS: &[&str] = &[
10+
"aac", "ape", "aiff", "aif", "afc", "aifc", "mp3", "mp2", "mp1", "wav", "wv", "opus", "flac",
11+
"ogg", "mp4", "m4a", "m4b", "m4p", "m4r", "m4v", "3gp", "mpc", "mp+", "mpp", "spx",
12+
];
13+
814
/// The type of file read
915
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
1016
#[derive(PartialEq, Eq, Copy, Clone, Debug)]

lofty/src/file/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ mod file_type;
55
mod tagged_file;
66

77
pub use audio_file::AudioFile;
8+
pub use file_type::EXTENSIONS;
89
pub use file_type::FileType;
910
pub use tagged_file::{BoundTaggedFile, TaggedFile, TaggedFileExt};
1011

0 commit comments

Comments
 (0)