Skip to content

Commit d2233f8

Browse files
committed
bump xmodits-lib
1 parent 78d1fe4 commit d2233f8

File tree

3 files changed

+14
-17
lines changed

3 files changed

+14
-17
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "xmodits_py"
33
authors = ["B0ney - https://github.com/B0ney"]
44
description = "Extract samples from tracker modules. Supports IT, XM, S3M, MOD, UMX, MPTM"
5-
version = "0.3.2"
5+
version = "0.3.3"
66
edition = "2021"
77
license = "LGPLv3"
88
readme = "README.md"
@@ -15,7 +15,7 @@ crate-type = ["cdylib"]
1515

1616
[dependencies.xmodits-lib]
1717
git = "https://github.com/B0ney/xmodits-lib"
18-
rev = "ce5d922"
18+
rev = "1773dfb"
1919

2020
[dependencies.pyo3]
2121
version = "0.19.1"

src/api.rs

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@ use crate::error::{APIError, Error};
22

33
// use std::cmp::Ordering;
44
use std::path::Path;
5-
use xmodits_lib::common::{extract, SUPPORTED_EXTENSIONS};
6-
use xmodits_lib::exporter::AudioFormat;
7-
use xmodits_lib::interface::ripper::Ripper;
8-
// use xmodits_lib::interface::Error as XmoditsError;
9-
use xmodits_lib::SampleNamer;
5+
use xmodits_lib::export::{extract, Format, Ripper, SampleNamer};
6+
use xmodits_lib::SUPPORTED_EXTENSIONS;
107

118
pub fn rip(
129
path: &String,
@@ -61,19 +58,19 @@ pub fn verify_extension(path: &String, strict: bool) -> Result<(), APIError> {
6158
Ok(())
6259
}
6360

64-
fn get_format(format: Option<String>) -> Result<AudioFormat, APIError> {
61+
fn get_format(format: Option<String>) -> Result<Format, APIError> {
6562
let Some(format) = format else {
66-
return Ok(AudioFormat::WAV);
63+
return Ok(Format::WAV);
6764
};
6865

6966
let extension = format.to_lowercase();
7067
let format = match extension.as_str() {
71-
"wav" => AudioFormat::WAV,
72-
"aiff" => AudioFormat::AIFF,
73-
"8svx" => AudioFormat::IFF,
74-
"its" => AudioFormat::ITS,
75-
"s3i" => AudioFormat::S3I,
76-
"raw" => AudioFormat::RAW,
68+
"wav" => Format::WAV,
69+
"aiff" => Format::AIFF,
70+
"8svx" => Format::IFF,
71+
"its" => Format::ITS,
72+
"s3i" => Format::S3I,
73+
"raw" => Format::RAW,
7774
_ => return Err(APIError::UnrecognizedFileExtension(extension)),
7875
};
7976
Ok(format)

src/error.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use pyo3::exceptions::PyIOError;
22
use pyo3::PyErr;
3-
use xmodits_lib::interface::errors::{ExtractionError, FailedExtraction};
4-
use xmodits_lib::interface::Error as XmoditsError;
3+
4+
use xmodits_lib::error::{Error as XmoditsError, ExtractionError, FailedExtraction};
55

66
macro_rules! batch_create_exceptions {
77
($($EXCEPTION:ident) *) => {

0 commit comments

Comments
 (0)