Compare commits

..

4 Commits

Author SHA1 Message Date
DebaucheryLibrarian 4ca07631c7 1.203.8 2021-12-05 23:59:20 +01:00
DebaucheryLibrarian ec4e7bc12a Updated Jules Jordan scraper for Sperm Swallowers and The Ass Factory. 2021-12-05 23:59:17 +01:00
DebaucheryLibrarian 26d15c0a6f Updated Jules Jordan scraper for Manuel Ferrara and Girl Girl. 2021-12-05 23:43:23 +01:00
DebaucheryLibrarian a484396db4 Hiding scenes with missing dates from network overview. Using computed effective date column. 2021-12-05 23:29:27 +01:00
5 changed files with 15 additions and 45 deletions

View File

@ -22,8 +22,6 @@ function initEntitiesActions(store, router) {
$offset: Int = 0,
$after: Datetime = "1900-01-01",
$before: Datetime = "2100-01-01",
$afterTime: Datetime = "1900-01-01",
$beforeTime: Datetime = "2100-01-01",
$orderBy: [ReleasesOrderBy!]
$exclude: [String!]
$hasAuth: Boolean!
@ -91,20 +89,19 @@ function initEntitiesActions(store, router) {
or: [
{
date: {
lessThan: $before,
greaterThan: $after
isNull: ${entityType === 'channel'}
}
}
},
{
date: {
isNull: true
},
createdAt: {
lessThan: $beforeTime,
greaterThan: $afterTime,
isNull: false
}
}
]
effectiveDate: {
lessThan: $before,
greaterThan: $after
}
releasesTagsConnection: {
none: {
tag: {
@ -131,8 +128,6 @@ function initEntitiesActions(store, router) {
after,
before,
orderBy,
afterTime: store.getters.after,
beforeTime: store.getters.before,
exclude: store.state.ui.tagFilter,
hasAuth: !!store.state.auth.user,
userId: store.state.auth.user?.id,

View File

@ -3,30 +3,6 @@ import dayjs from 'dayjs';
dayjs.extend(utc);
const dateRanges = {
latest: () => ({
after: '1900-01-01',
before: dayjs.utc().toDate(),
orderBy: ['DATE_DESC', 'CREATED_AT_DESC'],
}),
upcoming: () => ({
after: dayjs.utc().toDate(),
before: '2100-01-01',
orderBy: ['DATE_ASC', 'CREATED_AT_ASC'],
}),
new: () => ({
after: '1900-01-01 00:00:00',
before: '2100-01-01',
orderBy: ['CREATED_AT_DESC', 'DATE_ASC'],
}),
all: () => ({
after: '1900-01-01',
before: '2100-01-01',
orderBy: ['DATE_DESC', 'CREATED_AT_DESC'],
}),
};
/* requires PostgreSQL 12.x> not available in production yet
const dateRanges = {
latest: () => ({
after: '1900-01-01',
@ -49,7 +25,6 @@ const dateRanges = {
orderBy: ['EFFECTIVE_DATE_DESC'],
}),
};
*/
function getDateRange(range) {
return (dateRanges[range] || dateRanges.all)();

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "traxxx",
"version": "1.203.7",
"version": "1.203.8",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "traxxx",
"version": "1.203.7",
"version": "1.203.8",
"license": "ISC",
"dependencies": {
"@casl/ability": "^5.2.2",

View File

@ -1,6 +1,6 @@
{
"name": "traxxx",
"version": "1.203.7",
"version": "1.203.8",
"description": "All the latest porn releases in one place",
"main": "src/app.js",
"scripts": {

View File

@ -136,15 +136,15 @@ function getEntryId(html) {
function scrapeAll(scenes, site, entryIdFromTitle) {
return scenes.map(({ el, query }) => {
const release = {};
const title = query.cnt('.content_img div, .dvd_info > a, a ~ a');
const title = query.cnt('.content_img div, .dvd_info > a, a.update_title, a[title] + a[title]') || query.cnt('a[title*=" "]');
release.title = title.slice(0, title.match(/starring:/i)?.index || Infinity).trim();
release.url = query.url('.content_img a, .dvd_info > a, a ~ a');
release.title = title?.slice(0, title.match(/starring:/i)?.index || Infinity).trim();
release.url = query.url('.content_img a, .dvd_info > a, a.update_title, a[title*=" "]');
release.date = query.date('.update_date', 'MM/DD/YYYY');
release.entryId = (entryIdFromTitle && slugify(release.title)) || el.dataset.setid || query.q('.rating_box')?.dataset.id;
release.actors = query.all('.content_img .update_models a').map((actorEl) => ({
release.actors = query.all('.content_img .update_models a, .update_models a').map((actorEl) => ({
name: query.cnt(actorEl),
url: query.url(actorEl, null),
}));
@ -319,7 +319,7 @@ function scrapeMovie({ el, query }, url, site) {
?.map((scene) => ({ ...scene, movie }))
.sort((sceneA, sceneB) => sceneA.date - sceneB.date);
movie.date = curatedScenes?.[0].date;
movie.date = curatedScenes?.[0]?.date;
return {
...movie,