Skip to content

Commit

Permalink
fix(asura): decimals in chapter id (#792)
Browse files Browse the repository at this point in the history
* Handle decimals

* Bump version
  • Loading branch information
KaBankz authored Nov 11, 2024
1 parent 5b8c7f4 commit d049570
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/rust/en.asurascans/res/source.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"id": "en.asurascans",
"lang": "en",
"name": "Asura Scans",
"version": 4,
"version": 5,
"url": "https://asuracomic.net",
"nsfw": 0
}
Expand Down
2 changes: 1 addition & 1 deletion src/rust/en.asurascans/src/helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pub fn get_chapter_id(url: &str) -> Result<String, AidokuError> {
if segment == "chapter" {
if let Some(chapter_segment) = segments.next() {
// We want to keep the chapter ID without trailing characters
if let Some(end_pos) = chapter_segment.find(|c: char| !c.is_numeric()) {
if let Some(end_pos) = chapter_segment.find(|c: char| !c.is_numeric() && c != '.') {
let chapter_id = &chapter_segment[0..end_pos];
return Ok(String::from(chapter_id));
} else {
Expand Down

0 comments on commit d049570

Please sign in to comment.