11import { CheerioAPI , load as parseHTML } from 'cheerio' ;
2- import { fetchApi } from '@/lib /fetch' ;
2+ import { fetchApi } from '@libs /fetch' ;
33import { Plugin } from '@/types/plugin' ;
4- import { Filters , FilterTypes } from '@/types/filters ' ;
5- import { defaultCover } from '@/types/constants ' ;
4+ import { Filters , FilterTypes } from '@libs/filterInputs ' ;
5+ import { defaultCover } from '@libs/defaultCover ' ;
66
77class dilartube implements Plugin . PluginBase {
88 id = 'dilartube' ;
@@ -80,8 +80,8 @@ class dilartube implements Plugin.PluginBase {
8080
8181 async parseNovel ( novelUrl : string ) : Promise < Plugin . SourceNovel > {
8282 const chapterItems : Plugin . ChapterItem [ ] = [ ] ;
83- let fullUrl = this . site + 'api/' + novelUrl ;
84- let chapterUrl = this . site + 'api/' + novelUrl + '/releases' ;
83+ const fullUrl = this . site + 'api/' + novelUrl ;
84+ const chapterUrl = this . site + 'api/' + novelUrl + '/releases' ;
8585 const manga = await fetchApi ( fullUrl ) . then ( r => r . json ( ) ) ;
8686 const chapters = await fetchApi ( chapterUrl ) . then ( r => r . json ( ) ) ;
8787 const mangaData = manga . mangaData ;
@@ -199,21 +199,21 @@ class dilartube implements Plugin.PluginBase {
199199
200200export default new dilartube ( ) ;
201201
202- interface Category {
202+ type Category = {
203203 id : number ;
204204 name : string ;
205205 icon : string | null ;
206206 manga_id : number ;
207- }
207+ } ;
208208
209- interface Type {
209+ type Type = {
210210 id : number ;
211211 name : string ;
212212 reading_direction : string ;
213213 title : string ;
214- }
214+ } ;
215215
216- interface Manga {
216+ type Manga = {
217217 id : number ;
218218 title : string ;
219219 summary : string ;
@@ -249,8 +249,8 @@ interface Manga {
249249 artists : any [ ] ;
250250 categories : Category [ ] ;
251251 type : Type ;
252- }
253- interface Release {
252+ } ;
253+ type Release = {
254254 id : number ;
255255 manga_id : number ;
256256 created_at : string ;
@@ -272,11 +272,11 @@ interface Release {
272272 team_paypal : string | null ;
273273 has_rev_link : boolean ;
274274 manga : Manga ;
275- }
276- interface ApiResponse {
275+ } ;
276+ type ApiResponse = {
277277 releases : Release [ ] ;
278278 data : searchManga [ ] ;
279- }
279+ } ;
280280type MangaCategory = {
281281 id : number ;
282282 name : string ;
@@ -384,7 +384,7 @@ type ChapterRelease = {
384384 team_name : string ;
385385 has_rev_link : boolean ;
386386} ;
387- interface searchManga {
387+ type searchManga = {
388388 filter : any ;
389389 id : number ;
390390 title : string ;
@@ -421,4 +421,4 @@ interface searchManga {
421421 artists : any [ ] ;
422422 categories : Category [ ] ;
423423 type : Type ;
424- }
424+ } ;
0 commit comments