diff --git a/assets/components/releases/chapters.vue b/assets/components/releases/chapters.vue new file mode 100644 index 00000000..0322ec44 --- /dev/null +++ b/assets/components/releases/chapters.vue @@ -0,0 +1,161 @@ + + + + + + + diff --git a/assets/components/releases/clips.vue b/assets/components/releases/clips.vue deleted file mode 100644 index 6e683560..00000000 --- a/assets/components/releases/clips.vue +++ /dev/null @@ -1,126 +0,0 @@ - - - - - diff --git a/assets/components/releases/release.vue b/assets/components/releases/release.vue index 4c4e0f03..b11f3964 100644 --- a/assets/components/releases/release.vue +++ b/assets/components/releases/release.vue @@ -104,6 +104,15 @@

{{ release.description }}

+
+ Chapters + + +
+
-
- Clips - - -
-
+ +clock + + diff --git a/assets/img/icons/clock3.svg b/assets/img/icons/clock3.svg new file mode 100644 index 00000000..a0875fa9 --- /dev/null +++ b/assets/img/icons/clock3.svg @@ -0,0 +1,5 @@ + + +clock3 + + diff --git a/assets/img/icons/clock4.svg b/assets/img/icons/clock4.svg new file mode 100644 index 00000000..bba1c7e0 --- /dev/null +++ b/assets/img/icons/clock4.svg @@ -0,0 +1,5 @@ + + +clock4 + + diff --git a/assets/img/icons/pagebreak.svg b/assets/img/icons/pagebreak.svg new file mode 100644 index 00000000..610e964a --- /dev/null +++ b/assets/img/icons/pagebreak.svg @@ -0,0 +1,5 @@ + + +pagebreak + + diff --git a/assets/img/icons/stack4.svg b/assets/img/icons/stack4.svg new file mode 100644 index 00000000..01779b32 --- /dev/null +++ b/assets/img/icons/stack4.svg @@ -0,0 +1,5 @@ + + +stack4 + + diff --git a/assets/img/icons/watch2.svg b/assets/img/icons/watch2.svg new file mode 100644 index 00000000..9169aca5 --- /dev/null +++ b/assets/img/icons/watch2.svg @@ -0,0 +1,6 @@ + + +watch2 + + + diff --git a/assets/js/curate.js b/assets/js/curate.js index 7c6a94e9..f2b0e99b 100644 --- a/assets/js/curate.js +++ b/assets/js/curate.js @@ -69,7 +69,7 @@ function curateRelease(release) { if (release.scenes) curatedRelease.scenes = release.scenes.filter(Boolean).map(({ scene }) => curateRelease(scene)); if (release.movies) curatedRelease.movies = release.movies.filter(Boolean).map(({ movie }) => curateRelease(movie)); - if (release.clips) curatedRelease.clips = release.clips.filter(Boolean).map(clip => curateRelease(clip)); + if (release.chapters) curatedRelease.chapters = release.chapters.filter(Boolean).map(chapter => curateRelease(chapter)); if (release.photos) curatedRelease.photos = release.photos.filter(Boolean).map(photo => photo.media || photo); if (release.covers) curatedRelease.covers = release.covers.filter(Boolean).map(({ media }) => media); if (release.trailer) curatedRelease.trailer = release.trailer.media; diff --git a/assets/js/fragments.js b/assets/js/fragments.js index e1b04f43..5524b710 100644 --- a/assets/js/fragments.js +++ b/assets/js/fragments.js @@ -268,19 +268,21 @@ const releaseFragment = ` ${releaseTrailerFragment} ${releaseTeaserFragment} ${siteFragment} - clips { + chapters { id + index + time + duration title description - duration - tags: clipsTags { + tags: chaptersTags { tag { id name slug } } - poster: clipsPosterByClipId { + poster: chaptersPosterByChapterId { media { id index diff --git a/migrations/20190325001339_releases.js b/migrations/20190325001339_releases.js index 40540bfe..9d6d20b7 100644 --- a/migrations/20190325001339_releases.js +++ b/migrations/20190325001339_releases.js @@ -903,7 +903,7 @@ exports.up = knex => Promise.resolve() table.unique('movie_id'); })) - .then(() => knex.schema.createTable('clips', (table) => { + .then(() => knex.schema.createTable('chapters', (table) => { table.increments('id', 16); table.integer('release_id', 12) @@ -912,16 +912,18 @@ exports.up = knex => Promise.resolve() .notNullable() .onDelete('cascade'); - table.integer('clip', 6); + table.integer('index'); + table.unique(['release_id', 'index']); - table.unique(['release_id', 'clip']); - - table.text('title'); - table.text('description'); + table.integer('time') + .unsigned(); table.integer('duration') .unsigned(); + table.text('title'); + table.text('description'); + table.integer('created_batch_id', 12) .references('id') .inTable('batches') @@ -935,11 +937,11 @@ exports.up = knex => Promise.resolve() table.datetime('created_at') .defaultTo(knex.fn.now()); })) - .then(() => knex.schema.createTable('clips_posters', (table) => { - table.integer('clip_id', 16) + .then(() => knex.schema.createTable('chapters_posters', (table) => { + table.integer('chapter_id', 16) .notNullable() .references('id') - .inTable('clips') + .inTable('chapters') .onDelete('cascade'); table.text('media_id', 21) @@ -947,13 +949,13 @@ exports.up = knex => Promise.resolve() .references('id') .inTable('media'); - table.unique('clip_id'); + table.unique('chapter_id'); })) - .then(() => knex.schema.createTable('clips_photos', (table) => { - table.integer('clip_id', 16) + .then(() => knex.schema.createTable('chapters_photos', (table) => { + table.integer('chapter_id', 16) .notNullable() .references('id') - .inTable('clips') + .inTable('chapters') .onDelete('cascade'); table.text('media_id', 21) @@ -961,21 +963,22 @@ exports.up = knex => Promise.resolve() .references('id') .inTable('media'); - table.unique(['clip_id', 'media_id']); + table.unique(['chapter_id', 'media_id']); })) - .then(() => knex.schema.createTable('clips_tags', (table) => { + .then(() => knex.schema.createTable('chapters_tags', (table) => { table.integer('tag_id', 12) .notNullable() .references('id') .inTable('tags') .onDelete('cascade'); - table.integer('clip_id', 16) + table.integer('chapter_id', 16) .notNullable() .references('id') - .inTable('clips'); + .inTable('chapters') + .onDelete('cascade'); - table.unique(['tag_id', 'clip_id']); + table.unique(['tag_id', 'chapter_id']); })) // SEARCH .then(() => { // eslint-disable-line arrow-body-style @@ -1207,6 +1210,10 @@ exports.down = (knex) => { // eslint-disable-line arrow-body-style DROP TABLE IF EXISTS clips_posters CASCADE; DROP TABLE IF EXISTS clips_photos CASCADE; + DROP TABLE IF EXISTS chapters_tags CASCADE; + DROP TABLE IF EXISTS chapters_posters CASCADE; + DROP TABLE IF EXISTS chapters_photos CASCADE; + DROP TABLE IF EXISTS batches CASCADE; DROP TABLE IF EXISTS actors_avatars CASCADE; @@ -1226,6 +1233,7 @@ exports.down = (knex) => { // eslint-disable-line arrow-body-style DROP TABLE IF EXISTS tags_photos CASCADE; DROP TABLE IF EXISTS movies CASCADE; DROP TABLE IF EXISTS clips CASCADE; + DROP TABLE IF EXISTS chapters CASCADE; DROP TABLE IF EXISTS releases CASCADE; DROP TABLE IF EXISTS actors CASCADE; DROP TABLE IF EXISTS directors CASCADE; diff --git a/package-lock.json b/package-lock.json index 58b17a1e..00aa3220 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "@graphile-contrib/pg-simplify-inflector": "^5.0.0-beta.1", "@thependulum/bhttp": "^1.2.6", "acorn": "^8.0.4", + "array-equal": "^1.0.0", "aws-sdk": "^2.847.0", "babel-polyfill": "^6.26.0", "bhttp": "^1.2.6", @@ -23,6 +24,7 @@ "casual": "^1.6.2", "cheerio": "^1.0.0-rc.3", "cli-confirm": "^1.0.1", + "cloudscraper": "^4.6.0", "config": "^3.2.5", "connect-session-knex": "^2.0.0", "convert": "^1.6.2", @@ -2210,6 +2212,11 @@ "node": ">=0.10.0" } }, + "node_modules/array-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz", + "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=" + }, "node_modules/array-find-index": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", @@ -2879,6 +2886,15 @@ "wcwidth": "^1.0.1" } }, + "node_modules/brotli": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/brotli/-/brotli-1.3.2.tgz", + "integrity": "sha1-UlqcrU/LqWR119OI9q7LE+7VL0Y=", + "peer": true, + "dependencies": { + "base64-js": "^1.1.2" + } + }, "node_modules/browser-process-hrtime": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", @@ -3259,6 +3275,21 @@ "node": ">=0.8" } }, + "node_modules/cloudscraper": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/cloudscraper/-/cloudscraper-4.6.0.tgz", + "integrity": "sha512-42g6atOAQwhoMlzCYsB1238RYEQa3ibcxhjVeYuZQDLGSZjBNAKOlF/2kcPwZUhlRKA9LDwuYQ7/0LCoMui2ww==", + "dependencies": { + "request-promise": "^4.2.4" + }, + "engines": { + "node": ">=8" + }, + "peerDependencies": { + "brotli": "^1.3.2", + "request": "^2.88.0" + } + }, "node_modules/code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", @@ -11816,6 +11847,24 @@ "node": ">= 6" } }, + "node_modules/request-promise": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/request-promise/-/request-promise-4.2.6.tgz", + "integrity": "sha512-HCHI3DJJUakkOr8fNoCc73E5nU5bqITjOYFMDrKHYOXWXrgD/SBaC7LjwuPymUprRyuF06UK7hd/lMHkmUXglQ==", + "deprecated": "request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142", + "dependencies": { + "bluebird": "^3.5.0", + "request-promise-core": "1.1.4", + "stealthy-require": "^1.1.1", + "tough-cookie": "^2.3.3" + }, + "engines": { + "node": ">=0.10.0" + }, + "peerDependencies": { + "request": "^2.34" + } + }, "node_modules/request-promise-core": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.3.tgz", @@ -11852,6 +11901,32 @@ "node": ">=0.8" } }, + "node_modules/request-promise/node_modules/request-promise-core": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", + "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", + "dependencies": { + "lodash": "^4.17.19" + }, + "engines": { + "node": ">=0.10.0" + }, + "peerDependencies": { + "request": "^2.34" + } + }, + "node_modules/request-promise/node_modules/tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dependencies": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/request/node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -17400,6 +17475,11 @@ "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=" }, + "array-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz", + "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=" + }, "array-find-index": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", @@ -17967,6 +18047,15 @@ "wcwidth": "^1.0.1" } }, + "brotli": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/brotli/-/brotli-1.3.2.tgz", + "integrity": "sha1-UlqcrU/LqWR119OI9q7LE+7VL0Y=", + "peer": true, + "requires": { + "base64-js": "^1.1.2" + } + }, "browser-process-hrtime": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", @@ -18277,6 +18366,14 @@ "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=" }, + "cloudscraper": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/cloudscraper/-/cloudscraper-4.6.0.tgz", + "integrity": "sha512-42g6atOAQwhoMlzCYsB1238RYEQa3ibcxhjVeYuZQDLGSZjBNAKOlF/2kcPwZUhlRKA9LDwuYQ7/0LCoMui2ww==", + "requires": { + "request-promise": "^4.2.4" + } + }, "code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", @@ -25165,6 +25262,36 @@ } } }, + "request-promise": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/request-promise/-/request-promise-4.2.6.tgz", + "integrity": "sha512-HCHI3DJJUakkOr8fNoCc73E5nU5bqITjOYFMDrKHYOXWXrgD/SBaC7LjwuPymUprRyuF06UK7hd/lMHkmUXglQ==", + "requires": { + "bluebird": "^3.5.0", + "request-promise-core": "1.1.4", + "stealthy-require": "^1.1.1", + "tough-cookie": "^2.3.3" + }, + "dependencies": { + "request-promise-core": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", + "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", + "requires": { + "lodash": "^4.17.19" + } + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + } + } + }, "request-promise-core": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.3.tgz", diff --git a/package.json b/package.json index cafbb087..71606bfa 100644 --- a/package.json +++ b/package.json @@ -73,6 +73,7 @@ "@graphile-contrib/pg-simplify-inflector": "^5.0.0-beta.1", "@thependulum/bhttp": "^1.2.6", "acorn": "^8.0.4", + "array-equal": "^1.0.0", "aws-sdk": "^2.847.0", "babel-polyfill": "^6.26.0", "bhttp": "^1.2.6", @@ -84,6 +85,7 @@ "casual": "^1.6.2", "cheerio": "^1.0.0-rc.3", "cli-confirm": "^1.0.1", + "cloudscraper": "^4.6.0", "config": "^3.2.5", "connect-session-knex": "^2.0.0", "convert": "^1.6.2", diff --git a/public/img/logos/brazzers/brazzers.png b/public/img/logos/brazzers/brazzers.png new file mode 100644 index 00000000..18a52c6a Binary files /dev/null and b/public/img/logos/brazzers/brazzers.png differ diff --git a/public/img/logos/brazzers/favicon.png b/public/img/logos/brazzers/favicon.png index 6301ebb5..048fe83a 100644 Binary files a/public/img/logos/brazzers/favicon.png and b/public/img/logos/brazzers/favicon.png differ diff --git a/public/img/logos/brazzers/favicon_dark.png b/public/img/logos/brazzers/favicon_dark.png index 6301ebb5..136c84e3 100644 Binary files a/public/img/logos/brazzers/favicon_dark.png and b/public/img/logos/brazzers/favicon_dark.png differ diff --git a/public/img/logos/brazzers/favicon_light.png b/public/img/logos/brazzers/favicon_light.png index 6301ebb5..a52d3333 100644 Binary files a/public/img/logos/brazzers/favicon_light.png and b/public/img/logos/brazzers/favicon_light.png differ diff --git a/public/img/logos/brazzers/lazy/assesinpublic.png b/public/img/logos/brazzers/lazy/assesinpublic.png index 55b62411..a4d62eff 100644 Binary files a/public/img/logos/brazzers/lazy/assesinpublic.png and b/public/img/logos/brazzers/lazy/assesinpublic.png differ diff --git a/public/img/logos/brazzers/lazy/babygotboobs.png b/public/img/logos/brazzers/lazy/babygotboobs.png index 8f1eb08e..1f4ff5e0 100644 Binary files a/public/img/logos/brazzers/lazy/babygotboobs.png and b/public/img/logos/brazzers/lazy/babygotboobs.png differ diff --git a/public/img/logos/brazzers/lazy/bigbuttslikeitbig.png b/public/img/logos/brazzers/lazy/bigbuttslikeitbig.png index 9a8781f3..6d6a6208 100644 Binary files a/public/img/logos/brazzers/lazy/bigbuttslikeitbig.png and b/public/img/logos/brazzers/lazy/bigbuttslikeitbig.png differ diff --git a/public/img/logos/brazzers/lazy/bigtitsatschool.png b/public/img/logos/brazzers/lazy/bigtitsatschool.png index 48ff4842..a7b3ba60 100644 Binary files a/public/img/logos/brazzers/lazy/bigtitsatschool.png and b/public/img/logos/brazzers/lazy/bigtitsatschool.png differ diff --git a/public/img/logos/brazzers/lazy/bigtitsatwork.png b/public/img/logos/brazzers/lazy/bigtitsatwork.png index 0e43038a..928d9a60 100644 Binary files a/public/img/logos/brazzers/lazy/bigtitsatwork.png and b/public/img/logos/brazzers/lazy/bigtitsatwork.png differ diff --git a/public/img/logos/brazzers/lazy/bigtitsinsports.png b/public/img/logos/brazzers/lazy/bigtitsinsports.png index 975db9b4..a3cd90ab 100644 Binary files a/public/img/logos/brazzers/lazy/bigtitsinsports.png and b/public/img/logos/brazzers/lazy/bigtitsinsports.png differ diff --git a/public/img/logos/brazzers/lazy/bigtitsinuniform.png b/public/img/logos/brazzers/lazy/bigtitsinuniform.png index 2ebfe3e8..18a0cab9 100644 Binary files a/public/img/logos/brazzers/lazy/bigtitsinuniform.png and b/public/img/logos/brazzers/lazy/bigtitsinuniform.png differ diff --git a/public/img/logos/brazzers/lazy/bigwetbutts.png b/public/img/logos/brazzers/lazy/bigwetbutts.png index d7da41fc..6b9ddd61 100644 Binary files a/public/img/logos/brazzers/lazy/bigwetbutts.png and b/public/img/logos/brazzers/lazy/bigwetbutts.png differ diff --git a/public/img/logos/brazzers/lazy/brazzers.png b/public/img/logos/brazzers/lazy/brazzers.png new file mode 100644 index 00000000..6f45fbdb Binary files /dev/null and b/public/img/logos/brazzers/lazy/brazzers.png differ diff --git a/public/img/logos/brazzers/lazy/brazzersenespanol.png b/public/img/logos/brazzers/lazy/brazzersenespanol.png index 7694a4c9..d7a1db31 100644 Binary files a/public/img/logos/brazzers/lazy/brazzersenespanol.png and b/public/img/logos/brazzers/lazy/brazzersenespanol.png differ diff --git a/public/img/logos/brazzers/lazy/brazzersexxtra.png b/public/img/logos/brazzers/lazy/brazzersexxtra.png index f1ac5c2b..fced03e2 100644 Binary files a/public/img/logos/brazzers/lazy/brazzersexxtra.png and b/public/img/logos/brazzers/lazy/brazzersexxtra.png differ diff --git a/public/img/logos/brazzers/lazy/brazzerslive.png b/public/img/logos/brazzers/lazy/brazzerslive.png index 785da036..ba38007d 100644 Binary files a/public/img/logos/brazzers/lazy/brazzerslive.png and b/public/img/logos/brazzers/lazy/brazzerslive.png differ diff --git a/public/img/logos/brazzers/lazy/brazzersvault.png b/public/img/logos/brazzers/lazy/brazzersvault.png index 4a934ffd..d68c9185 100644 Binary files a/public/img/logos/brazzers/lazy/brazzersvault.png and b/public/img/logos/brazzers/lazy/brazzersvault.png differ diff --git a/public/img/logos/brazzers/lazy/bustyandreal.png b/public/img/logos/brazzers/lazy/bustyandreal.png index 931cfd98..f5e9db45 100644 Binary files a/public/img/logos/brazzers/lazy/bustyandreal.png and b/public/img/logos/brazzers/lazy/bustyandreal.png differ diff --git a/public/img/logos/brazzers/lazy/bustyz.png b/public/img/logos/brazzers/lazy/bustyz.png index 4e4382a5..a462773b 100644 Binary files a/public/img/logos/brazzers/lazy/bustyz.png and b/public/img/logos/brazzers/lazy/bustyz.png differ diff --git a/public/img/logos/brazzers/lazy/buttsandblacks.png b/public/img/logos/brazzers/lazy/buttsandblacks.png index 8dd4f627..df81b305 100644 Binary files a/public/img/logos/brazzers/lazy/buttsandblacks.png and b/public/img/logos/brazzers/lazy/buttsandblacks.png differ diff --git a/public/img/logos/brazzers/lazy/cfnm.png b/public/img/logos/brazzers/lazy/cfnm.png index 3f6ea655..4fa5f3a6 100644 Binary files a/public/img/logos/brazzers/lazy/cfnm.png and b/public/img/logos/brazzers/lazy/cfnm.png differ diff --git a/public/img/logos/brazzers/lazy/daywithapornstar.png b/public/img/logos/brazzers/lazy/daywithapornstar.png index bb77fb79..b2f8eeb3 100644 Binary files a/public/img/logos/brazzers/lazy/daywithapornstar.png and b/public/img/logos/brazzers/lazy/daywithapornstar.png differ diff --git a/public/img/logos/brazzers/lazy/dirtymasseur.png b/public/img/logos/brazzers/lazy/dirtymasseur.png index 49384fbf..3d77c6d0 100644 Binary files a/public/img/logos/brazzers/lazy/dirtymasseur.png and b/public/img/logos/brazzers/lazy/dirtymasseur.png differ diff --git a/public/img/logos/brazzers/lazy/doctoradventures.png b/public/img/logos/brazzers/lazy/doctoradventures.png index e74b079a..253f575c 100644 Binary files a/public/img/logos/brazzers/lazy/doctoradventures.png and b/public/img/logos/brazzers/lazy/doctoradventures.png differ diff --git a/public/img/logos/brazzers/lazy/favicon.png b/public/img/logos/brazzers/lazy/favicon.png index aa873f58..82c04ab6 100644 Binary files a/public/img/logos/brazzers/lazy/favicon.png and b/public/img/logos/brazzers/lazy/favicon.png differ diff --git a/public/img/logos/brazzers/lazy/favicon_dark.png b/public/img/logos/brazzers/lazy/favicon_dark.png index 82fdf5db..6f622f77 100644 Binary files a/public/img/logos/brazzers/lazy/favicon_dark.png and b/public/img/logos/brazzers/lazy/favicon_dark.png differ diff --git a/public/img/logos/brazzers/lazy/favicon_light.png b/public/img/logos/brazzers/lazy/favicon_light.png index 82fdf5db..af5d7da1 100644 Binary files a/public/img/logos/brazzers/lazy/favicon_light.png and b/public/img/logos/brazzers/lazy/favicon_light.png differ diff --git a/public/img/logos/brazzers/lazy/hotandmean.png b/public/img/logos/brazzers/lazy/hotandmean.png index 5c8a8a18..796942c0 100644 Binary files a/public/img/logos/brazzers/lazy/hotandmean.png and b/public/img/logos/brazzers/lazy/hotandmean.png differ diff --git a/public/img/logos/brazzers/lazy/hotchicksbigasses.png b/public/img/logos/brazzers/lazy/hotchicksbigasses.png index 21d665c0..2b2941cb 100644 Binary files a/public/img/logos/brazzers/lazy/hotchicksbigasses.png and b/public/img/logos/brazzers/lazy/hotchicksbigasses.png differ diff --git a/public/img/logos/brazzers/lazy/hqhoneys.png b/public/img/logos/brazzers/lazy/hqhoneys.png index 385df8ac..d8d898c2 100644 Binary files a/public/img/logos/brazzers/lazy/hqhoneys.png and b/public/img/logos/brazzers/lazy/hqhoneys.png differ diff --git a/public/img/logos/brazzers/lazy/jizzonmyjugs.png b/public/img/logos/brazzers/lazy/jizzonmyjugs.png index 9aa1fda0..b6d74a51 100644 Binary files a/public/img/logos/brazzers/lazy/jizzonmyjugs.png and b/public/img/logos/brazzers/lazy/jizzonmyjugs.png differ diff --git a/public/img/logos/brazzers/lazy/jugfuckers.png b/public/img/logos/brazzers/lazy/jugfuckers.png index 0331bf03..bfb246e0 100644 Binary files a/public/img/logos/brazzers/lazy/jugfuckers.png and b/public/img/logos/brazzers/lazy/jugfuckers.png differ diff --git a/public/img/logos/brazzers/lazy/milfslikeitbig.png b/public/img/logos/brazzers/lazy/milfslikeitbig.png index 2adfebfe..11faf72f 100644 Binary files a/public/img/logos/brazzers/lazy/milfslikeitbig.png and b/public/img/logos/brazzers/lazy/milfslikeitbig.png differ diff --git a/public/img/logos/brazzers/lazy/mommygotboobs.png b/public/img/logos/brazzers/lazy/mommygotboobs.png index 1cb4c89f..cdb22933 100644 Binary files a/public/img/logos/brazzers/lazy/mommygotboobs.png and b/public/img/logos/brazzers/lazy/mommygotboobs.png differ diff --git a/public/img/logos/brazzers/lazy/momsincontrol.png b/public/img/logos/brazzers/lazy/momsincontrol.png index 5a7654e7..4b17c7fb 100644 Binary files a/public/img/logos/brazzers/lazy/momsincontrol.png and b/public/img/logos/brazzers/lazy/momsincontrol.png differ diff --git a/public/img/logos/brazzers/lazy/network.png b/public/img/logos/brazzers/lazy/network.png index 88013469..17abe59b 100644 Binary files a/public/img/logos/brazzers/lazy/network.png and b/public/img/logos/brazzers/lazy/network.png differ diff --git a/public/img/logos/brazzers/lazy/pornstarslikeitbig.png b/public/img/logos/brazzers/lazy/pornstarslikeitbig.png index 06d963dc..a3e99197 100644 Binary files a/public/img/logos/brazzers/lazy/pornstarslikeitbig.png and b/public/img/logos/brazzers/lazy/pornstarslikeitbig.png differ diff --git a/public/img/logos/brazzers/lazy/pornstarspunishment.png b/public/img/logos/brazzers/lazy/pornstarspunishment.png index 473451bb..af4985d1 100644 Binary files a/public/img/logos/brazzers/lazy/pornstarspunishment.png and b/public/img/logos/brazzers/lazy/pornstarspunishment.png differ diff --git a/public/img/logos/brazzers/lazy/racksandblacks.png b/public/img/logos/brazzers/lazy/racksandblacks.png index 954a56dd..3aa39dc8 100644 Binary files a/public/img/logos/brazzers/lazy/racksandblacks.png and b/public/img/logos/brazzers/lazy/racksandblacks.png differ diff --git a/public/img/logos/brazzers/lazy/realwifestories.png b/public/img/logos/brazzers/lazy/realwifestories.png index 6e1ace26..0a365a9e 100644 Binary files a/public/img/logos/brazzers/lazy/realwifestories.png and b/public/img/logos/brazzers/lazy/realwifestories.png differ diff --git a/public/img/logos/brazzers/lazy/sexproadventures.png b/public/img/logos/brazzers/lazy/sexproadventures.png index d1f7e6a0..e541f3da 100644 Binary files a/public/img/logos/brazzers/lazy/sexproadventures.png and b/public/img/logos/brazzers/lazy/sexproadventures.png differ diff --git a/public/img/logos/brazzers/lazy/shesgonnasquirt.png b/public/img/logos/brazzers/lazy/shesgonnasquirt.png index b8388612..a2ac349b 100644 Binary files a/public/img/logos/brazzers/lazy/shesgonnasquirt.png and b/public/img/logos/brazzers/lazy/shesgonnasquirt.png differ diff --git a/public/img/logos/brazzers/lazy/teenslikeitbig.png b/public/img/logos/brazzers/lazy/teenslikeitbig.png index 2ae4b2cd..438dbd86 100644 Binary files a/public/img/logos/brazzers/lazy/teenslikeitbig.png and b/public/img/logos/brazzers/lazy/teenslikeitbig.png differ diff --git a/public/img/logos/brazzers/lazy/teenslikeitblack.png b/public/img/logos/brazzers/lazy/teenslikeitblack.png index e01357e5..9d32666b 100644 Binary files a/public/img/logos/brazzers/lazy/teenslikeitblack.png and b/public/img/logos/brazzers/lazy/teenslikeitblack.png differ diff --git a/public/img/logos/brazzers/lazy/zzseries.png b/public/img/logos/brazzers/lazy/zzseries.png index 4ce9f328..3b19f4ed 100644 Binary files a/public/img/logos/brazzers/lazy/zzseries.png and b/public/img/logos/brazzers/lazy/zzseries.png differ diff --git a/public/img/logos/brazzers/misc/brazzers_flat_dark.png b/public/img/logos/brazzers/misc/brazzers_flat_dark.png new file mode 100644 index 00000000..b70fa6be Binary files /dev/null and b/public/img/logos/brazzers/misc/brazzers_flat_dark.png differ diff --git a/public/img/logos/brazzers/misc/brazzers_flat_dark.svg b/public/img/logos/brazzers/misc/brazzers_flat_dark.svg new file mode 100644 index 00000000..ab2010ee --- /dev/null +++ b/public/img/logos/brazzers/misc/brazzers_flat_dark.svg @@ -0,0 +1,101 @@ + + + Brazzers logo + + + + image/svg+xml + + Brazzers logo + + 15 ene 2021 + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/img/logos/brazzers/misc/brazzers_flat_equalized.png b/public/img/logos/brazzers/misc/brazzers_flat_equalized.png new file mode 100644 index 00000000..fe6365c6 Binary files /dev/null and b/public/img/logos/brazzers/misc/brazzers_flat_equalized.png differ diff --git a/public/img/logos/brazzers/misc/brazzers_flat_light.png b/public/img/logos/brazzers/misc/brazzers_flat_light.png new file mode 100644 index 00000000..c45ff43d Binary files /dev/null and b/public/img/logos/brazzers/misc/brazzers_flat_light.png differ diff --git a/public/img/logos/brazzers/misc/brazzers_gradient.png b/public/img/logos/brazzers/misc/brazzers_gradient.png new file mode 100644 index 00000000..9ab9c5a9 Binary files /dev/null and b/public/img/logos/brazzers/misc/brazzers_gradient.png differ diff --git a/public/img/logos/brazzers/misc/favicon_flat.png b/public/img/logos/brazzers/misc/favicon_flat.png new file mode 100644 index 00000000..a0ec87df Binary files /dev/null and b/public/img/logos/brazzers/misc/favicon_flat.png differ diff --git a/public/img/logos/brazzers/misc/favicon_gradient.png b/public/img/logos/brazzers/misc/favicon_gradient.png new file mode 100644 index 00000000..6301ebb5 Binary files /dev/null and b/public/img/logos/brazzers/misc/favicon_gradient.png differ diff --git a/public/img/logos/brazzers/network.png b/public/img/logos/brazzers/network.png index 9ab9c5a9..66d30bff 100644 Binary files a/public/img/logos/brazzers/network.png and b/public/img/logos/brazzers/network.png differ diff --git a/public/img/logos/brazzers/thumbs/assesinpublic.png b/public/img/logos/brazzers/thumbs/assesinpublic.png index 27dd44e3..5147ed3a 100644 Binary files a/public/img/logos/brazzers/thumbs/assesinpublic.png and b/public/img/logos/brazzers/thumbs/assesinpublic.png differ diff --git a/public/img/logos/brazzers/thumbs/babygotboobs.png b/public/img/logos/brazzers/thumbs/babygotboobs.png index 8e3f3b49..a4245019 100644 Binary files a/public/img/logos/brazzers/thumbs/babygotboobs.png and b/public/img/logos/brazzers/thumbs/babygotboobs.png differ diff --git a/public/img/logos/brazzers/thumbs/bigbuttslikeitbig.png b/public/img/logos/brazzers/thumbs/bigbuttslikeitbig.png index 3075d678..03b7f7df 100644 Binary files a/public/img/logos/brazzers/thumbs/bigbuttslikeitbig.png and b/public/img/logos/brazzers/thumbs/bigbuttslikeitbig.png differ diff --git a/public/img/logos/brazzers/thumbs/bigtitsatschool.png b/public/img/logos/brazzers/thumbs/bigtitsatschool.png index 8d3628ab..ec0b0916 100644 Binary files a/public/img/logos/brazzers/thumbs/bigtitsatschool.png and b/public/img/logos/brazzers/thumbs/bigtitsatschool.png differ diff --git a/public/img/logos/brazzers/thumbs/bigtitsatwork.png b/public/img/logos/brazzers/thumbs/bigtitsatwork.png index 78324f5b..90a5c2bd 100644 Binary files a/public/img/logos/brazzers/thumbs/bigtitsatwork.png and b/public/img/logos/brazzers/thumbs/bigtitsatwork.png differ diff --git a/public/img/logos/brazzers/thumbs/bigtitsinsports.png b/public/img/logos/brazzers/thumbs/bigtitsinsports.png index 20ce5913..e7ba7619 100644 Binary files a/public/img/logos/brazzers/thumbs/bigtitsinsports.png and b/public/img/logos/brazzers/thumbs/bigtitsinsports.png differ diff --git a/public/img/logos/brazzers/thumbs/bigtitsinuniform.png b/public/img/logos/brazzers/thumbs/bigtitsinuniform.png index 7d4d38d7..dfa18376 100644 Binary files a/public/img/logos/brazzers/thumbs/bigtitsinuniform.png and b/public/img/logos/brazzers/thumbs/bigtitsinuniform.png differ diff --git a/public/img/logos/brazzers/thumbs/bigwetbutts.png b/public/img/logos/brazzers/thumbs/bigwetbutts.png index 9f005fda..db95b742 100644 Binary files a/public/img/logos/brazzers/thumbs/bigwetbutts.png and b/public/img/logos/brazzers/thumbs/bigwetbutts.png differ diff --git a/public/img/logos/brazzers/thumbs/brazzers.png b/public/img/logos/brazzers/thumbs/brazzers.png new file mode 100644 index 00000000..44be57bf Binary files /dev/null and b/public/img/logos/brazzers/thumbs/brazzers.png differ diff --git a/public/img/logos/brazzers/thumbs/brazzersenespanol.png b/public/img/logos/brazzers/thumbs/brazzersenespanol.png index e6d3e979..ddf8cdca 100644 Binary files a/public/img/logos/brazzers/thumbs/brazzersenespanol.png and b/public/img/logos/brazzers/thumbs/brazzersenespanol.png differ diff --git a/public/img/logos/brazzers/thumbs/brazzersexxtra.png b/public/img/logos/brazzers/thumbs/brazzersexxtra.png index 8e168809..3562a265 100644 Binary files a/public/img/logos/brazzers/thumbs/brazzersexxtra.png and b/public/img/logos/brazzers/thumbs/brazzersexxtra.png differ diff --git a/public/img/logos/brazzers/thumbs/brazzerslive.png b/public/img/logos/brazzers/thumbs/brazzerslive.png index c478d6cb..529909dd 100644 Binary files a/public/img/logos/brazzers/thumbs/brazzerslive.png and b/public/img/logos/brazzers/thumbs/brazzerslive.png differ diff --git a/public/img/logos/brazzers/thumbs/brazzersvault.png b/public/img/logos/brazzers/thumbs/brazzersvault.png index d2602c99..36e23c5b 100644 Binary files a/public/img/logos/brazzers/thumbs/brazzersvault.png and b/public/img/logos/brazzers/thumbs/brazzersvault.png differ diff --git a/public/img/logos/brazzers/thumbs/bustyandreal.png b/public/img/logos/brazzers/thumbs/bustyandreal.png index 63b4d592..313e833c 100644 Binary files a/public/img/logos/brazzers/thumbs/bustyandreal.png and b/public/img/logos/brazzers/thumbs/bustyandreal.png differ diff --git a/public/img/logos/brazzers/thumbs/bustyz.png b/public/img/logos/brazzers/thumbs/bustyz.png index 1eebbb80..b4b8aa99 100644 Binary files a/public/img/logos/brazzers/thumbs/bustyz.png and b/public/img/logos/brazzers/thumbs/bustyz.png differ diff --git a/public/img/logos/brazzers/thumbs/buttsandblacks.png b/public/img/logos/brazzers/thumbs/buttsandblacks.png index b6f3ec6d..83069e07 100644 Binary files a/public/img/logos/brazzers/thumbs/buttsandblacks.png and b/public/img/logos/brazzers/thumbs/buttsandblacks.png differ diff --git a/public/img/logos/brazzers/thumbs/cfnm.png b/public/img/logos/brazzers/thumbs/cfnm.png index 35f158d6..de558d7d 100644 Binary files a/public/img/logos/brazzers/thumbs/cfnm.png and b/public/img/logos/brazzers/thumbs/cfnm.png differ diff --git a/public/img/logos/brazzers/thumbs/daywithapornstar.png b/public/img/logos/brazzers/thumbs/daywithapornstar.png index a28c6ab4..d91eba99 100644 Binary files a/public/img/logos/brazzers/thumbs/daywithapornstar.png and b/public/img/logos/brazzers/thumbs/daywithapornstar.png differ diff --git a/public/img/logos/brazzers/thumbs/dirtymasseur.png b/public/img/logos/brazzers/thumbs/dirtymasseur.png index 5419363a..b2a73eed 100644 Binary files a/public/img/logos/brazzers/thumbs/dirtymasseur.png and b/public/img/logos/brazzers/thumbs/dirtymasseur.png differ diff --git a/public/img/logos/brazzers/thumbs/doctoradventures.png b/public/img/logos/brazzers/thumbs/doctoradventures.png index 04b6728b..6981645b 100644 Binary files a/public/img/logos/brazzers/thumbs/doctoradventures.png and b/public/img/logos/brazzers/thumbs/doctoradventures.png differ diff --git a/public/img/logos/brazzers/thumbs/favicon.png b/public/img/logos/brazzers/thumbs/favicon.png index aa873f58..82c04ab6 100644 Binary files a/public/img/logos/brazzers/thumbs/favicon.png and b/public/img/logos/brazzers/thumbs/favicon.png differ diff --git a/public/img/logos/brazzers/thumbs/favicon_dark.png b/public/img/logos/brazzers/thumbs/favicon_dark.png index 82fdf5db..6f622f77 100644 Binary files a/public/img/logos/brazzers/thumbs/favicon_dark.png and b/public/img/logos/brazzers/thumbs/favicon_dark.png differ diff --git a/public/img/logos/brazzers/thumbs/favicon_light.png b/public/img/logos/brazzers/thumbs/favicon_light.png index 82fdf5db..af5d7da1 100644 Binary files a/public/img/logos/brazzers/thumbs/favicon_light.png and b/public/img/logos/brazzers/thumbs/favicon_light.png differ diff --git a/public/img/logos/brazzers/thumbs/hotandmean.png b/public/img/logos/brazzers/thumbs/hotandmean.png index 668a44e6..7923bbd1 100644 Binary files a/public/img/logos/brazzers/thumbs/hotandmean.png and b/public/img/logos/brazzers/thumbs/hotandmean.png differ diff --git a/public/img/logos/brazzers/thumbs/hotchicksbigasses.png b/public/img/logos/brazzers/thumbs/hotchicksbigasses.png index f0a7ed6d..75c26d5d 100644 Binary files a/public/img/logos/brazzers/thumbs/hotchicksbigasses.png and b/public/img/logos/brazzers/thumbs/hotchicksbigasses.png differ diff --git a/public/img/logos/brazzers/thumbs/hqhoneys.png b/public/img/logos/brazzers/thumbs/hqhoneys.png index 6bc74c9f..546dcd7d 100644 Binary files a/public/img/logos/brazzers/thumbs/hqhoneys.png and b/public/img/logos/brazzers/thumbs/hqhoneys.png differ diff --git a/public/img/logos/brazzers/thumbs/jizzonmyjugs.png b/public/img/logos/brazzers/thumbs/jizzonmyjugs.png index 4a5e2a72..0335930f 100644 Binary files a/public/img/logos/brazzers/thumbs/jizzonmyjugs.png and b/public/img/logos/brazzers/thumbs/jizzonmyjugs.png differ diff --git a/public/img/logos/brazzers/thumbs/jugfuckers.png b/public/img/logos/brazzers/thumbs/jugfuckers.png index c2ae4d37..0963e487 100644 Binary files a/public/img/logos/brazzers/thumbs/jugfuckers.png and b/public/img/logos/brazzers/thumbs/jugfuckers.png differ diff --git a/public/img/logos/brazzers/thumbs/milfslikeitbig.png b/public/img/logos/brazzers/thumbs/milfslikeitbig.png index 9cc7b02a..72079cf0 100644 Binary files a/public/img/logos/brazzers/thumbs/milfslikeitbig.png and b/public/img/logos/brazzers/thumbs/milfslikeitbig.png differ diff --git a/public/img/logos/brazzers/thumbs/mommygotboobs.png b/public/img/logos/brazzers/thumbs/mommygotboobs.png index 4cb01da6..7b958cd8 100644 Binary files a/public/img/logos/brazzers/thumbs/mommygotboobs.png and b/public/img/logos/brazzers/thumbs/mommygotboobs.png differ diff --git a/public/img/logos/brazzers/thumbs/momsincontrol.png b/public/img/logos/brazzers/thumbs/momsincontrol.png index 4bbdb345..b365e873 100644 Binary files a/public/img/logos/brazzers/thumbs/momsincontrol.png and b/public/img/logos/brazzers/thumbs/momsincontrol.png differ diff --git a/public/img/logos/brazzers/thumbs/network.png b/public/img/logos/brazzers/thumbs/network.png index a223f876..195ba82e 100644 Binary files a/public/img/logos/brazzers/thumbs/network.png and b/public/img/logos/brazzers/thumbs/network.png differ diff --git a/public/img/logos/brazzers/thumbs/pornstarslikeitbig.png b/public/img/logos/brazzers/thumbs/pornstarslikeitbig.png index 5ea0872c..d5d60307 100644 Binary files a/public/img/logos/brazzers/thumbs/pornstarslikeitbig.png and b/public/img/logos/brazzers/thumbs/pornstarslikeitbig.png differ diff --git a/public/img/logos/brazzers/thumbs/pornstarspunishment.png b/public/img/logos/brazzers/thumbs/pornstarspunishment.png index 8dc7361a..0056409a 100644 Binary files a/public/img/logos/brazzers/thumbs/pornstarspunishment.png and b/public/img/logos/brazzers/thumbs/pornstarspunishment.png differ diff --git a/public/img/logos/brazzers/thumbs/racksandblacks.png b/public/img/logos/brazzers/thumbs/racksandblacks.png index 89fccf6b..be49998b 100644 Binary files a/public/img/logos/brazzers/thumbs/racksandblacks.png and b/public/img/logos/brazzers/thumbs/racksandblacks.png differ diff --git a/public/img/logos/brazzers/thumbs/realwifestories.png b/public/img/logos/brazzers/thumbs/realwifestories.png index 02fa0623..4ceb826e 100644 Binary files a/public/img/logos/brazzers/thumbs/realwifestories.png and b/public/img/logos/brazzers/thumbs/realwifestories.png differ diff --git a/public/img/logos/brazzers/thumbs/sexproadventures.png b/public/img/logos/brazzers/thumbs/sexproadventures.png index 9312ee64..b1a3a0f4 100644 Binary files a/public/img/logos/brazzers/thumbs/sexproadventures.png and b/public/img/logos/brazzers/thumbs/sexproadventures.png differ diff --git a/public/img/logos/brazzers/thumbs/shesgonnasquirt.png b/public/img/logos/brazzers/thumbs/shesgonnasquirt.png index 1ad447ee..8b1681e9 100644 Binary files a/public/img/logos/brazzers/thumbs/shesgonnasquirt.png and b/public/img/logos/brazzers/thumbs/shesgonnasquirt.png differ diff --git a/public/img/logos/brazzers/thumbs/teenslikeitbig.png b/public/img/logos/brazzers/thumbs/teenslikeitbig.png index b29d23f9..0e0a380a 100644 Binary files a/public/img/logos/brazzers/thumbs/teenslikeitbig.png and b/public/img/logos/brazzers/thumbs/teenslikeitbig.png differ diff --git a/public/img/logos/brazzers/thumbs/teenslikeitblack.png b/public/img/logos/brazzers/thumbs/teenslikeitblack.png index 2bf03f77..24d82f05 100644 Binary files a/public/img/logos/brazzers/thumbs/teenslikeitblack.png and b/public/img/logos/brazzers/thumbs/teenslikeitblack.png differ diff --git a/public/img/logos/brazzers/thumbs/zzseries.png b/public/img/logos/brazzers/thumbs/zzseries.png index 11f71f65..bbc53967 100644 Binary files a/public/img/logos/brazzers/thumbs/zzseries.png and b/public/img/logos/brazzers/thumbs/zzseries.png differ diff --git a/seeds/00_tags.js b/seeds/00_tags.js index 9a8e2180..d360d5d0 100644 --- a/seeds/00_tags.js +++ b/seeds/00_tags.js @@ -1681,6 +1681,10 @@ const aliases = [ name: 'red head', for: 'redhead', }, + { + name: 'riding', + for: 'cowgirl', + }, { name: 'ginger', for: 'redhead', diff --git a/src/media.js b/src/media.js index 72d9db77..f360137d 100644 --- a/src/media.js +++ b/src/media.js @@ -912,8 +912,8 @@ async function flushOrphanedMedia() { knex('actors').select(knex.raw('avatar_media_id as media_id')), knex('actors_profiles').select(knex.raw('avatar_media_id as media_id')), knex('actors_photos').select('media_id'), - knex('clips_photos').select('media_id'), - knex('clips_posters').select('media_id'), + knex('chapters_photos').select('media_id'), + knex('chapters_posters').select('media_id'), ) .as('associations'), ) diff --git a/src/releases.js b/src/releases.js index 5443c39d..6de5c366 100644 --- a/src/releases.js +++ b/src/releases.js @@ -45,6 +45,14 @@ function curateRelease(release, withMedia = false, withPoster = true) { name: tag.name, slug: tag.slug, })), + chapters: (release.chapters || []).map(chapter => ({ + id: chapter.id, + index: chapter.index, + time: chapter.time, + duration: chapter.duration, + title: chapter.title, + description: chapter.description, + })), ...((withMedia || withPoster) && { poster: release.poster ? { id: release.poster.id, @@ -80,7 +88,8 @@ function withRelations(queryBuilder, withMedia = false, withPoster = true) { row_to_json(entities) as entity, row_to_json(parents) as parent, COALESCE(json_agg(DISTINCT actors) FILTER (WHERE actors.id IS NOT NULL), '[]') as actors, - COALESCE(json_agg(DISTINCT tags) FILTER (WHERE tags.id IS NOT NULL), '[]') as tags + COALESCE(json_agg(DISTINCT tags) FILTER (WHERE tags.id IS NOT NULL), '[]') as tags, + COALESCE(json_agg(DISTINCT chapters) FILTER (WHERE chapters.id IS NOT NULL), '[]') as chapters `)) .leftJoin('entities', 'entities.id', 'releases.entity_id') .leftJoin('entities as parents', 'parents.id', 'entities.parent_id') @@ -88,6 +97,7 @@ function withRelations(queryBuilder, withMedia = false, withPoster = true) { .leftJoin('actors', 'actors.id', 'releases_actors.actor_id') .leftJoin('releases_tags', 'releases_tags.release_id', 'releases.id') .leftJoin('tags', 'tags.id', 'releases_tags.tag_id') + .leftJoin('chapters', 'chapters.release_id', 'releases.id') .groupBy(knex.raw(` releases.id, releases.entry_id, releases.shoot_id, releases.title, releases.url, releases.date, releases.description, releases.duration, releases.created_at, entities.id, parents.id @@ -166,10 +176,6 @@ async function deleteScenes(sceneIds) { } // there can be too many scene IDs for where in, causing a stack depth error - await knex('movies_scenes') - .whereRaw('scene_id = ANY(:sceneIds)', { sceneIds }) - .delete(); - const deleteCount = await knex('releases') .whereRaw('id = ANY(:sceneIds)', { sceneIds }) .delete(); diff --git a/src/scrapers/inthecrack.js b/src/scrapers/inthecrack.js index 8bef0ef9..39026586 100644 --- a/src/scrapers/inthecrack.js +++ b/src/scrapers/inthecrack.js @@ -172,7 +172,7 @@ async function scrapeScene({ query, html }, url, channel) { release.poster = qu.prefixUrl(html.match(/background-image: url\('(.*)'\)/)?.[1], channel.url); - release.clips = query.all('.ClipOuter').map((el) => { + release.chapters = query.all('.ClipOuter').map((el) => { const chapter = {}; chapter.title = query.text(el, 'h4'); diff --git a/src/scrapers/vixen.js b/src/scrapers/vixen.js index b4cc76f9..22086a40 100644 --- a/src/scrapers/vixen.js +++ b/src/scrapers/vixen.js @@ -213,6 +213,11 @@ async function scrapeScene(data, url, site, baseRelease) { const trailer = await getTrailer(scene, site, url); if (trailer) release.trailer = trailer; + release.chapters = data.video.chapters?.video.map(chapter => ({ + tags: [chapter.title], + time: chapter.seconds, + })); + return release; } diff --git a/src/store-releases.js b/src/store-releases.js index 9fec818c..082cc7b6 100644 --- a/src/store-releases.js +++ b/src/store-releases.js @@ -249,44 +249,47 @@ async function updateReleasesSearch(releaseIds) { } } -async function storeClips(releases) { - const clips = releases.map(release => release.clips?.map((clip, index) => ({ - title: clip.title, - description: clip.description, +async function storeChapters(releases) { + const chapters = releases.map(release => release.chapters?.map((chapter, index) => ({ releaseId: release.id, - clip: index + 1, - duration: clip.duration, - poster: clip.poster, - photos: clip.photos, - tags: clip.tags, + index: index + 1, + time: chapter.time, + duration: chapter.duration, + title: chapter.title, + description: chapter.description, + poster: chapter.poster, + photos: chapter.photos, + tags: chapter.tags, }))).flat().filter(Boolean); - const curatedClipEntries = clips.map(clip => ({ - title: clip.title, - description: clip.description, - duration: clip.duration, - release_id: clip.releaseId, - clip: clip.clip, + const curatedChapterEntries = chapters.map(chapter => ({ + index: chapter.index, + time: chapter.time, + duration: chapter.duration, + title: chapter.title, + description: chapter.description, + release_id: chapter.releaseId, })); - const storedClips = await bulkInsert('clips', curatedClipEntries, ['release_id', 'clip']); - const clipIdsByReleaseIdAndClip = storedClips.reduce((acc, clip) => ({ + const storedChapters = await bulkInsert('chapters', curatedChapterEntries, ['release_id', 'index']); + + const chapterIdsByReleaseIdAndChapter = storedChapters.reduce((acc, chapter) => ({ ...acc, - [clip.release_id]: { - ...acc[clip.release_id], - [clip.clip]: clip.id, + [chapter.release_id]: { + ...acc[chapter.release_id], + [chapter.index]: chapter.id, }, }), {}); - const clipsWithId = clips.map(clip => ({ - ...clip, - id: clipIdsByReleaseIdAndClip[clip.releaseId][clip.clip], + const chaptersWithId = chapters.map(chapter => ({ + ...chapter, + id: chapterIdsByReleaseIdAndChapter[chapter.releaseId][chapter.index], })); - await associateReleaseTags(clipsWithId, 'clip'); + await associateReleaseTags(chaptersWithId, 'chapter'); // media is more error-prone, associate separately - await associateReleaseMedia(clipsWithId, 'clip'); + await associateReleaseMedia(chaptersWithId, 'chapter'); } async function storeScenes(releases) { @@ -313,7 +316,7 @@ async function storeScenes(releases) { const [actors] = await Promise.all([ associateActors(releasesWithId, batchId), associateReleaseTags(releasesWithId), - storeClips(releasesWithId), + storeChapters(releasesWithId), ]); await updateReleasesSearch(releasesWithId.map(release => release.id)); diff --git a/src/utils/cf.js b/src/utils/cf.js new file mode 100644 index 00000000..f37318fa --- /dev/null +++ b/src/utils/cf.js @@ -0,0 +1,153 @@ +'use strict'; + +const arrayEqual = require('array-equal'); + +/* eslint-disable */ +function evaluateBranch(tree, modifiers) { + const result = tree.map((expression) => { + if (expression.type === 'group') { + return evaluateBranch(expression.values, expression.modifiers); + } if (expression.modifiers.length === 0) { + return ''; // This is a trigger to stringify the previous values + } if (arrayEqual(['plus'], expression.modifiers)) { + return 0; + } if (arrayEqual(['negate', 'negate'], expression.modifiers)) { + return true; + } if (arrayEqual(['negate', 'plus'], expression.modifiers)) { + return true; + } if (arrayEqual(['plus', 'plus', 'negate'], expression.modifiers)) { + return true; + } if (arrayEqual(['plus', 'negate', 'negate'], expression.modifiers)) { + return 1; + } + throw new Error(`Found unrecognized modifier pattern: ${expression.modifiers}`); + }).reduce((combined, value) => { + if (value === '') { + return combined.toString(); + } + if (value === true) { + value = 1; + } + + if (typeof combined === 'string') { + return combined + value.toString(); + } + return combined + value; + }, 0); + + if (modifiers == null) { + return result; + } + if (arrayEqual(['plus'], modifiers)) { + return parseInt(result); + } + return result; +} + +function evaluate(tree) { + return evaluateBranch(tree); +} + +function parse(string) { + const length = string.length; + let byte; + + let stateFinishedItem = false; + const modifierStack = [[]]; + const itemStack = [[]]; + let currentStack = itemStack[0]; + let currentModifiers = modifierStack[0]; + let stackLevel = 0; + + for (let pos = 0; pos < length; pos++) { + byte = string[pos]; + + switch (byte) { + case '+': + if (pos === 0 || stateFinishedItem === false) { + // Modifier / number-cast + currentModifiers.push('plus'); + stateFinishedItem = false; + } else { + // Addition, we don't need to do anything here + } + break; + case '!': + stateFinishedItem = false; + currentModifiers.push('negate'); + break; + case '(': + stateFinishedItem = false; + stackLevel++; + itemStack[stackLevel] = currentStack = []; + modifierStack[stackLevel] = currentModifiers = []; + break; + case ')': + if (stackLevel === 0) { + throw new Error('Encountered ) without matching ('); + } + + stackLevel--; + stateFinishedItem = true; + + currentStack = itemStack[stackLevel]; + currentStack.push({ + type: 'group', + values: itemStack[stackLevel + 1], + modifiers: modifierStack[stackLevel], + }); + + currentModifiers = modifierStack[stackLevel] = []; + break; + case '[': + if (string[pos + 1] === ']') { + // Reached the brackets; end of the modifier sequence + currentStack.push({ + type: 'brackets', + modifiers: currentModifiers, + }); + + currentModifiers = []; + pos += 1; // Skip over the closing bracket + stateFinishedItem = true; + } else { + throw new Error(`Invalid byte found; expected ] but got ${string[pos + 1]}`); + } + } + } + + return itemStack[0]; +} + +function parseExpression(string) { + return evaluate(parse(string)); +} + +function findAll(regex, target) { + const results = []; let + match; + + while (match = regex.exec(target)) { + results.push(match); + } + + return results; +} + +function cf(testcase) { + let [_, parent, child, initialExpression] = /var s,t,o,p,b,r,e,a,k,i,n,g,f,\s*([a-zA-Z]+)={"([a-zA-Z]+)":([^}]+)};/.exec(testcase); + + const modifyingExpressions = findAll(new RegExp(`${parent}\.${child}\s*([*+-])=\s*([^;]+)`, 'g'), testcase).map(match => ({ + operation: match[1], + expression: match[2], + })).map(({ operation, expression }) => ({ + operation, + expression: parseExpression(expression), + })); + + initialExpression = parseExpression(initialExpression); + + return { parent, child, initialExpression, modifyingExpressions }; +}; + +module.exports = cf;