mirror of
https://github.com/venera-app/venera-configs.git
synced 2025-09-27 08:27:24 +00:00
fix nhentai
This commit is contained in:
@@ -33,7 +33,7 @@
|
|||||||
"name": "nhentai",
|
"name": "nhentai",
|
||||||
"fileName": "nhentai.js",
|
"fileName": "nhentai.js",
|
||||||
"key": "nhentai",
|
"key": "nhentai",
|
||||||
"version": "1.0.0"
|
"version": "1.0.1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "紳士漫畫",
|
"name": "紳士漫畫",
|
||||||
|
17
nhentai.js
17
nhentai.js
@@ -7,7 +7,7 @@ class Nhentai extends ComicSource {
|
|||||||
// unique id of the source
|
// unique id of the source
|
||||||
key = "nhentai"
|
key = "nhentai"
|
||||||
|
|
||||||
version = "1.0.0"
|
version = "1.0.1"
|
||||||
|
|
||||||
minAppVersion = "1.0.0"
|
minAppVersion = "1.0.0"
|
||||||
|
|
||||||
@@ -385,8 +385,19 @@ class Nhentai extends ComicSource {
|
|||||||
let mediaId = data.media_id
|
let mediaId = data.media_id
|
||||||
let images = []
|
let images = []
|
||||||
for (let image of data.images.pages) {
|
for (let image of data.images.pages) {
|
||||||
let ext = image.t === "j" ? "jpg" : (image.t === "p" ? "png" : "gif")
|
let ext = 'jpg'
|
||||||
images.push(`https://i7.nhentai.net/galleries/${mediaId}/${images.length + 1}.${ext}`)
|
switch(image.t) {
|
||||||
|
case 'p':
|
||||||
|
ext = 'png'
|
||||||
|
break
|
||||||
|
case 'g':
|
||||||
|
ext = 'gif'
|
||||||
|
break
|
||||||
|
case 'w':
|
||||||
|
ext = 'webp'
|
||||||
|
break
|
||||||
|
}
|
||||||
|
images.push(`https://i3.nhentai.net/galleries/${mediaId}/${images.length + 1}.${ext}`)
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
images: images,
|
images: images,
|
||||||
|
Reference in New Issue
Block a user