Compare commits

2 Commits
Author SHA1 Message Date
DebaucheryLibrarian a3a2de2e04 1.254.15 2026-07-09 00:34:18 +02:00
DebaucheryLibrarian 56b18618be Showing number of newly added creators in ManyVids seed. 2026-07-09 00:34:16 +02:00
3 changed files with 8 additions and 7 deletions
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "traxxx",
"version": "1.254.14",
"version": "1.254.15",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "traxxx",
"version": "1.254.14",
"version": "1.254.15",
"license": "ISC",
"dependencies": {
"@aws-sdk/client-s3": "^3.458.0",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "traxxx",
"version": "1.254.14",
"version": "1.254.15",
"description": "All the latest porn releases in one place",
"main": "src/app.js",
"scripts": {
+5 -4
View File
@@ -7,7 +7,7 @@ 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}`);
console.log(`Fetching ${acc.length}/${limit} creators by ${sorting}`);
// size seems to be capped at 70
const res = await unprint.get(`https://api.manyvids.com/search/creators/list?contentPref=1,2,3&sort=${sorting}&size=50&from=${(page - 1) * 50}`);
@@ -42,7 +42,7 @@ exports.seed = async function (knex) {
throw new Error('ManyVids found, did the network migration run?');
}
await knex('entities')
const result = await knex('entities')
.insert(channels.map((channel) => ({
name: channel.name,
slug: channel.slug,
@@ -51,7 +51,8 @@ exports.seed = async function (knex) {
has_logo: false,
})))
.onConflict(['slug', 'type'])
.merge(['name', 'url']);
.merge(['name', 'url'])
.returning(knex.raw('(xmax = 0) as inserted'));
console.log(`Done! ${channels.length} ManyVids creators added as channels`);
console.log(`Done! ${result.filter((row) => row.inserted).length}/${channels.length} ManyVids creators newly added as channels`);
};