Added SFW tag photos.
This commit is contained in:
@@ -573,6 +573,20 @@ const sfw = Object.entries({
|
||||
['A1v0-iH3T5A', 'Patrick Hendry'],
|
||||
['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) => ({
|
||||
id: photo,
|
||||
@@ -1104,11 +1118,13 @@ exports.seed = (knex) => Promise.resolve()
|
||||
|
||||
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 sfwMediaId = sfw.find((image) => image.id === media.tagSlug)?.id;
|
||||
|
||||
return {
|
||||
...media,
|
||||
width,
|
||||
height,
|
||||
sfwMediaId,
|
||||
};
|
||||
}, {
|
||||
concurrency: 20,
|
||||
@@ -1124,6 +1140,7 @@ exports.seed = (knex) => Promise.resolve()
|
||||
width: media.width,
|
||||
height: media.height,
|
||||
comment: media.comment,
|
||||
sfw_media_id: media.sfwMediaId,
|
||||
entity_id: entitiesBySlug[media.entitySlug]?.id,
|
||||
})), 'path', knex);
|
||||
|
||||
@@ -1148,8 +1165,6 @@ exports.seed = (knex) => Promise.resolve()
|
||||
media_id: mediaIdsByPath[photo.path],
|
||||
}));
|
||||
|
||||
console.log(tagPosterEntries);
|
||||
|
||||
await Promise.all([
|
||||
upsert('tags_posters', tagPosterEntries, 'tag_id', knex),
|
||||
upsert('tags_photos', tagPhotoEntries, ['tag_id', 'media_id'], knex),
|
||||
|
||||
Reference in New Issue
Block a user