diff --git a/src/rust/mangastream/sources/phenixscans/.cargo/config b/src/rust/mangastream/sources/phenixscans/.cargo/config new file mode 100644 index 000000000..f4e8c002f --- /dev/null +++ b/src/rust/mangastream/sources/phenixscans/.cargo/config @@ -0,0 +1,2 @@ +[build] +target = "wasm32-unknown-unknown" diff --git a/src/rust/mangastream/sources/phenixscans/Cargo.toml b/src/rust/mangastream/sources/phenixscans/Cargo.toml new file mode 100644 index 000000000..7f9a08d44 --- /dev/null +++ b/src/rust/mangastream/sources/phenixscans/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "phenixscans" +version = "0.1.0" +edition = "2021" +publish = false + +[lib] +crate-type = ["cdylib"] + +[dependencies] +aidoku = { git = "https://github.com/Aidoku/aidoku-rs/" } +mangastream_template = { path = "../../template" } diff --git a/src/rust/mangastream/sources/phenixscans/res/Icon.png b/src/rust/mangastream/sources/phenixscans/res/Icon.png new file mode 100644 index 000000000..cfd6fc3ec Binary files /dev/null and b/src/rust/mangastream/sources/phenixscans/res/Icon.png differ diff --git a/src/rust/mangastream/sources/phenixscans/res/filters.json b/src/rust/mangastream/sources/phenixscans/res/filters.json new file mode 100644 index 000000000..631ba2783 --- /dev/null +++ b/src/rust/mangastream/sources/phenixscans/res/filters.json @@ -0,0 +1,26 @@ +[ + { + "type": "title" + }, + { + "type": "select", + "name": "Status", + "options": [ + "All", + "En Cours", + "Terminé", + "Abandonné" + ] + }, + { + "type": "select", + "name": "Type", + "options": [ + "All", + "Manga", + "Manhwa", + "Manhua", + "Comic" + ] + } +] diff --git a/src/rust/mangastream/sources/phenixscans/res/source.json b/src/rust/mangastream/sources/phenixscans/res/source.json new file mode 100644 index 000000000..db70d51b1 --- /dev/null +++ b/src/rust/mangastream/sources/phenixscans/res/source.json @@ -0,0 +1,20 @@ +{ + "info": { + "id": "fr.phenixscans", + "lang": "fr", + "name": "Phenix Scans", + "version": 1, + "url": "https://phenixscans.fr/" + }, + "listings": [ + { + "name": "Populaire" + }, + { + "name": "Dernières" + }, + { + "name": "Nouveau" + } + ] +} diff --git a/src/rust/mangastream/sources/phenixscans/src/lib.rs b/src/rust/mangastream/sources/phenixscans/src/lib.rs new file mode 100644 index 000000000..0ee95c18b --- /dev/null +++ b/src/rust/mangastream/sources/phenixscans/src/lib.rs @@ -0,0 +1,55 @@ +#![no_std] +use aidoku::{ + error::Result, prelude::*, std::net::Request, std::String, std::Vec, Chapter, DeepLink, Filter, + Listing, Manga, MangaPageResult, Page, +}; + +use mangastream_template::template::MangaStreamSource; + +fn get_instance() -> MangaStreamSource { + MangaStreamSource { + use_manga_postids: true, + use_chapter_postids: true, + base_url: String::from("https://phenixscans.fr/"), + listing: ["Dernières", "Populaire", "Nouveau"], + manga_details_author: ".imptdt:contains(Auteur) i, .fmed b:contains(Auteur)+span", + traverse_pathname: "manga", + alt_pages: true, + ..Default::default() + } +} + +#[get_manga_list] +fn get_manga_list(filters: Vec, page: i32) -> Result { + get_instance().parse_manga_list(filters, page) +} + +#[get_manga_listing] +fn get_manga_listing(listing: Listing, page: i32) -> Result { + get_instance().parse_manga_listing(get_instance().base_url, listing.name, page) +} + +#[get_manga_details] +fn get_manga_details(id: String) -> Result { + get_instance().parse_manga_details(id) +} + +#[get_chapter_list] +fn get_chapter_list(id: String) -> Result> { + get_instance().parse_chapter_list(id) +} + +#[get_page_list] +fn get_page_list(_manga_id: String, id: String) -> Result> { + get_instance().parse_page_list(id) +} + +#[modify_image_request] +fn modify_image_request(request: Request) { + get_instance().modify_image_request(request) +} + +#[handle_url] +pub fn handle_url(url: String) -> Result { + get_instance().handle_url(url) +}