Added Jay Rock network. Fixed site logo not showing up without URL.

This commit is contained in:
ThePendulum 2020-01-11 05:31:04 +01:00
parent 1c0030b9f3
commit 8f72e61928
14 changed files with 61 additions and 33 deletions

View File

@ -175,7 +175,7 @@ export default {
}
.releases {
padding: 1rem;
padding: 1rem 1rem 1rem .5rem;
}
.sidebar {

View File

@ -13,6 +13,16 @@
<ReleaseTile :release="release" />
</li>
</ul>
<span
v-if="releases.length === 0 && range !== 'all'"
class="empty"
>No {{ range }} releases</span>
<span
v-else-if="releases.length === 0"
class="empty"
>No recent or upcoming releases</span>
</div>
</template>
@ -62,6 +72,11 @@ export default {
grid-gap: 1rem;
}
.empty {
color: $shadow-strong;
font-weight: bold;
}
@media(max-width: $breakpoint4) {
.tiles {
grid-template-columns: repeat(auto-fit, minmax(20rem, .5fr));

View File

@ -7,8 +7,7 @@
<div class="header">
<a
v-if="site.url"
v-tooltip.bottom="`Go to ${site.url}`"
v-tooltip.bottom="site.url && `Go to ${site.url}`"
:href="site.url"
target="_blank"
rel="noopener noreferrer"

View File

@ -4,6 +4,7 @@
<li
v-for="site in sites"
:key="`site-${site.id}`"
class="site"
>
<SiteTile :site="site" />
</li>
@ -70,9 +71,10 @@ export default {
padding: 1rem;
grid-template-columns: 1fr;
overflow-y: auto;
scrollbar-color: $highlight-weak $profile;
}
.tile {
.site {
/* vertical grid-gap not compatible with bottom padding on scrolling containers */
margin: 0 0 1rem 0;
}

View File

@ -3,7 +3,7 @@
class="tile"
:class="{ movie: release.type === 'movie' }"
>
<span class="banner">
<span class="poster">
<span class="details">
<router-link
v-if="release.site.independent"
@ -149,14 +149,14 @@ export default {
height: 100%;
}
.banner {
.poster {
position: relative;
margin: 0 0 .5rem 0;
}
.thumbnail {
width: 100%;
height: 12rem;
height: 14rem;
display: flex;
justify-content: center;
align-items: center;

View File

@ -114,13 +114,13 @@
box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);
height: 100%;
}
.banner[data-v-3abcf101] {
.poster[data-v-3abcf101] {
position: relative;
margin: 0 0 .5rem 0;
}
.thumbnail[data-v-3abcf101] {
width: 100%;
height: 12rem;
height: 14rem;
display: -webkit-box;
display: flex;
-webkit-box-pack: center;
@ -281,6 +281,10 @@
grid-template-columns: repeat(auto-fit, minmax(20rem, 0.33fr));
grid-gap: 1rem;
}
.empty[data-v-22ffe3e4] {
color: rgba(0, 0, 0, 0.7);
font-weight: bold;
}
@media (max-width: 1500px) {
.tiles[data-v-22ffe3e4] {
grid-template-columns: repeat(auto-fit, minmax(20rem, 0.5fr));
@ -685,8 +689,9 @@
padding: 1rem;
grid-template-columns: 1fr;
overflow-y: auto;
scrollbar-color: rgba(255, 255, 255, 0.2) #222;
}
.tile[data-v-7bebaa3e] {
.site[data-v-7bebaa3e] {
/* vertical grid-gap not compatible with bottom padding on scrolling containers */
margin: 0 0 1rem 0;
}
@ -724,7 +729,7 @@
padding: 0;
}
.releases[data-v-e2e12602] {
padding: 1rem;
padding: 1rem 1rem 1rem .5rem;
}
.sidebar[data-v-e2e12602] {
background: #222;

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View File

@ -53,7 +53,7 @@ const networks = [
{
slug: 'jayrock',
name: 'JayRock Productions',
url: 'https://www.jayrockcontent.com',
url: 'http://jayrockcontent.com',
},
{
slug: 'julesjordan',

View File

@ -1146,7 +1146,13 @@ function getSites(networksMap) {
{
slug: 'jayspov',
name: 'Jay\'s POV',
url: 'https://www.jayspov.net',
url: 'https://jayspov.net',
network_id: networksMap.jayrock,
},
{
slug: 'cospimps',
name: 'CosPimps',
url: 'https://cospimps.com',
network_id: networksMap.jayrock,
},
// JULES JORDAN

View File

@ -405,8 +405,6 @@ async function associateActors(mappedActors, releases) {
knex('releases_actors').whereIn('release_id', releases.map(release => release.id)),
]);
console.log(mappedActors);
const associations = await Promise.map(Object.entries(mappedActors), async ([actorName, releaseIds]) => {
try {
const actorEntry = existingActorEntries.find(actor => actor.name === actorName)

View File

@ -115,8 +115,8 @@ async function scrapeScene(html, url, site) {
const playerObject = videoScript.slice(videoScript.indexOf('{'), videoScript.indexOf('};') + 1);
const playerData = JSON.parse(playerObject);
const workName = data.isPartOf.name.split(' - ');
const shootId = workName.length > 1 ? workName[1] : null;
// const workName = data.isPartOf.name.split(' - ');
// const shootId = workName.length > 1 ? workName[1] : null;
const entryId = url.split('/').slice(-1)[0];
const title = data.title || $('meta[name="twitter:title"]').attr('content');
const description = data.description || $('meta[name="twitter:description"]').attr('content');
@ -139,7 +139,7 @@ async function scrapeScene(html, url, site) {
return {
url,
shootId,
// shootId,
entryId,
title,
description,

View File

@ -1,12 +1,13 @@
'use strict';
/* example for other ModelCentro scrapers */
const Promise = require('bluebird');
const bhttp = require('bhttp');
const slugify = require('../utils/slugify');
async function fetchToken() {
const res = await bhttp.get('https://jayspov.net/activity');
async function fetchToken(site) {
const res = await bhttp.get(site.url);
const html = res.body.toString();
const time = html.match(/"aet":\d+/)[0].split(':')[1];
@ -16,8 +17,8 @@ async function fetchToken() {
return { time, token };
}
async function fetchActors(entryId, { token, time }) {
const url = `https://jayspov.net/sapi/${token}/${time}/model.getModelContent?_method=model.getModelContent&tz=1&fields[0]=modelId.stageName&fields[1]=_last&fields[2]=modelId.upsellLink&fields[3]=modelId.upsellText&limit=25&transitParameters[contentId]=${entryId}`;
async function fetchActors(entryId, site, { token, time }) {
const url = `${site.url}/sapi/${token}/${time}/model.getModelContent?_method=model.getModelContent&tz=1&fields[0]=modelId.stageName&fields[1]=_last&fields[2]=modelId.upsellLink&fields[3]=modelId.upsellText&limit=25&transitParameters[contentId]=${entryId}`;
const res = await bhttp.get(url);
if (res.statusCode === 200 && res.body.status === true) {
@ -27,8 +28,8 @@ async function fetchActors(entryId, { token, time }) {
return [];
}
async function fetchTrailerLocation(entryId) {
const url = `https://jayspov.net/api/download/${entryId}/hd1080/stream`;
async function fetchTrailerLocation(entryId, site) {
const url = `${site.url}/api/download/${entryId}/hd1080/stream`;
const res = await bhttp.get(url, {
followRedirects: false,
});
@ -49,7 +50,7 @@ async function scrapeScene(scene, site, tokens) {
site,
};
release.url = `https://jayspov.net/scene/${release.entryId}/${slugify(release.title, true)}`;
release.url = `${site.url}/scene/${release.entryId}/${slugify(release.title, true)}`;
release.date = new Date(scene.sites.collection[scene.id].publishDate);
release.poster = scene._resources.primary[0].url;
@ -57,8 +58,8 @@ async function scrapeScene(scene, site, tokens) {
if (scene._resources.base) release.photos = scene._resources.base.map(resource => resource.url);
const [actors, trailer] = await Promise.all([
fetchActors(release.entryId, tokens),
fetchTrailerLocation(release.entryId),
fetchActors(release.entryId, site, tokens),
fetchTrailerLocation(release.entryId, site),
]);
release.actors = actors;
@ -72,9 +73,10 @@ function scrapeLatest(scenes, site, tokens) {
}
async function fetchLatest(site) {
const { time, token } = await fetchToken();
const { time, token } = await fetchToken(site);
const url = `https://jayspov.net/sapi/${token}/${time}/content.load?fields[0]=generatedContentLink&fields[1]=cName&fields[2]=title&fields[3]=_resources.primary.url&fields[4]=sites.publishDate&fields[5]=type&fields[6]=_resources.base.url&fields[7]=_resources.base&fields[8]=length&limit=7&metaFields[resources][thumb]=baseline.sprite.w225i&transitParameters[showOnHome]=true&transitParameters[v1]=OhUOlmasXD&transitParameters[v2]=OhUOlmasXD&transitParameters[preset]=videos`;
// transParameters[v1] includes _resources, [v2] includes photos, [preset] is mandatory
const url = `${site.url}/sapi/${token}/${time}/content.load?limit=20&transitParameters[v1]=OhUOlmasXD&transitParameters[v2]=OhUOlmasXD&transitParameters[preset]=videos`;
const res = await bhttp.get(url);
if (res.statusCode === 200 && res.body.status) {
@ -85,11 +87,12 @@ async function fetchLatest(site) {
}
async function fetchScene(url, site, release) {
const { time, token } = release?.tokens || await fetchToken(); // use attached tokens when deep fetching
const { time, token } = release?.tokens || await fetchToken(site); // use attached tokens when deep fetching
const { pathname } = new URL(url);
const entryId = pathname.split('/')[2];
const res = await bhttp.get(`https://jayspov.net/sapi/${token}/${time}/content.load?_method=content.load&tz=1&filter[id][fields][0]=id&filter[id][values][0]=${entryId}&fields[0]=type&fields[1]=title&fields[2]=sites.publishDate&fields[3]=member&fields[4]=id&fields[5]=tags._last&fields[6]=tags.alias&fields[7]=tags&fields[8]=description&fields[9]=related.relatedContentId.id&fields[10]=related.relatedContentId.title&fields[11]=siteProps.ubs.joinUrl&fields[12]=extender.contentId&fields[13]=vr&fields[14]=backLinkProp.value&fields[15]=backLinkProp.public&limit=1&transitParameters[v1]=ykYa8ALmUD&transitParameters[preset]=scene`);
const apiUrl = `${site.url}/sapi/${token}/${time}/content.load?filter[id][fields][0]=id&filter[id][values][0]=${entryId}&transitParameters[v1]=ykYa8ALmUD&transitParameters[preset]=scene`;
const res = await bhttp.get(apiUrl);
if (res.statusCode === 200 && res.body.status) {
return scrapeScene(res.body.response.collection[0], site, { time, token });

View File

@ -7,7 +7,7 @@ const bangbros = require('./bangbros');
const blowpass = require('./blowpass');
const dogfart = require('./dogfart');
const evilangel = require('./evilangel');
const jayspov = require('./jayspov');
const jayrock = require('./jayrock');
const kink = require('./kink');
const mikeadriano = require('./mikeadriano');
const mofos = require('./mofos');
@ -41,7 +41,7 @@ module.exports = {
dogfart,
dogfartnetwork: dogfart,
evilangel,
jayspov,
jayrock,
julesjordan,
kellymadison,
kink,