Skip to content

Commit 252ca2a

Browse files
authored
Add AudioFlac variant (#65)
1 parent a37717a commit 252ca2a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/rbx/v1/assets.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ pub struct AssetErrorStatus {
127127
pub enum AssetType {
128128
AudioMp3,
129129
AudioOgg,
130+
AudioFlac,
130131
DecalPng,
131132
DecalJpeg,
132133
DecalBmp,
@@ -139,6 +140,7 @@ impl AssetType {
139140
match self {
140141
Self::AudioMp3 => "audio/mpeg",
141142
Self::AudioOgg => "audio/ogg",
143+
Self::AudioFlac => "audio/flac",
142144
Self::DecalPng => "image/png",
143145
Self::DecalJpeg => "image/jpeg",
144146
Self::DecalBmp => "image/bmp",
@@ -149,7 +151,7 @@ impl AssetType {
149151

150152
fn asset_type(&self) -> &'static str {
151153
match self {
152-
Self::AudioMp3 | Self::AudioOgg => "Audio",
154+
Self::AudioMp3 | Self::AudioOgg | Self::AudioFlac => "Audio",
153155
Self::DecalPng | Self::DecalJpeg | Self::DecalBmp | Self::DecalTga => "Decal",
154156
Self::ModelFbx => "Model",
155157
}
@@ -159,6 +161,7 @@ impl AssetType {
159161
match extension.to_lowercase().as_str() {
160162
"mp3" => Ok(Self::AudioMp3),
161163
"ogg" => Ok(Self::AudioOgg),
164+
"flac" => Ok(Self::AudioFlac),
162165
"png" => Ok(Self::DecalPng),
163166
"jpg" => Ok(Self::DecalJpeg),
164167
"jpeg" => Ok(Self::DecalJpeg),

0 commit comments

Comments
 (0)