From a3ae82dcd3ab9223c8d3e339d4c101ae0013021f Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Thu, 9 Jul 2026 00:16:07 +0200 Subject: [PATCH] Added sorting env to ManyVids seed, changed default to followers instead of top. --- seeds/09_manyvids.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/seeds/09_manyvids.js b/seeds/09_manyvids.js index ac7a7acb..7a4aec15 100644 --- a/seeds/09_manyvids.js +++ b/seeds/09_manyvids.js @@ -4,12 +4,13 @@ const unprint = require('unprint'); const slugify = require('../src/utils/slugify'); const limit = Number(process.env.MV_LIMIT) || 1000; +const sorting = process.env.MV_SORT || 'followers'; // followers, top, mostActive, newest, trending async function fetchCreators(page = 1, acc = []) { console.log(`Fetching creators ${acc.length}/${limit}`); // size seems to be capped at 70 - const res = await unprint.get(`https://api.manyvids.com/search/creators/list?contentPref=1,2,3&sort=top&size=50&from=${(page - 1) * 50}`); + const res = await unprint.get(`https://api.manyvids.com/search/creators/list?contentPref=1,2,3&sort=${sorting}&size=50&from=${(page - 1) * 50}`); if (res.ok && res.data?.creators) { const creators = acc.concat(res.data.creators.map((creator) => ({