0
0
Fork 0
This repository has been archived on 2025-05-11. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
Heliotrope/heliotrope/interpreter/function.js
Ryu juheon a03b0f3c19
feat: apply hitomi changed (#171)
* fix(interpreter): remove statement (#168)

* refactor(table): hitomi changes applied

* refactor(domain): hitomi changes applied

* refactor(table): hitomi changes applied

* refactor(types): hitomi changes applied

* chore(vscode): add snippets

* refactor(orm): hitomi changes applied

* feat(odm): migration to mongodb (#169)

* feat(odm): migration to mongodb

* feat(config): add config for atlas search

* feat: apply changed

* chore(deps): add dependency

* test: apply changed

* test(config): apply changed

* chore(deps): bump up version motor

* feat!(parser): remove parser

* feat(interpreter): add get thumbnail method

* feat!(info): using galleryinfo

* feat(functions): add getthumbnail method

* feat!(hitomi): remove get info method

* fix(image): now return only webp or avif

* refactor(info): apply hitomi changed

* refactor(mirroring): apply hitomi changed

* fix(types): thumbnail is file

* test(common): edit dict

* style: apply code style

* feat(info): add from dict method

* style(info): fix type issue

* test(arg): fix test

* style(info): apply isort

* fix(domain): init false

* test(common): edit info

* test(conftest): edit image url

* test(mirroring): fix test

* fix(function): add base

* test(conftest): edit image url fixture

* test(conftest): fix conftest

* test(conftest): fix conftest
2022-02-03 19:41:56 +09:00

17 lines
No EOL
744 B
JavaScript

// If you continue to call the interpreter's function, it becomes very slow.
// Leave all the work to the interpreter.
// 계속해서 인터프리터의 함수를 호출을할경우 매우 느려집니다.
// 인터프리터에 모든작업을 맡깁니다.
function imageUrls(galleryid, images, no_webp) {
return images.map(function (image) {
var webp = null
if (image.hash && image.haswebp && !no_webp) {
webp = 'webp'
}
return { 'name': image.name, 'url': url_from_url_from_hash(galleryid, image, webp, undefined, "a") }
})
}
// See https://ltn.hitomi.la/gallery.js
function getThumbnail(galleryid, image) {
return url_from_url_from_hash(galleryid, image, 'webpbigtn', 'webp', 'tn')
}