diff --git a/src/rust/multi.libgroup/template/src/parser.rs b/src/rust/multi.libgroup/template/src/parser.rs index 0e754ad14..7cfc71013 100644 --- a/src/rust/multi.libgroup/template/src/parser.rs +++ b/src/rust/multi.libgroup/template/src/parser.rs @@ -1,5 +1,5 @@ use aidoku::error::Result; -use aidoku::prelude::format; +use aidoku::prelude::{format, println}; use aidoku::std::defaults::defaults_get; use aidoku::std::String; use aidoku::{std::ObjectRef, Manga, MangaPageResult}; @@ -137,7 +137,28 @@ pub fn parse_manga_details( let nsfw = *is_nsfw; - let viewer = MangaViewer::Rtl; + println!( + "{:?}", + detail + .get("type") + .as_object()? + .get("id") + .as_int() + .unwrap_or_default() + ); + + let viewer = if detail + .get("type") + .as_object()? + .get("id") + .as_int() + .unwrap_or_default() + == 5 + { + MangaViewer::Scroll + } else { + MangaViewer::Rtl + }; Ok(Manga { id,