Simplified tag media seed file. Renamed tags. Media refactor experiment.

This commit is contained in:
ThePendulum 2020-01-08 23:33:24 +01:00
parent 4c28c8b640
commit 863df38b29
28 changed files with 342 additions and 313 deletions

View File

@ -133,8 +133,6 @@ export default {
.poster { .poster {
width: 100%; width: 100%;
height: 15rem;
object-fit: cover;
} }
.title { .title {

View File

@ -74,6 +74,7 @@ async function mounted() {
'asian', 'asian',
'ass-eating', 'ass-eating',
'ass-to-mouth', 'ass-to-mouth',
'bdsm',
'blowbang', 'blowbang',
'blowjob', 'blowjob',
'bukkake', 'bukkake',
@ -87,10 +88,10 @@ async function mounted() {
'double-vaginal', 'double-vaginal',
'dv-tp', 'dv-tp',
'ebony', 'ebony',
'facefuck', 'facefucking',
'facial', 'facial',
'gangbang', 'gangbang',
'gapes', 'gaping',
'interracial', 'interracial',
'latina', 'latina',
'mff', 'mff',

160
package-lock.json generated
View File

@ -2225,6 +2225,21 @@
"integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==",
"dev": true "dev": true
}, },
"async": {
"version": "2.6.3",
"resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz",
"integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==",
"requires": {
"lodash": "^4.17.14"
},
"dependencies": {
"lodash": {
"version": "4.17.15",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
}
}
},
"async-each": { "async-each": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz",
@ -3272,11 +3287,36 @@
"resolved": "https://registry.npmjs.org/colorette/-/colorette-1.0.7.tgz", "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.0.7.tgz",
"integrity": "sha512-KeK4klsvAgdODAjFPm6QLzvStizJqlxMBtVo4KQMCgk5tt/tf9rAzxmxLHNRynJg3tJjkKGKbHx3j4HLox27Lw==" "integrity": "sha512-KeK4klsvAgdODAjFPm6QLzvStizJqlxMBtVo4KQMCgk5tt/tf9rAzxmxLHNRynJg3tJjkKGKbHx3j4HLox27Lw=="
}, },
"colornames": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/colornames/-/colornames-1.1.1.tgz",
"integrity": "sha1-+IiQMGhcfE/54qVZ9Qd+t2qBb5Y="
},
"colors": { "colors": {
"version": "1.4.0", "version": "1.4.0",
"resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz",
"integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==" "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA=="
}, },
"colorspace": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.2.tgz",
"integrity": "sha512-vt+OoIP2d76xLhjwbBaucYlNSpPsrJWPlBTtwCpQKIu6/CSMutyzX93O/Do0qzpH3YoHEes8YEFXyZ797rEhzQ==",
"requires": {
"color": "3.0.x",
"text-hex": "1.0.x"
},
"dependencies": {
"color": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/color/-/color-3.0.0.tgz",
"integrity": "sha512-jCpd5+s0s0t7p3pHQKpnJ0TpQKKdleP71LWcA0aqiljpiuAkOSUFN/dyH8ZwF0hRmFlrIuRhufds1QyEP9EB+w==",
"requires": {
"color-convert": "^1.9.1",
"color-string": "^1.5.2"
}
}
}
},
"combined-stream": { "combined-stream": {
"version": "1.0.8", "version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
@ -3850,6 +3890,16 @@
"resolved": "https://registry.npmjs.org/dev-null/-/dev-null-0.1.1.tgz", "resolved": "https://registry.npmjs.org/dev-null/-/dev-null-0.1.1.tgz",
"integrity": "sha1-WiBc48Ky73e2I41roXnrdMag6Bg=" "integrity": "sha1-WiBc48Ky73e2I41roXnrdMag6Bg="
}, },
"diagnostics": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/diagnostics/-/diagnostics-1.1.1.tgz",
"integrity": "sha512-8wn1PmdunLJ9Tqbx+Fx/ZEuHfJf4NKSN2ZBj7SJC/OWRWha843+WsTjqMe1B5E3p28jqBlp+mJ2fPVxPyNgYKQ==",
"requires": {
"colorspace": "1.1.x",
"enabled": "1.0.x",
"kuler": "1.0.x"
}
},
"diffie-hellman": { "diffie-hellman": {
"version": "5.0.3", "version": "5.0.3",
"resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
@ -3991,6 +4041,14 @@
"integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=",
"dev": true "dev": true
}, },
"enabled": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/enabled/-/enabled-1.0.2.tgz",
"integrity": "sha1-ll9lE9LC0cX0ZStkouM5ZGf8L5M=",
"requires": {
"env-variable": "0.0.x"
}
},
"encodeurl": { "encodeurl": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
@ -4032,6 +4090,11 @@
"resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz",
"integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==" "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w=="
}, },
"env-variable": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/env-variable/-/env-variable-0.0.5.tgz",
"integrity": "sha512-zoB603vQReOFvTg5xMl9I1P2PnHsHQQKTEowsKKD7nseUfJq6UWzK+4YtlWUO1nhiQUxe6XMkk+JleSZD1NZFA=="
},
"errno": { "errno": {
"version": "0.1.7", "version": "0.1.7",
"resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz",
@ -4778,6 +4841,16 @@
"resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
"integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc="
}, },
"fast-safe-stringify": {
"version": "2.0.7",
"resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz",
"integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA=="
},
"fecha": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/fecha/-/fecha-2.3.3.tgz",
"integrity": "sha512-lUGBnIamTAwk4znq5BcqsDaxSmZ9nDVJaij6NvRt/Tg4R69gERA+otPKbS86ROw9nxVMw2/mp1fnaiWqbs6Sdg=="
},
"figgy-pudding": { "figgy-pudding": {
"version": "3.5.1", "version": "3.5.1",
"resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.1.tgz", "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.1.tgz",
@ -6692,8 +6765,7 @@
"is-stream": { "is-stream": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
"integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ="
"dev": true
}, },
"is-symbol": { "is-symbol": {
"version": "1.0.3", "version": "1.0.3",
@ -7061,6 +7133,14 @@
} }
} }
}, },
"kuler": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/kuler/-/kuler-1.0.1.tgz",
"integrity": "sha512-J9nVUucG1p/skKul6DU3PUZrhs0LPulNaeUOox0IyXDi8S4CztTHs1gQphhuZmzXG7VOQSf6NJfKuzteQLv9gQ==",
"requires": {
"colornames": "^1.1.1"
}
},
"lcid": { "lcid": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz",
@ -7243,6 +7323,25 @@
"resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz",
"integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=" "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg="
}, },
"logform": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/logform/-/logform-2.1.2.tgz",
"integrity": "sha512-+lZh4OpERDBLqjiwDLpAWNQu6KMjnlXH2ByZwCuSqVPJletw0kTWJf5CgSNAUKn1KUkv3m2cUz/LK8zyEy7wzQ==",
"requires": {
"colors": "^1.2.1",
"fast-safe-stringify": "^2.0.4",
"fecha": "^2.3.3",
"ms": "^2.1.1",
"triple-beam": "^1.3.0"
},
"dependencies": {
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
}
}
},
"loose-envify": { "loose-envify": {
"version": "1.4.0", "version": "1.4.0",
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
@ -8346,6 +8445,11 @@
"wrappy": "1" "wrappy": "1"
} }
}, },
"one-time": {
"version": "0.0.4",
"resolved": "https://registry.npmjs.org/one-time/-/one-time-0.0.4.tgz",
"integrity": "sha1-+M33eISCb+Tf+T46nMN7HkSAdC4="
},
"onetime": { "onetime": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz",
@ -10695,6 +10799,11 @@
"figgy-pudding": "^3.5.1" "figgy-pudding": "^3.5.1"
} }
}, },
"stack-trace": {
"version": "0.0.10",
"resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz",
"integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA="
},
"static-extend": { "static-extend": {
"version": "0.1.2", "version": "0.1.2",
"resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz",
@ -11096,6 +11205,11 @@
} }
} }
}, },
"text-hex": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz",
"integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg=="
},
"text-table": { "text-table": {
"version": "0.2.0", "version": "0.2.0",
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
@ -11277,6 +11391,11 @@
"integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=",
"dev": true "dev": true
}, },
"triple-beam": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.3.0.tgz",
"integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw=="
},
"true-case-path": { "true-case-path": {
"version": "1.0.3", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.3.tgz", "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.3.tgz",
@ -12127,6 +12246,43 @@
"string-width": "^1.0.2 || 2" "string-width": "^1.0.2 || 2"
} }
}, },
"winston": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/winston/-/winston-3.2.1.tgz",
"integrity": "sha512-zU6vgnS9dAWCEKg/QYigd6cgMVVNwyTzKs81XZtTFuRwJOcDdBg7AU0mXVyNbs7O5RH2zdv+BdNZUlx7mXPuOw==",
"requires": {
"async": "^2.6.1",
"diagnostics": "^1.1.1",
"is-stream": "^1.1.0",
"logform": "^2.1.1",
"one-time": "0.0.4",
"readable-stream": "^3.1.1",
"stack-trace": "0.0.x",
"triple-beam": "^1.3.0",
"winston-transport": "^4.3.0"
},
"dependencies": {
"readable-stream": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz",
"integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==",
"requires": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
"util-deprecate": "^1.0.1"
}
}
}
},
"winston-transport": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.3.0.tgz",
"integrity": "sha512-B2wPuwUi3vhzn/51Uukcao4dIduEiPOcOt9HJ3QeaXgkJ5Z7UwpBzxS4ZGNHtrxrUvTwemsQiSys0ihOf8Mp1A==",
"requires": {
"readable-stream": "^2.3.6",
"triple-beam": "^1.2.0"
}
},
"wordwrap": { "wordwrap": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",

View File

@ -108,6 +108,7 @@
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-router": "^3.1.3", "vue-router": "^3.1.3",
"vuex": "^3.1.2", "vuex": "^3.1.2",
"winston": "^3.2.1",
"yargs": "^13.3.0" "yargs": "^13.3.0"
} }
} }

