Skip to content

Commit

Permalink
Update NHentaiParser.ts (#57)
Browse files Browse the repository at this point in the history
added webp
  • Loading branch information
hammyo-o authored Nov 12, 2024
1 parent 8373607 commit d854003
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/NHentai/NHentaiParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function capitalizeTags(str: string) {
}).join(' ')
}

const typeMap: { [key: string]: string; } = { 'j': 'jpg', 'p': 'png', 'g': 'gif' }
const typeMap: { [key: string]: string; } = { 'j': 'jpg', 'p': 'png', 'g': 'gif', 'w': 'webp'}

const typeOfImage = (image: ImagePageObject): string => {
return typeMap[image.t] ?? ''
Expand All @@ -114,4 +114,4 @@ const getLanguage = (gallery: Gallery): string => {
}
}
return ''
}
}

0 comments on commit d854003

Please sign in to comment.