Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(nhentai): webp images #800

Merged
merged 1 commit into from
Nov 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/rust/multi.nhentai/res/source.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"id": "multi.nhentai",
"lang": "multi",
"name": "NHentai",
"version": 6,
"version": 7,
"url": "https://nhentai.net/",
"nsfw": 2
},
Expand Down
1 change: 1 addition & 0 deletions src/rust/multi.nhentai/src/helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,13 @@
}

pub fn get_file_type(filetype: String) -> String {
return match filetype.as_str() {
"j" => String::from("jpg"),
"p" => String::from("png"),
"w" => String::from("webp"),
"g" => String::from("gif"),
_ => String::new(),
};

Check warning on line 65 in src/rust/multi.nhentai/src/helper.rs

View workflow job for this annotation

GitHub Actions / lint

unneeded `return` statement

warning: unneeded `return` statement --> src/helper.rs:59:2 | 59 | / return match filetype.as_str() { 60 | | "j" => String::from("jpg"), 61 | | "p" => String::from("png"), 62 | | "w" => String::from("webp"), 63 | | "g" => String::from("gif"), 64 | | _ => String::new(), 65 | | }; | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return = note: `#[warn(clippy::needless_return)]` on by default help: remove `return` | 59 ~ match filetype.as_str() { 60 ~ "j" => String::from("jpg"), 61 ~ "p" => String::from("png"), 62 ~ "w" => String::from("webp"), 63 ~ "g" => String::from("gif"), 64 ~ _ => String::new(), 65 ~ } |
}

pub fn get_tag_names_by_type(tags: ArrayRef, tag_type: &str) -> Result<Vec<String>> {
Expand Down
Loading