View File

@ -1199,9 +1199,6 @@
} }
.poster[data-v-7f130e7f] { .poster[data-v-7f130e7f] {
width: 100%; width: 100%;
height: 15rem;
-o-object-fit: cover;
object-fit: cover;
} }
.title[data-v-7f130e7f] { .title[data-v-7f130e7f] {
padding: 0; padding: 0;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

After

Width:  |  Height:  |  Size: 845 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 110 KiB

View File

Before

Width:  |  Height:  |  Size: 111 KiB

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 845 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 380 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

View File

Before

Width:  |  Height:  |  Size: 446 KiB

After

Width:  |  Height:  |  Size: 446 KiB

View File

Before

Width:  |  Height:  |  Size: 97 KiB

After

Width:  |  Height:  |  Size: 97 KiB

View File

Before

Width:  |  Height:  |  Size: 402 KiB

After

Width:  |  Height:  |  Size: 402 KiB

View File

Before

Width:  |  Height:  |  Size: 93 KiB

After

Width:  |  Height:  |  Size: 93 KiB

View File

@ -386,8 +386,8 @@ function getTags(groupsMap) {
alias_for: null, alias_for: null,
}, },
{ {
name: 'facefuck', name: 'facefucking',
slug: 'facefuck', slug: 'facefucking',
priority: 9, priority: 9,
alias_for: null, alias_for: null,
group_id: groupsMap.oral, group_id: groupsMap.oral,
@ -460,8 +460,8 @@ function getTags(groupsMap) {
group_id: groupsMap.group, group_id: groupsMap.group,
}, },
{ {
name: 'gapes', name: 'gaping',
slug: 'gapes', slug: 'gaping',
alias_for: null, alias_for: null,
}, },
{ {
@ -916,7 +916,7 @@ function getTagAliases(tagsMap) {
}, },
{ {
name: 'anal gape', name: 'anal gape',
alias_for: tagsMap.gapes, alias_for: tagsMap.gaping,
}, },
{ {
name: 'anilingus', name: 'anilingus',
@ -1247,16 +1247,16 @@ function getTagAliases(tagsMap) {
alias_for: tagsMap['enhanced-boobs'], alias_for: tagsMap['enhanced-boobs'],
}, },
{ {
name: 'facefucking', name: 'facefuck',
alias_for: tagsMap.facefuck, alias_for: tagsMap.facefucking,
}, },
{ {
name: 'face fuck', name: 'face fuck',
alias_for: tagsMap.facefuck, alias_for: tagsMap.facefucking,
}, },
{ {
name: 'face fucking', name: 'face fucking',
alias_for: tagsMap.facefuck, alias_for: tagsMap.facefucking,
}, },
{ {
name: 'face sitting', name: 'face sitting',
@ -1296,15 +1296,15 @@ function getTagAliases(tagsMap) {
}, },
{ {
name: 'gape', name: 'gape',
alias_for: tagsMap.gapes, alias_for: tagsMap.gaping,
}, },
{ {
name: 'gaping', name: 'gapes',
alias_for: tagsMap.gapes, alias_for: tagsMap.gaping,
}, },
{ {
name: 'gapes (gaping asshole)', name: 'gapes (gaping asshole)',
alias_for: tagsMap.gapes, alias_for: tagsMap.gaping,
}, },
{ {
name: 'group sex', name: 'group sex',

View File

@ -1,267 +1,73 @@
const upsert = require('../src/utils/upsert'); const upsert = require('../src/utils/upsert');
const tagPosters = [ const tagPosters = Object.entries({
{ 'anal-creampie': ['poster'],
path: 'tags/airtight/poster.jpeg', 'ass-to-mouth': ['poster', 'Alysa Gap and Logan in "Anal Buffet 4" for Evil Angel'],
tagSlug: 'airtight', 'da-tp': [0, 'Natasha Teen in LegalPorno SZ2164'],
comment: 'Jynx Maze in "Pump My Ass Full of Cum 3" for Jules Jordan', 'double-anal': ['poster', 'Haley Reed in "Young Hot Ass" for Evil Angel'],
}, 'double-penetration': ['poster', 'Mia Malkova in "DP!" for HardX'],
{ 'double-vaginal': ['poster'],
path: 'tags/anal/poster.jpeg', 'dv-tp': ['poster', 'Juelz Ventura in "Gangbanged 5" for Elegant Angel'],
tagSlug: 'anal', 'oral-creampie': ['poster'],
comment: 'Jynx Maze in "Anal Buffet 6" for Evil Angel', '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'],
path: 'tags/ass-to-mouth/poster.jpeg', asian: ['poster', 'Vina Sky in "Young and Glamorous 10" for Jules Jordan'],
tagSlug: 'ass-to-mouth', blowbang: ['poster'],
comment: 'Alysa Gap and Logan in "Anal Buffet 4" for Evil Angel', bukkake: ['poster'],
}, caucasian: ['poster'],
{ creampie: ['poster'],
path: 'tags/gapes/poster.jpeg', ebony: [1, 'Sarah Banks for Brazzers'],
tagSlug: 'gapes', facial: ['poster'],
comment: 'Paulina in "Anal Buffet 4" for Evil Angel', gangbang: ['poster', 'Kristen Scott in "Interracial Gangbang!" for Jules Jordan'],
}, gaping: ['poster', 'Paulina in "Anal Buffet 4" for Evil Angel'],
{ interracial: ['poster'],
path: 'tags/da-tp/0.jpeg', latina: ['poster'],
tagSlug: 'da-tp', mff: ['poster'],
comment: 'Natasha Teen in LegalPorno SZ2164', mfm: ['poster'],
}, orgy: ['poster'],
{ swallowing: ['poster'],
path: 'tags/double-penetration/poster.jpeg', tattoo: ['poster', 'Kali Roses in "Goes All In For Anal" for Hussie Pass'],
tagSlug: 'double-penetration', trainbang: ['poster', 'Kali Roses in "Passing Me Around" for Blacked'],
comment: 'Mia Malkova in "DP!" for HardX', })
}, .map(([slug, [filename, comment]], index) => ({
{ tagSlug: slug,
path: 'tags/double-anal/poster.jpeg', path: `tags/${slug}/${filename}.jpeg`,
tagSlug: 'double-anal', thumbnail: `tags/${slug}/${filename}_thumb.jpeg`,
comment: 'Haley Reed in "Young Hot Ass" for Evil Angel',
},
{
path: 'tags/double-vaginal/poster.jpeg',
tagSlug: 'double-vaginal',
comment: '',
},
{
path: 'tags/dv-tp/poster.jpeg',
tagSlug: 'dv-tp',
comment: 'Juelz Ventura in "Gangbanged 5" for Elegant Angel',
},
{
path: 'tags/tattoo/poster.jpeg',
tagSlug: 'tattoo',
comment: 'Kali Roses in "Goes All In For Anal" for Hussie Pass',
},
{
path: 'tags/triple-anal/poster.jpeg',
tagSlug: 'triple-anal',
comment: 'Kristy Black in SZ1986 for LegalPorno',
},
{
path: 'tags/blowbang/poster.jpeg',
tagSlug: 'blowbang',
comment: '',
},
{
path: 'tags/gangbang/poster.jpeg',
tagSlug: 'gangbang',
comment: 'Kristen Scott in "Interracial Gangbang!" for Jules Jordan',
},
{
path: 'tags/mff/poster.jpeg',
tagSlug: 'mff',
comment: '',
},
{
path: 'tags/mfm/poster.jpeg',
tagSlug: 'mfm',
comment: '',
},
{
path: 'tags/orgy/poster.jpeg',
tagSlug: 'orgy',
comment: '',
},
{
path: 'tags/asian/poster.jpeg',
tagSlug: 'asian',
comment: 'Vina Sky in "Young and Glamorous 10" for Jules Jordan',
},
{
path: 'tags/caucasian/poster.jpeg',
tagSlug: 'caucasian',
comment: '',
},
{
path: 'tags/ebony/poster.jpeg',
tagSlug: 'ebony',
comment: '',
},
{
path: 'tags/latina/poster.jpeg',
tagSlug: 'latina',
comment: '',
},
{
path: 'tags/interracial/poster.jpeg',
tagSlug: 'interracial',
comment: '',
},
{
path: 'tags/facial/poster.jpeg',
tagSlug: 'facial',
comment: '',
},
{
path: 'tags/trainbang/poster.jpeg',
tagSlug: 'trainbang',
comment: 'Kali Roses in "Passing Me Around" for Blacked',
},
{
path: 'tags/bukkake/poster.jpeg',
tagSlug: 'bukkake',
comment: '',
},
{
path: 'tags/swallowing/poster.jpeg',
tagSlug: 'swallowing',
comment: '',
},
{
path: 'tags/creampie/poster.jpeg',
tagSlug: 'creampie',
comment: '',
},
{
path: 'tags/anal-creampie/poster.jpeg',
tagSlug: 'anal-creampie',
comment: '',
},
{
path: 'tags/oral-creampie/poster.jpeg',
tagSlug: 'oral-creampie',
comment: '',
},
]
.map((file, index) => ({
...file,
thumbnail: file.thumbnail || file.path.replace('.jpeg', '_thumb.jpeg'),
mime: 'image/jpeg', mime: 'image/jpeg',
index, index,
comment,
})); }));
const tagPhotos = [ const tagPhotos = [
{ ['airtight', 2, 'Dakota Skye in "Dakota Goes Nuts" for ArchAngel'],
path: 'tags/airtight/3.jpeg', ['airtight', 3, 'Anita Bellini in "Triple Dick Gangbang" for Hands On Hardcore (DDF Network)'],
tagSlug: 'airtight', ['anal', 0],
comment: 'Anita Bellini in "Triple Dick Gangbang" for Hands On Hardcore (DDF Network)', ['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'],
path: 'tags/airtight/2.jpeg', ['da-tp', 4, 'Ninel Mojado aka Mira Cuckold in GIO063 for LegalPorno'],
tagSlug: 'airtight', ['double-anal', 0, 'Nicole Black doing double anal during a gangbang in GIO971 for LegalPorno'],
comment: 'Dakota Skye in "Dakota Goes Nuts" for ArchAngel', ['double-anal', 1, 'Ria Sunn in SZ1801 for LegalPorno'],
}, ['double-penetration', 0],
{ ['dv-tp', 1, 'Adriana Chechik in "Adriana\'s Triple Anal Penetration!"'],
path: 'tags/airtight/1.jpeg', ['dv-tp', 0, 'Luna Rival in LegalPorno SZ1490'],
tagSlug: 'airtight', ['gangbang', 0, '"4 On 1 Gangbangs" for Doghouse Digital'],
comment: 'Chloe Amour in "DP Masters 4" for Jules Jordan', ['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'],
{ ['gaping', 3, 'Kelsi Monroe in "Brazzers House 2, Day 2" for Brazzers'],
path: 'tags/airtight/0.jpeg', ['gaping', 0, 'McKenzee Miles in "Anal Buffet 4" for Evil Angel'],
domain: 'tags', ['trainbang', 0, 'Nicole Black in GIO971 for LegalPorno'],
tagSlug: 'airtight', ['triple-anal', 1, 'Natasha Teen in SZ2098 for LegalPorno'],
comment: 'Sheena Shaw in "Ass Worship 14" for Jules Jordan', ['triple-anal', 2, 'Kira Thorn in GIO1018 for LegalPorno'],
},
{
path: 'tags/anal/0.jpeg',
tagSlug: 'anal',
comment: '',
},
{
path: 'tags/double-anal/1.jpeg',
tagSlug: 'double-anal',
comment: 'Ria Sunn in SZ1801 for LegalPorno',
},
{
path: 'tags/double-anal/0.jpeg',
tagSlug: 'double-anal',
comment: 'Nicole Black doing double anal during a gangbang in GIO971 for LegalPorno',
},
{
path: 'tags/da-tp/3.jpeg',
tagSlug: 'da-tp',
comment: 'Evelina Darling in GIO294',
},
{
path: 'tags/da-tp/1.jpeg',
tagSlug: 'da-tp',
comment: 'Francys Belle in SZ1702 for LegalPorno',
},
{
path: 'tags/da-tp/2.jpeg',
tagSlug: 'da-tp',
comment: 'Angel Smalls in GIO408 for LegalPorno',
},
{
path: 'tags/da-tp/4.jpeg',
tagSlug: 'da-tp',
comment: 'Ninel Mojado aka Mira Cuckold in GIO063 for LegalPorno',
},
{
path: 'tags/dv-tp/0.jpeg',
tagSlug: 'dv-tp',
comment: 'Luna Rival in LegalPorno SZ1490',
},
{
path: 'tags/double-penetration/0.jpeg',
tagSlug: 'double-penetration',
comment: '',
},
{
path: 'tags/gapes/0.jpeg',
tagSlug: 'gapes',
comment: 'McKenzee Miles in "Anal Buffet 4" for Evil Angel',
},
{
path: 'tags/trainbang/0.jpeg',
tagSlug: 'trainbang',
comment: 'Nicole Black in GIO971 for LegalPorno',
},
{
path: 'tags/triple-anal/1.jpeg',
tagSlug: 'triple-anal',
comment: 'Natasha Teen in SZ2098 for LegalPorno',
},
{
path: 'tags/triple-anal/2.jpeg',
tagSlug: 'triple-anal',
comment: 'Kira Thorn in GIO1018 for LegalPorno',
},
{
path: 'tags/gangbang/1.jpeg',
tagSlug: 'gangbang',
comment: '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.',
},
{
path: 'tags/gangbang/0.jpeg',
tagSlug: 'gangbang',
comment: '"4 On 1 Gangbangs" for Doghouse Digital',
},
{
path: 'tags/gangbang/2.jpeg',
tagSlug: 'gangbang',
comment: 'Riley Reid\'s double anal in "The Gangbang of Riley Reid" for Jules Jordan',
},
{
path: 'tags/gangbang/3.jpeg',
tagSlug: 'gangbang',
comment: 'Kelsi Monroe in "Brazzers House 2, Day 2" for Brazzers',
},
] ]
.map((file, index) => ({ .map(([slug, fileIndex, comment], index) => ({
...file, tagSlug: slug,
thumbnail: file.thumbnail || file.path.replace('.jpeg', '_thumb.jpeg'), path: `tags/${slug}/${fileIndex}.jpeg`,
thumbnail: `tags/${slug}/${fileIndex}_thumb.jpeg`,
mime: 'image/jpeg', mime: 'image/jpeg',
index, index,
comment,
})); }));
/* eslint-disable max-len */ /* eslint-disable max-len */

View File

@ -70,6 +70,11 @@ const { argv } = yargs
type: 'boolean', type: 'boolean',
default: true, default: true,
}) })
.option('level', {
describe: 'Log level',
type: 'string',
default: process.env.NODE_ENV === 'development' ? 'silly' : 'info',
})
.option('debug', { .option('debug', {
describe: 'Show error stack traces', describe: 'Show error stack traces',
type: 'boolean', type: 'boolean',

25
src/logger.js Normal file
View File

@ -0,0 +1,25 @@
'use strict';
const util = require('util');
const winston = require('winston');
const args = require('./argv');
const logger = winston.createLogger({
format: winston.format.combine(
winston.format.timestamp(),
winston.format.printf(info => `${info.timestamp} ${info.level}: ${util.inspect(info.message)}`),
),
transports: [
new winston.transports.Console({
level: args.level,
format: winston.format.combine(
winston.format.timestamp({ format: 'YYYY-MM-DD HH:mm:ss' }),
winston.format.colorize(),
winston.format.printf(info => `${info.timestamp} ${info.level}: ${info.message}`),
),
timestamp: true,
}),
],
});
module.exports = logger;

View File

@ -9,6 +9,7 @@ const mime = require('mime');
const sharp = require('sharp'); const sharp = require('sharp');
const blake2 = require('blake2'); const blake2 = require('blake2');
const logger = require('./logger');
const knex = require('./knex'); const knex = require('./knex');
const upsert = require('./utils/upsert'); const upsert = require('./utils/upsert');
@ -75,11 +76,11 @@ async function findDuplicates(photos, identifier, prop = null, label) {
: !duplicateLookup.has(prop ? source[prop] : source))); : !duplicateLookup.has(prop ? source[prop] : source)));
if (duplicates.length > 0) { if (duplicates.length > 0) {
console.log(`${duplicates.length} media items already present by ${identifier} for ${label}`); logger.info(`${duplicates.length} media items already present by ${identifier} for ${label}`);
} }
if (originals.length > 0) { if (originals.length > 0) {
console.log(`Fetching ${originals.length} new media items for ${label}`); logger.info(`Fetching ${originals.length} new media items for ${label}`);
} }
return [duplicates, originals]; return [duplicates, originals];
@ -181,8 +182,6 @@ async function storePhotos(photos, {
concurrency: 10, concurrency: 10,
}).filter(photo => photo); }).filter(photo => photo);
return metaFiles;
const [hashDuplicates, hashOriginals] = await findDuplicates(metaFiles, 'hash', 'hash', label); const [hashDuplicates, hashOriginals] = await findDuplicates(metaFiles, 'hash', 'hash', label);
const savedPhotos = await savePhotos(hashOriginals, { const savedPhotos = await savePhotos(hashOriginals, {
@ -230,6 +229,39 @@ async function storePhotos(photos, {
await upsert(`${domain}s_${role}s`, photoAssociations, [`${domain}_id`, 'media_id']); await upsert(`${domain}s_${role}s`, photoAssociations, [`${domain}_id`, 'media_id']);
} }
/*
async function storeReleasePhotos(releases, label) {
const sources = releases.map(release => pluckPhotos(release.photos)).flat();
const uniqueSources = Array.from(new Set(sources));
const [sourceDuplicates, sourceOriginals] = await findDuplicates(uniqueSources, 'source', null, label);
const metaFiles = await Promise.map(
sourceOriginals,
async (photoUrl, index) => fetchPhoto(photoUrl, index, label),
{ concurrency: 10 },
)
.filter(photo => photo);
const hashUniques = Object.values(metaFiles.reduce((acc, file) => {
if (!acc[file.hash]) acc[file.hash] = file;
return acc;
}, {}));
const [hashDuplicates, hashOriginals] = await findDuplicates(hashUniques, 'hash', 'hash', label);
const sourceHashes = metaFiles.concat(sourceDuplicates).reduce((acc, file) => {
acc[file.source] = file.hash;
return acc;
}, {});
const associations = releases.map(release => release.photos.map(source => [release.id, sourceHashes[source]])).flat();
console.log(associations);
}
*/
async function storeTrailer(trailers, { async function storeTrailer(trailers, {
domain = 'releases', domain = 'releases',
targetId, targetId,
@ -292,5 +324,6 @@ async function storeTrailer(trailers, {
module.exports = { module.exports = {
createMediaDirectory, createMediaDirectory,
storePhotos, storePhotos,
// storeReleasePhotos,
storeTrailer, storeTrailer,
}; };

View File

@ -11,6 +11,7 @@ const { associateActors } = require('./actors');
const { const {
createMediaDirectory, createMediaDirectory,
storePhotos, storePhotos,
// storeReleasePhotos,
storeTrailer, storeTrailer,
} = require('./media'); } = require('./media');
const { fetchSites, findSiteByUrl } = require('./sites'); const { fetchSites, findSiteByUrl } = require('./sites');
@ -309,41 +310,49 @@ function accumulateMovies(releases) {
}, {}); }, {});
} }
async function storeReleaseAssets(release, releaseId) { async function storeReleaseAssets(releases) {
// await storeReleasePhotos(releases);
await Promise.map(releases, async (release) => {
const subpath = `${release.site.network.slug}/${release.site.slug}/${release.id}/`; const subpath = `${release.site.network.slug}/${release.site.slug}/${release.id}/`;
const identifier = `"${release.title}" (${releaseId})`; const identifier = `"${release.title}" (${release.id})`;
await createMediaDirectory('releases', subpath); await createMediaDirectory('releases', subpath);
console.log(release.id);
try { try {
// don't use Promise.all to prevent concurrency issues with duplicate detection // don't use Promise.all to prevent concurrency issues with duplicate detection
if (release.poster) { if (release.poster) {
await storePhotos([release.poster], { await storePhotos([release.poster], {
role: 'poster', role: 'poster',
targetId: releaseId, targetId: release.id,
subpath, subpath,
}, identifier); }, identifier);
} }
await storePhotos(release.photos, { await storePhotos(release.photos, {
targetId: releaseId, targetId: release.id,
subpath, subpath,
primaryRole: release.poster ? null : 'poster', primaryRole: release.poster ? null : 'poster',
}, identifier); }, identifier);
await storePhotos(release.covers, { await storePhotos(release.covers, {
role: 'cover', role: 'cover',
targetId: releaseId, targetId: release.id,
subpath, subpath,
}, identifier); }, identifier);
await storeTrailer(release.trailer, { await storeTrailer(release.trailer, {
targetId: releaseId, targetId: release.id,
subpath, subpath,
}, identifier); }, identifier);
} catch (error) { } catch (error) {
console.log(release.url, error); console.log(release.url, error);
} }
}, {
concurrency: 10,
});
} }
async function storeRelease(release) { async function storeRelease(release) {
@ -414,9 +423,7 @@ async function storeReleases(releases) {
await Promise.all([ await Promise.all([
associateActors(actors, storedReleases), associateActors(actors, storedReleases),
Promise.map(storedReleases, async release => storeReleaseAssets(release, release.id), { storeReleaseAssets(storedReleases),
concurrency: 10,
}),
]); ]);
return { return {