mirror of
https://github.com/G2-Games/minidisc-cli.git
synced 2025-05-03 10:12:55 -05:00
Repair track upload
This commit is contained in:
parent
151214764a
commit
80a5626a0c
1 changed files with 10 additions and 6 deletions
|
@ -53,8 +53,8 @@ impl WireFormat {
|
||||||
const fn frame_size(&self) -> u16 {
|
const fn frame_size(&self) -> u16 {
|
||||||
match self {
|
match self {
|
||||||
WireFormat::Pcm => 2048,
|
WireFormat::Pcm => 2048,
|
||||||
WireFormat::L105kbps => 192,
|
WireFormat::L105kbps => 152,
|
||||||
WireFormat::LP2 => 152,
|
WireFormat::LP2 => 192,
|
||||||
WireFormat::LP4 => 96,
|
WireFormat::LP4 => 96,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1086,8 +1086,10 @@ impl NetMDInterface {
|
||||||
pub async fn track_title(&mut self, track: u16, wchar: bool) -> Result<String, InterfaceError> {
|
pub async fn track_title(&mut self, track: u16, wchar: bool) -> Result<String, InterfaceError> {
|
||||||
let title = match self.track_titles([track].into(), wchar).await {
|
let title = match self.track_titles([track].into(), wchar).await {
|
||||||
Ok(titles) => titles[0].clone(),
|
Ok(titles) => titles[0].clone(),
|
||||||
Err(error) if error.to_string() == "Rejected" => String::new(),
|
Err(error) => match error {
|
||||||
Err(error) => return Err(error),
|
InterfaceError::Rejected(_) => String::new(),
|
||||||
|
_ => return Err(error),
|
||||||
|
},
|
||||||
};
|
};
|
||||||
Ok(title)
|
Ok(title)
|
||||||
}
|
}
|
||||||
|
@ -1180,8 +1182,10 @@ impl NetMDInterface {
|
||||||
}
|
}
|
||||||
length_after_encoding_to_sjis(¤t_title) as u16
|
length_after_encoding_to_sjis(¤t_title) as u16
|
||||||
}
|
}
|
||||||
Err(error) if error.to_string() == "Rejected" => 0,
|
Err(error) => match error {
|
||||||
Err(error) => return Err(error),
|
InterfaceError::Rejected(_) => 0,
|
||||||
|
_ => return Err(error),
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
self.change_descriptor_state(&descriptor, &DescriptorAction::OpenWrite)
|
self.change_descriptor_state(&descriptor, &DescriptorAction::OpenWrite)
|
||||||
|
|
Loading…
Reference in a new issue