2019-12-04 20:58:08 +00:00
const upsert = require ( '../src/utils/upsert' ) ;
2020-02-19 03:41:53 +00:00
const tagPosters = [
[ 'anal-creampie' , 0 , 'Gina Valentina and Jane Wilde in "A Very Special Anniversary" for Tushy' ] ,
[ 'ass-to-mouth' , 'poster' , 'Alysa Gap and Logan in "Anal Buffet 4" for Evil Angel' ] ,
2020-03-13 20:54:44 +00:00
[ 'bdsm' , 0 , 'Dani Daniels in "The Traning of Dani Daniels, Day 2" for The Training of O at Kink' ] ,
[ 'behind-the-scenes' , 0 , 'Janice Griffith in "Day With A Pornstar: Janice" for Brazzers' ] ,
2020-02-19 03:41:53 +00:00
[ 'da-tp' , 0 , 'Natasha Teen in LegalPorno SZ2164' ] ,
[ 'double-anal' , 5 , 'Riley Reid in "The Gangbang of Riley Reid" for Jules Jordan' ] ,
[ 'double-penetration' , 'poster' , 'Mia Malkova in "DP!" for HardX' ] ,
[ 'double-vaginal' , 'poster' , 'Riley Reid in "Pizza That Ass" for Reid My Lips' ] ,
[ 'dv-tp' , 'poster' , 'Juelz Ventura in "Gangbanged 5" for Elegant Angel' ] ,
[ 'oral-creampie' , 1 , 'Keisha Grey in Brazzers House' ] ,
[ 'triple-anal' , 'poster' , 'Kristy Black in SZ1986 for LegalPorno' ] ,
[ 'airtight' , 1 , 'Jynx Maze in "Pump My Ass Full of Cum 3" for Jules Jordan' ] ,
[ 'anal' , 'poster' , 'Jynx Maze in "Anal Buffet 6" for Evil Angel' ] ,
[ 'asian' , 'poster' , 'Vina Sky in "Young and Glamorous 10" for Jules Jordan' ] ,
[ 'blowjob' , 0 , 'Adriana Chechik in "The Dinner Party" for Real Wife Stories (Brazzers)' ] ,
[ 'blowbang' , 'poster' ] ,
[ 'bukkake' , 'poster' ] ,
[ 'caucasian' , 'poster' ] ,
[ 'creampie' , 'poster' ] ,
[ 'ebony' , 1 , 'Sarah Banks for Brazzers' ] ,
[ 'facial' , 'poster' ] ,
[ 'facefucking' , '1' , 'Carrie for Young Throats' ] ,
[ 'gangbang' , 'poster' , 'Kristen Scott in "Interracial Gangbang!" for Jules Jordan' ] ,
[ 'gaping' , 1 , 'Vina Sky in "Vina Sky Does Anal" for HardX' ] ,
[ 'interracial' , 'poster' ] ,
[ 'latina' , 'poster' ] ,
[ 'mff' , 'poster' ] ,
[ 'mfm' , 'poster' ] ,
[ 'orgy' , 'poster' ] ,
[ 'schoolgirl' , 1 , 'Eliza Ibarra for Brazzers' ] ,
[ 'swallowing' , 'poster' ] ,
[ 'tattoo' , 'poster' , 'Kali Roses in "Goes All In For Anal" for Hussie Pass' ] ,
[ 'trainbang' , 'poster' , 'Kali Roses in "Passing Me Around" for Blacked' ] ,
]
. map ( ( [ slug , filename , comment ] , index ) => ( {
2020-01-08 22:33:24 +00:00
tagSlug : slug ,
path : ` tags/ ${ slug } / ${ filename } .jpeg ` ,
thumbnail : ` tags/ ${ slug } / ${ filename } _thumb.jpeg ` ,
2019-12-19 01:35:07 +00:00
mime : 'image/jpeg' ,
index ,
2020-01-08 22:33:24 +00:00
comment ,
2019-12-19 01:35:07 +00:00
} ) ) ;
const tagPhotos = [
2020-01-08 22:33:24 +00:00
[ 'airtight' , 2 , 'Dakota Skye in "Dakota Goes Nuts" for ArchAngel' ] ,
[ 'airtight' , 3 , 'Anita Bellini in "Triple Dick Gangbang" for Hands On Hardcore (DDF Network)' ] ,
[ 'anal' , 0 ] ,
[ 'da-tp' , 1 , 'Francys Belle in SZ1702 for LegalPorno' ] ,
[ 'da-tp' , 2 , 'Angel Smalls in GIO408 for LegalPorno' ] ,
[ 'da-tp' , 3 , 'Evelina Darling in GIO294' ] ,
[ 'da-tp' , 4 , 'Ninel Mojado aka Mira Cuckold in GIO063 for LegalPorno' ] ,
2020-02-02 04:14:58 +00:00
[ 'double-anal' , 2 , 'Lana Rhoades in "Gangbang Me 3" for HardX' ] ,
2020-01-23 02:52:12 +00:00
[ 'double-anal' , 'poster' , 'Haley Reed in "Young Hot Ass" for Evil Angel' ] ,
2020-01-08 22:33:24 +00:00
[ 'double-anal' , 0 , 'Nicole Black doing double anal during a gangbang in GIO971 for LegalPorno' ] ,
[ 'double-anal' , 1 , 'Ria Sunn in SZ1801 for LegalPorno' ] ,
[ 'double-penetration' , 0 ] ,
2020-02-02 04:14:58 +00:00
[ 'double-vaginal' , 0 , 'Aaliyah Hadid in "Squirting From Double Penetration With Anal" for Bang Bros' ] ,
2020-01-08 22:33:24 +00:00
[ 'dv-tp' , 1 , 'Adriana Chechik in "Adriana\'s Triple Anal Penetration!"' ] ,
[ 'dv-tp' , 0 , 'Luna Rival in LegalPorno SZ1490' ] ,
2020-01-29 01:24:19 +00:00
[ 'facefucking' , '0' , 'Brea for Young Throats' ] ,
2020-01-08 22:33:24 +00:00
[ 'gangbang' , 0 , '"4 On 1 Gangbangs" for Doghouse Digital' ] ,
[ 'gangbang' , 1 , 'Ginger Lynn in "Gangbang Mystique", a photoset shot by Suze Randall for Puritan No. 10, 1984. This photo pushed the boundaries of pornography at the time, as depicting a woman \'fully occupied\' was unheard of.' ] ,
[ 'gangbang' , 2 , 'Riley Reid\'s double anal in "The Gangbang of Riley Reid" for Jules Jordan' ] ,
2020-01-29 01:24:19 +00:00
[ 'gaping' , 'poster' , 'Paulina in "Anal Buffet 4" for Evil Angel' ] ,
2020-02-19 03:41:53 +00:00
[ 'gaping' , 0 , 'McKenzee Miles in "Anal Buffet 4" for Evil Angel' ] ,
2020-01-08 22:33:24 +00:00
[ 'trainbang' , 0 , 'Nicole Black in GIO971 for LegalPorno' ] ,
[ 'triple-anal' , 1 , 'Natasha Teen in SZ2098 for LegalPorno' ] ,
[ 'triple-anal' , 2 , 'Kira Thorn in GIO1018 for LegalPorno' ] ,
2020-01-23 02:52:12 +00:00
[ 'oral-creampie' , 'poster' , 'Khloe Kapri' ] ,
2019-12-19 01:35:07 +00:00
]
2020-01-08 22:33:24 +00:00
. map ( ( [ slug , fileIndex , comment ] , index ) => ( {
tagSlug : slug ,
path : ` tags/ ${ slug } / ${ fileIndex } .jpeg ` ,
thumbnail : ` tags/ ${ slug } / ${ fileIndex } _thumb.jpeg ` ,
2019-12-19 01:35:07 +00:00
mime : 'image/jpeg' ,
index ,
2020-01-08 22:33:24 +00:00
comment ,
2019-12-19 01:35:07 +00:00
} ) ) ;
2019-12-04 20:58:08 +00:00
/* eslint-disable max-len */
exports . seed = knex => Promise . resolve ( )
. then ( async ( ) => {
2019-12-19 01:35:07 +00:00
const tagMedia = tagPosters . concat ( tagPhotos ) ;
const tags = await knex ( 'tags' ) . whereIn ( 'slug' , tagMedia . map ( item => item . tagSlug ) ) ;
const { inserted , updated } = await upsert ( 'media' , tagMedia . map ( ( {
path , thumbnail , mime , index , comment ,
} ) => ( {
path , thumbnail , mime , index , comment ,
} ) ) , 'path' , knex ) ;
2019-12-04 20:58:08 +00:00
2019-12-19 01:35:07 +00:00
const tagIdsBySlug = tags . reduce ( ( acc , tag ) => ( { ... acc , [ tag . slug ] : tag . id } ) , { } ) ;
const mediaIdsByPath = inserted . concat ( updated ) . reduce ( ( acc , item ) => ( { ... acc , [ item . path ] : item . id } ) , { } ) ;
2019-12-04 20:58:08 +00:00
2019-12-19 01:35:07 +00:00
const tagPosterEntries = tagPosters . map ( poster => ( {
tag _id : tagIdsBySlug [ poster . tagSlug ] ,
media _id : mediaIdsByPath [ poster . path ] ,
} ) ) ;
const tagPhotoEntries = tagPhotos . map ( photo => ( {
tag _id : tagIdsBySlug [ photo . tagSlug ] ,
media _id : mediaIdsByPath [ photo . path ] ,
} ) ) ;
2019-12-04 20:58:08 +00:00
2019-12-19 01:35:07 +00:00
return Promise . all ( [
upsert ( 'tags_posters' , tagPosterEntries , 'tag_id' , knex ) ,
2020-01-06 04:19:38 +00:00
upsert ( 'tags_photos' , tagPhotoEntries , [ 'tag_id' , 'media_id' ] , knex ) ,
2019-12-19 01:35:07 +00:00
] ) ;
2019-12-04 20:58:08 +00:00
} ) ;