Creation automatique des dossiers tmdbintegral/* au premier run
This commit is contained in:
@@ -68,6 +68,8 @@ function removeOrphans(type, ids) {
|
||||
}
|
||||
|
||||
export async function syncType(type) {
|
||||
const baseDir = type === 'movie' ? JUSTWATCH_MOVIE_DIR : JUSTWATCH_TV_DIR;
|
||||
await mkdir(baseDir, { recursive: true });
|
||||
const ids = await readMasterIds(type);
|
||||
const limiter = new Limiter(DOWNLOAD_CONCURRENCY);
|
||||
const tasks = [];
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { createWriteStream } from 'node:fs';
|
||||
import { rename } from 'node:fs/promises';
|
||||
import { rename, mkdir } from 'node:fs/promises';
|
||||
import { pipeline } from 'node:stream/promises';
|
||||
import { createGunzip } from 'node:zlib';
|
||||
import { Readable } from 'node:stream';
|
||||
@@ -44,6 +44,7 @@ async function downloadExport(prefix, outName) {
|
||||
}
|
||||
|
||||
export async function syncExports() {
|
||||
await mkdir(TMDBINTEGRAL_DIR, { recursive: true });
|
||||
await downloadExport('movie_ids', 'movie.json');
|
||||
await downloadExport('tv_series_ids', 'tv.json');
|
||||
}
|
||||
|
||||
@@ -139,6 +139,8 @@ function removeOrphans(type, sortedIds) {
|
||||
}
|
||||
|
||||
export async function syncType(type) {
|
||||
const baseDir = type === 'movie' ? MOVIE_DIR : TV_DIR;
|
||||
await mkdir(baseDir, { recursive: true });
|
||||
const updates = await findChanges(type);
|
||||
const ids = await readMasterIds(type);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user