Skip to content

Commit

Permalink
fix(demonsect): update name and url (#766)
Browse files Browse the repository at this point in the history
* fix: update name and url

* fix: listing

* remove old demonsect source
  • Loading branch information
julioreigen authored Sep 28, 2024
1 parent 2a6f0fa commit 5eb2ce4
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 69 deletions.
Binary file removed src/rust/madara/sources/demonsect/res/Icon.png
Binary file not shown.
16 changes: 0 additions & 16 deletions src/rust/madara/sources/demonsect/res/settings.json

This file was deleted.

48 changes: 0 additions & 48 deletions src/rust/madara/sources/demonsect/src/lib.rs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ crate-type = ["cdylib"]

[dependencies]
aidoku = { git = "https://github.com/Aidoku/aidoku-rs/" }
madara_template = { path = "../../template" }
mangastream_template = { path = "../../template" }
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"info": {
"id": "pt-br.demonsect",
"lang": "pt-br",
"name": "Demon Sect",
"version": 2,
"url": "https://dsectcomics.org",
"nsfw": 2
"name": "Seita Celestial",
"version": 3,
"url": "https://seitacelestial.com",
"nsfw": 0
},
"listings": [
{
Expand Down
53 changes: 53 additions & 0 deletions src/rust/mangastream/sources/demonsect/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#![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://seitacelestial.com"),
traverse_pathname: "comics",
alt_pages: true,
..Default::default()
}
}

#[get_manga_list]
fn get_manga_list(filters: Vec<Filter>, page: i32) -> Result<MangaPageResult> {
get_instance().parse_manga_list(filters, page)
}

#[get_manga_listing]
fn get_manga_listing(listing: Listing, page: i32) -> Result<MangaPageResult> {
get_instance().parse_manga_listing(get_instance().base_url, listing.name, page)
}

#[get_manga_details]
fn get_manga_details(id: String) -> Result<Manga> {
get_instance().parse_manga_details(id)
}

#[get_chapter_list]
fn get_chapter_list(id: String) -> Result<Vec<Chapter>> {
get_instance().parse_chapter_list(id)
}

#[get_page_list]
fn get_page_list(_manga_id: String, id: String) -> Result<Vec<Page>> {
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<DeepLink> {
get_instance().handle_url(url)
}

0 comments on commit 5eb2ce4

Please sign in to comment.