Cache discover options
This commit is contained in:
parent
0969dbb794
commit
bfe28315a0
|
@ -69,10 +69,16 @@ async function sanitizeDiscoverParams(params) {
|
|||
}
|
||||
|
||||
async function getDiscoverOptions() {
|
||||
if (cache.discoverOptions !== undefined) {
|
||||
return cache.discoverOptions;
|
||||
}
|
||||
const url = utils.getSiteUrl();
|
||||
return fetch(url)
|
||||
.then( res => res.text() )
|
||||
.then( html => parser.parseDiscoverOptions(html) );
|
||||
.then( html => {
|
||||
cache.discoverOptions = parser.parseDiscoverOptions(html);
|
||||
return cache.discoverOptions;
|
||||
});
|
||||
}
|
||||
|
||||
async function getImageFormat(idOrName) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user