Added SFW tag photos.
This commit is contained in:
parent
a7e2a2e5c3
commit
4f3b152b17
|
|
@ -8385,8 +8385,8 @@ const sites = [
|
||||||
tags: ['bdsm', 'milf'],
|
tags: ['bdsm', 'milf'],
|
||||||
parent: 'mylf',
|
parent: 'mylf',
|
||||||
parameters: {
|
parameters: {
|
||||||
layout: 'organic',
|
layout: 'search',
|
||||||
endpoint: 'organic-mylfdom-ieH7cuos%20', // sic
|
fullEndpoint: 'mylf_dom',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -573,6 +573,20 @@ const sfw = Object.entries({
|
||||||
['A1v0-iH3T5A', 'Patrick Hendry'],
|
['A1v0-iH3T5A', 'Patrick Hendry'],
|
||||||
['iFBIdX54BOk', 'Keagan Henman'],
|
['iFBIdX54BOk', 'Keagan Henman'],
|
||||||
],
|
],
|
||||||
|
tags: [
|
||||||
|
['dp', 'Mr. Pugo'],
|
||||||
|
['anal', 'Andrew Teoh'],
|
||||||
|
['creampie', 'Sunil Lama'],
|
||||||
|
['lesbian', 'Kelsey Curtis'],
|
||||||
|
['facial', 'Jagoda Kondratiuk'],
|
||||||
|
['squirting', 'Camerauthor'],
|
||||||
|
['blowjob', 'Christine Tan'],
|
||||||
|
['blowbang', 'William Warby'],
|
||||||
|
['mfm', 'Seriously Low Carb'],
|
||||||
|
['mff', 'Deon Black'],
|
||||||
|
['gay', 'David Brooke Martin'],
|
||||||
|
['gangbang', 'Mohamed Hassouna'],
|
||||||
|
],
|
||||||
})
|
})
|
||||||
.map(([category, photos]) => photos.map(([photo, credit], index) => ({
|
.map(([category, photos]) => photos.map(([photo, credit], index) => ({
|
||||||
id: photo,
|
id: photo,
|
||||||
|
|
@ -1104,11 +1118,13 @@ exports.seed = (knex) => Promise.resolve()
|
||||||
|
|
||||||
const tagMediaWithDimensions = await Promise.map(tagMedia, async (media) => {
|
const tagMediaWithDimensions = await Promise.map(tagMedia, async (media) => {
|
||||||
const { width, height } = await sharp(path.join('public/img', media.path)).metadata(); // size not available from filepath
|
const { width, height } = await sharp(path.join('public/img', media.path)).metadata(); // size not available from filepath
|
||||||
|
const sfwMediaId = sfw.find((image) => image.id === media.tagSlug)?.id;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...media,
|
...media,
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
|
sfwMediaId,
|
||||||
};
|
};
|
||||||
}, {
|
}, {
|
||||||
concurrency: 20,
|
concurrency: 20,
|
||||||
|
|
@ -1124,6 +1140,7 @@ exports.seed = (knex) => Promise.resolve()
|
||||||
width: media.width,
|
width: media.width,
|
||||||
height: media.height,
|
height: media.height,
|
||||||
comment: media.comment,
|
comment: media.comment,
|
||||||
|
sfw_media_id: media.sfwMediaId,
|
||||||
entity_id: entitiesBySlug[media.entitySlug]?.id,
|
entity_id: entitiesBySlug[media.entitySlug]?.id,
|
||||||
})), 'path', knex);
|
})), 'path', knex);
|
||||||
|
|
||||||
|
|
@ -1148,8 +1165,6 @@ exports.seed = (knex) => Promise.resolve()
|
||||||
media_id: mediaIdsByPath[photo.path],
|
media_id: mediaIdsByPath[photo.path],
|
||||||
}));
|
}));
|
||||||
|
|
||||||
console.log(tagPosterEntries);
|
|
||||||
|
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
upsert('tags_posters', tagPosterEntries, 'tag_id', knex),
|
upsert('tags_posters', tagPosterEntries, 'tag_id', knex),
|
||||||
upsert('tags_photos', tagPhotoEntries, ['tag_id', 'media_id'], knex),
|
upsert('tags_photos', tagPhotoEntries, ['tag_id', 'media_id'], knex),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue