migrate catalogs addon to esm structure

This commit is contained in:
TheBeastLT
2023-11-01 14:54:09 +02:00
parent 614c3f4643
commit 0fc5adda6b
10 changed files with 37 additions and 47 deletions

View File

@@ -1,12 +1,12 @@
const axios = require('axios');
const { Type } = require('../../addon/lib/types');
import axios from 'axios';
import { Type } from '../../addon/lib/types.js';
const CINEMETA_URL = 'https://v3-cinemeta.strem.io';
const KITSU_URL = 'https://anime-kitsu.strem.fun';
const TIMEOUT = 30000;
const MAX_SIZE = 40;
function getMetas(ids, type) {
export async function getMetas(ids, type) {
if (!ids.length || !type) {
return [];
}
@@ -39,5 +39,3 @@ function _sanitizeMeta(meta) {
delete meta.credits_crew;
return meta;
}
module.exports = { getMetas };