Compare commits
2 Commits
3e6592d1f3
...
25cac4d0ab
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
25cac4d0ab | ||
|
|
5a282cc372 |
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.249.0",
|
"version": "1.249.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.249.0",
|
"version": "1.249.1",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@aws-sdk/client-s3": "^3.458.0",
|
"@aws-sdk/client-s3": "^3.458.0",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.249.0",
|
"version": "1.249.1",
|
||||||
"description": "All the latest porn releases in one place",
|
"description": "All the latest porn releases in one place",
|
||||||
"main": "src/app.js",
|
"main": "src/app.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -334,13 +334,14 @@ async function fetchProfile({ name: actorName }, { channel }, options) {
|
|||||||
|
|
||||||
const t1 = channel.parameters?.t1 ? 't1/' : '';
|
const t1 = channel.parameters?.t1 ? 't1/' : '';
|
||||||
|
|
||||||
|
// follow redirects because a lot of profiles redirect from lowercase to uppercase or vice versa
|
||||||
const res1 = channel.parameters?.profile
|
const res1 = channel.parameters?.profile
|
||||||
? await qu.get(util.format(channel.parameters.profile, actorSlugA))
|
? await qu.get(util.format(channel.parameters.profile, actorSlugA))
|
||||||
: await qu.get(`${channel.url}/${t1}models/${actorSlugA}.html`, null, null, { followRedirects: false });
|
: await qu.get(`${channel.url}/${t1}models/${actorSlugA}.html`, null, null, { followRedirects: true });
|
||||||
|
|
||||||
const res = (res1.ok && res1)
|
const res = (res1.ok && res1)
|
||||||
|| (channel.parameters?.profile && await qu.get(util.format(channel.parameters.profile, actorSlugB)))
|
|| (channel.parameters?.profile && await qu.get(util.format(channel.parameters.profile, actorSlugB)))
|
||||||
|| await qu.get(`${channel.url}/${t1}models/${actorSlugB}.html`, null, null, { followRedirects: false });
|
|| await qu.get(`${channel.url}/${t1}models/${actorSlugB}.html`, null, null, { followRedirects: true });
|
||||||
|
|
||||||
if (!res.ok) {
|
if (!res.ok) {
|
||||||
return res.status;
|
return res.status;
|
||||||
|
|||||||
@@ -200,14 +200,15 @@ async function reassociateTagEntries(tagEntries, rematch) {
|
|||||||
})).filter((tagEntry) => tagEntry.tag_id);
|
})).filter((tagEntry) => tagEntry.tag_id);
|
||||||
|
|
||||||
if (updatedTagEntries.length > 0) {
|
if (updatedTagEntries.length > 0) {
|
||||||
|
// TODO: prevent wiping tags if insert fails
|
||||||
await knex('releases_tags')
|
await knex('releases_tags')
|
||||||
.whereIn('id', updatedTagEntries.map((tagEntry) => tagEntry.id))
|
.whereIn('id', updatedTagEntries.map((tagEntry) => tagEntry.id))
|
||||||
.delete();
|
.delete();
|
||||||
|
|
||||||
await knex('releases_tags').insert(updatedTagEntries.map((tagEntry) => ({
|
await bulkInsert('releases_tags', updatedTagEntries.map((tagEntry) => ({
|
||||||
...tagEntry,
|
...tagEntry,
|
||||||
id: undefined,
|
id: undefined,
|
||||||
})));
|
})), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.info(`Updated ${updatedTagEntries.length} tags in ${new Set(updatedTagEntries.map((tagEntry) => tagEntry.release_id)).size} scenes`);
|
logger.info(`Updated ${updatedTagEntries.length} tags in ${new Set(updatedTagEntries.map((tagEntry) => tagEntry.release_id)).size} scenes`);
|
||||||
|
|||||||
Reference in New Issue
Block a user