forked from DebaucheryLibrarian/traxxx
Added periodic memory logger.
This commit is contained in:
@@ -5,7 +5,7 @@ $breakpoint3: 1200px;
|
||||
$breakpoint4: 1500px;
|
||||
|
||||
:root {
|
||||
--primary: #c63971;
|
||||
--primary: #e33379;
|
||||
--primary-strong: #f90071;
|
||||
--primary-faded: #ffcce4;
|
||||
|
||||
@@ -46,7 +46,7 @@ $breakpoint4: 1500px;
|
||||
--logo-shadow: drop-shadow(1px 0 0 $shadow-weak) drop-shadow(-1px 0 0 $shadow-weak) drop-shadow(0 1px 0 $shadow-weak) drop-shadow(0 -1px 0 $shadow-weak);
|
||||
--logo-highlight: drop-shadow(0 0 1px $highlight);
|
||||
|
||||
--info: #361723;
|
||||
--info: #321b24;
|
||||
|
||||
--male: #0af;
|
||||
--female: #f0a;
|
||||
|
||||
@@ -281,7 +281,7 @@ function initActorActions(store, router) {
|
||||
|
||||
return {
|
||||
actor: curateActor(actor, null, curateRelease),
|
||||
releases: actor.scenesConnection.releases.map(release => curateRelease(release)),
|
||||
releases: actor.scenesConnection.releases.map((release) => curateRelease(release)),
|
||||
totalCount: actor.scenesConnection.totalCount,
|
||||
};
|
||||
}
|
||||
@@ -429,7 +429,7 @@ function initActorActions(store, router) {
|
||||
});
|
||||
|
||||
return {
|
||||
actors: actors.map(actor => curateActor(actor)),
|
||||
actors: actors.map((actor) => curateActor(actor)),
|
||||
totalCount,
|
||||
countries,
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
function favoritesStash(state) {
|
||||
return state.user.stashes.find(stash => stash.slug === 'favorites');
|
||||
return state.user.stashes.find((stash) => stash.slug === 'favorites');
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
||||
@@ -31,8 +31,8 @@ function curateActor(actor, release) {
|
||||
|
||||
if (actor.profiles) {
|
||||
const photos = actor.profiles
|
||||
.map(profile => ({ entity: profile.entity, ...profile.avatar }))
|
||||
.filter(avatar => avatar.id && (!curatedActor.avatar || avatar.hash !== curatedActor.avatar.hash));
|
||||
.map((profile) => ({ entity: profile.entity, ...profile.avatar }))
|
||||
.filter((avatar) => avatar.id && (!curatedActor.avatar || avatar.hash !== curatedActor.avatar.hash));
|
||||
|
||||
const descriptions = actor.profiles.reduce((acc, profile) => ({
|
||||
...acc,
|
||||
@@ -57,10 +57,10 @@ function curateActor(actor, release) {
|
||||
}
|
||||
|
||||
if (actor.stashes) {
|
||||
curatedActor.stashes = actor.stashes.filter(Boolean).map(stash => curateStash(stash.stash || stash)); // eslint-disable-line no-use-before-define
|
||||
curatedActor.stashes = actor.stashes.filter(Boolean).map((stash) => curateStash(stash.stash || stash)); // eslint-disable-line no-use-before-define
|
||||
}
|
||||
|
||||
curatedActor.stashes = actor.stashes?.map(stash => stash.stash || stash) || [];
|
||||
curatedActor.stashes = actor.stashes?.map((stash) => stash.stash || stash) || [];
|
||||
|
||||
return curatedActor;
|
||||
}
|
||||
@@ -70,21 +70,21 @@ function curateRelease(release) {
|
||||
...release,
|
||||
actors: [],
|
||||
poster: release.poster && release.poster.media,
|
||||
tags: release.tags ? release.tags.map(tag => tag.tag || tag) : [],
|
||||
tags: release.tags ? release.tags.map((tag) => tag.tag || tag) : [],
|
||||
};
|
||||
|
||||
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.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.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;
|
||||
if (release.teaser) curatedRelease.teaser = release.teaser.media;
|
||||
if (release.actors) curatedRelease.actors = release.actors.filter(Boolean).map(actor => curateActor(actor.actor || actor, curatedRelease));
|
||||
if (release.directors) curatedRelease.directors = release.directors.filter(Boolean).map(director => curateActor(director.director || director, curatedRelease));
|
||||
if (release.actors) curatedRelease.actors = release.actors.filter(Boolean).map((actor) => curateActor(actor.actor || actor, curatedRelease));
|
||||
if (release.directors) curatedRelease.directors = release.directors.filter(Boolean).map((director) => curateActor(director.director || director, curatedRelease));
|
||||
if (release.movieTags && release.movieTags.length > 0) curatedRelease.tags = release.movieTags.filter(Boolean).map(({ tag }) => tag);
|
||||
if (release.movieActors && release.movieActors.length > 0) curatedRelease.actors = release.movieActors.filter(Boolean).map(({ actor }) => curateActor(actor, curatedRelease));
|
||||
if (release.stashes) curatedRelease.stashes = release.stashes.filter(Boolean).map(stash => curateStash(stash.stash || stash)); // eslint-disable-line no-use-before-define
|
||||
if (release.stashes) curatedRelease.stashes = release.stashes.filter(Boolean).map((stash) => curateStash(stash.stash || stash)); // eslint-disable-line no-use-before-define
|
||||
|
||||
if (release.productionLocation) {
|
||||
curatedRelease.productionLocation = {
|
||||
@@ -108,14 +108,14 @@ function curateEntity(entity, parent, releases) {
|
||||
|
||||
if (entity.children) {
|
||||
if (entity.children.nodes) {
|
||||
curatedEntity.children = entity.children.nodes.map(childEntity => curateEntity(childEntity, curatedEntity));
|
||||
curatedEntity.children = entity.children.nodes.map((childEntity) => curateEntity(childEntity, curatedEntity));
|
||||
}
|
||||
|
||||
curatedEntity.childrenTotal = entity.children.totalCount;
|
||||
}
|
||||
|
||||
if (entity.parent || parent) curatedEntity.parent = curateEntity(entity.parent || parent);
|
||||
if (releases) curatedEntity.releases = releases.map(release => curateRelease(release));
|
||||
if (releases) curatedEntity.releases = releases.map((release) => curateRelease(release));
|
||||
|
||||
if (entity.connection) {
|
||||
curatedEntity.sceneTotal = entity.connection.totalCount;
|
||||
@@ -142,7 +142,7 @@ function curateStash(stash) {
|
||||
|
||||
if (stash.scenes || stash.scenesConnection?.scenes) {
|
||||
curatedStash.sceneTotal = stash.scenesConnection?.totalCount || null;
|
||||
curatedStash.scenes = (stash.scenesConnection?.scenes || stash.scenes).map(item => ({
|
||||
curatedStash.scenes = (stash.scenesConnection?.scenes || stash.scenes).map((item) => ({
|
||||
...item,
|
||||
scene: curateRelease(item.scene),
|
||||
}));
|
||||
@@ -150,7 +150,7 @@ function curateStash(stash) {
|
||||
|
||||
if (stash.actors || stash.actorsConnection?.actors) {
|
||||
curatedStash.actorTotal = stash.actorsConnection?.totalCount || null;
|
||||
curatedStash.actors = (stash.actorsConnection?.actors || stash.actors).map(item => ({
|
||||
curatedStash.actors = (stash.actorsConnection?.actors || stash.actors).map((item) => ({
|
||||
...item,
|
||||
actor: curateActor(item.actor),
|
||||
}));
|
||||
@@ -158,7 +158,7 @@ function curateStash(stash) {
|
||||
|
||||
if (stash.movies || stash.moviesConnection?.movies) {
|
||||
curatedStash.movieTotal = stash.moviesConnection?.totalCount || null;
|
||||
curatedStash.movies = (stash.moviesConnection?.movies || stash.movies).map(item => ({
|
||||
curatedStash.movies = (stash.moviesConnection?.movies || stash.movies).map((item) => ({
|
||||
...item,
|
||||
movie: curateRelease(item.movie),
|
||||
}));
|
||||
@@ -175,11 +175,11 @@ function curateAlert(alert) {
|
||||
const curatedAlert = alert;
|
||||
|
||||
if (alert.actors) {
|
||||
curatedAlert.actors = alert.actors.map(actor => curateActor(actor.actor || actor));
|
||||
curatedAlert.actors = alert.actors.map((actor) => curateActor(actor.actor || actor));
|
||||
}
|
||||
|
||||
if (alert.tags) {
|
||||
curatedAlert.tags = alert.tags.map(tag => curateTag(tag.tag || tag));
|
||||
curatedAlert.tags = alert.tags.map((tag) => curateTag(tag.tag || tag));
|
||||
}
|
||||
|
||||
if (alert.entity) {
|
||||
@@ -187,7 +187,7 @@ function curateAlert(alert) {
|
||||
}
|
||||
|
||||
if (alert.stashes) {
|
||||
curatedAlert.stashes = alert.stashes.map(stash => curateStash(stash.stash || stash));
|
||||
curatedAlert.stashes = alert.stashes.map((stash) => curateStash(stash.stash || stash));
|
||||
}
|
||||
|
||||
return curatedAlert;
|
||||
@@ -201,11 +201,11 @@ function curateUser(user) {
|
||||
const curatedUser = user;
|
||||
|
||||
if (user.stashes) {
|
||||
curatedUser.stashes = user.stashes.map(stash => curateStash(stash.stash || stash));
|
||||
curatedUser.stashes = user.stashes.map((stash) => curateStash(stash.stash || stash));
|
||||
}
|
||||
|
||||
if (user.alerts) {
|
||||
curatedUser.alerts = user.alerts.map(alert => curateAlert(alert.alert || alert));
|
||||
curatedUser.alerts = user.alerts.map((alert) => curateAlert(alert.alert || alert));
|
||||
}
|
||||
|
||||
return curatedUser;
|
||||
|
||||
@@ -212,7 +212,7 @@ function initEntitiesActions(store, router) {
|
||||
entitySlugs,
|
||||
});
|
||||
|
||||
return entities.map(entity => curateEntity(entity));
|
||||
return entities.map((entity) => curateEntity(entity));
|
||||
}
|
||||
|
||||
async function searchEntities({ _commit }, { query, limit = 20 }) {
|
||||
@@ -246,7 +246,7 @@ function initEntitiesActions(store, router) {
|
||||
limit,
|
||||
});
|
||||
|
||||
return entities.map(entity => curateEntity(entity));
|
||||
return entities.map((entity) => curateEntity(entity));
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
@@ -5,7 +5,7 @@ export function formatDuration(duration, forceHours) {
|
||||
const minutes = Math.floor((duration % 3600) / 60);
|
||||
const seconds = Math.floor(duration % 60);
|
||||
|
||||
const [formattedHours, formattedMinutes, formattedSeconds] = [hours, minutes, seconds].map(segment => segment.toString().padStart(2, '0'));
|
||||
const [formattedHours, formattedMinutes, formattedSeconds] = [hours, minutes, seconds].map((segment) => segment.toString().padStart(2, '0'));
|
||||
|
||||
if (duration >= 3600 || forceHours) {
|
||||
return `${formattedHours}:${formattedMinutes}:${formattedSeconds}`;
|
||||
|
||||
@@ -260,7 +260,7 @@ const releaseTagsFragment = `
|
||||
`;
|
||||
|
||||
const releasePosterFragment = `
|
||||
poster: releasesPosterByReleaseId {
|
||||
poster: releasesPoster {
|
||||
media {
|
||||
id
|
||||
index
|
||||
@@ -335,7 +335,7 @@ const releasePhotosFragment = `
|
||||
`;
|
||||
|
||||
const releaseTrailerFragment = `
|
||||
trailer: releasesTrailerByReleaseId {
|
||||
trailer: releasesTrailer {
|
||||
media {
|
||||
id
|
||||
index
|
||||
@@ -349,7 +349,7 @@ const releaseTrailerFragment = `
|
||||
`;
|
||||
|
||||
const releaseTeaserFragment = `
|
||||
teaser: releasesTeaserByReleaseId {
|
||||
teaser: releasesTeaser {
|
||||
media {
|
||||
id
|
||||
index
|
||||
@@ -487,7 +487,7 @@ const releaseFragment = `
|
||||
slug
|
||||
}
|
||||
}
|
||||
poster: chaptersPosterByChapterId {
|
||||
poster: chaptersPoster {
|
||||
media {
|
||||
id
|
||||
index
|
||||
|
||||
@@ -109,6 +109,10 @@ async function init() {
|
||||
document.title = 'traxxx';
|
||||
},
|
||||
},
|
||||
beforeCreate() {
|
||||
this.uid = uid;
|
||||
uid += 1;
|
||||
},
|
||||
methods: {
|
||||
formatDate,
|
||||
formatDuration,
|
||||
@@ -117,10 +121,6 @@ async function init() {
|
||||
getPath,
|
||||
getBgPath: (media, type) => `url(${getPath(media, type)})`,
|
||||
},
|
||||
beforeCreate() {
|
||||
this.uid = uid;
|
||||
uid += 1;
|
||||
},
|
||||
});
|
||||
|
||||
app.directive('tooltip', {
|
||||
|
||||
@@ -37,7 +37,7 @@ function initReleasesActions(store, router) {
|
||||
});
|
||||
|
||||
return {
|
||||
releases: releases.map(release => curateRelease(release)),
|
||||
releases: releases.map((release) => curateRelease(release)),
|
||||
totalCount,
|
||||
};
|
||||
}
|
||||
@@ -99,7 +99,7 @@ function initReleasesActions(store, router) {
|
||||
});
|
||||
|
||||
return {
|
||||
movies: movies.map(release => curateRelease(release)),
|
||||
movies: movies.map((release) => curateRelease(release)),
|
||||
totalCount,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ const routes = [
|
||||
{
|
||||
path: '/actor/:actorId/:actorSlug',
|
||||
name: 'actor',
|
||||
redirect: from => ({
|
||||
redirect: (from) => ({
|
||||
name: 'actorRange',
|
||||
params: {
|
||||
...from.params,
|
||||
@@ -91,7 +91,7 @@ const routes = [
|
||||
{
|
||||
path: '/director/:actorId/:actorSlug',
|
||||
name: 'director',
|
||||
redirect: from => ({
|
||||
redirect: (from) => ({
|
||||
name: 'directorRange',
|
||||
params: {
|
||||
...from.params,
|
||||
@@ -107,7 +107,7 @@ const routes = [
|
||||
},
|
||||
{
|
||||
path: '/channel/:entitySlug',
|
||||
redirect: from => ({
|
||||
redirect: (from) => ({
|
||||
name: 'channel',
|
||||
params: {
|
||||
...from.params,
|
||||
@@ -123,7 +123,7 @@ const routes = [
|
||||
},
|
||||
{
|
||||
path: '/network/:entitySlug',
|
||||
redirect: from => ({
|
||||
redirect: (from) => ({
|
||||
name: 'network',
|
||||
params: {
|
||||
...from.params,
|
||||
@@ -139,7 +139,7 @@ const routes = [
|
||||
},
|
||||
{
|
||||
path: '/studio/:entitySlug',
|
||||
redirect: from => ({
|
||||
redirect: (from) => ({
|
||||
name: 'studio',
|
||||
params: {
|
||||
...from.params,
|
||||
@@ -155,7 +155,7 @@ const routes = [
|
||||
},
|
||||
{
|
||||
path: '/tag/:tagSlug',
|
||||
redirect: from => ({
|
||||
redirect: (from) => ({
|
||||
name: 'tag',
|
||||
params: {
|
||||
...from.params,
|
||||
@@ -171,7 +171,7 @@ const routes = [
|
||||
},
|
||||
{
|
||||
path: '/actors',
|
||||
redirect: from => ({
|
||||
redirect: (from) => ({
|
||||
name: 'actors',
|
||||
params: {
|
||||
...from.params,
|
||||
@@ -229,7 +229,7 @@ const routes = [
|
||||
},
|
||||
{
|
||||
path: '/stash/:stashId/:stashSlug',
|
||||
redirect: from => ({
|
||||
redirect: (from) => ({
|
||||
name: 'stash',
|
||||
params: {
|
||||
...from.params,
|
||||
|
||||
@@ -35,7 +35,7 @@ function initTagsActions(store, _router) {
|
||||
name
|
||||
slug
|
||||
}
|
||||
poster: tagsPosterByTagId {
|
||||
poster: tagsPoster {
|
||||
media {
|
||||
id
|
||||
thumbnail
|
||||
@@ -188,14 +188,14 @@ function initTagsActions(store, _router) {
|
||||
before,
|
||||
orderBy,
|
||||
offset: Math.max(0, (pageNumber - 1)) * limit,
|
||||
exclude: store.state.ui.tagFilter.filter(tagFilter => tagFilter !== tagSlug),
|
||||
exclude: store.state.ui.tagFilter.filter((tagFilter) => tagFilter !== tagSlug),
|
||||
hasAuth: !!store.state.auth.user,
|
||||
userId: store.state.auth.user?.id,
|
||||
});
|
||||
|
||||
return {
|
||||
tag: curateTag(tagBySlug, null, curateRelease),
|
||||
releases: tagBySlug.scenesConnection.releases.map(release => curateRelease(release)),
|
||||
releases: tagBySlug.scenesConnection.releases.map((release) => curateRelease(release)),
|
||||
totalCount: tagBySlug.scenesConnection.totalCount,
|
||||
};
|
||||
}
|
||||
@@ -218,7 +218,7 @@ function initTagsActions(store, _router) {
|
||||
id
|
||||
name
|
||||
slug
|
||||
poster: tagsPosterByTagId {
|
||||
poster: tagsPoster {
|
||||
media {
|
||||
thumbnail
|
||||
comment
|
||||
@@ -259,7 +259,7 @@ function initTagsActions(store, _router) {
|
||||
limit,
|
||||
});
|
||||
|
||||
return tags.map(tag => curateTag(tag, store.state.ui.sfw));
|
||||
return tags.map((tag) => curateTag(tag, store.state.ui.sfw));
|
||||
}
|
||||
|
||||
async function searchTags({ _commit }, {
|
||||
@@ -325,7 +325,7 @@ function initTagsActions(store, _router) {
|
||||
minLength,
|
||||
});
|
||||
|
||||
return tags.map(tag => curateTag(tag, store.state.ui.sfw));
|
||||
return tags.map((tag) => curateTag(tag, store.state.ui.sfw));
|
||||
}
|
||||
|
||||
async function fetchTagReleases({ _commit }, tagId) {
|
||||
|
||||
@@ -70,7 +70,7 @@ function initUiActions(store, _router) {
|
||||
slug
|
||||
}
|
||||
}
|
||||
entity: alertsEntityByAlertId {
|
||||
entity: alertsEntity {
|
||||
entity {
|
||||
id
|
||||
name
|
||||
@@ -103,7 +103,7 @@ function initUiActions(store, _router) {
|
||||
};
|
||||
}
|
||||
|
||||
const curatedNotifications = notifications.nodes.map(notification => curateNotification(notification));
|
||||
const curatedNotifications = notifications.nodes.map((notification) => curateNotification(notification));
|
||||
|
||||
return {
|
||||
notifications: curatedNotifications,
|
||||
@@ -222,8 +222,8 @@ function initUiActions(store, _router) {
|
||||
});
|
||||
|
||||
return {
|
||||
releases: res?.results.map(result => curateRelease(result.release)) || [],
|
||||
actors: res?.actors.map(actor => curateActor(actor)) || [],
|
||||
releases: res?.results.map((result) => curateRelease(result.release)) || [],
|
||||
actors: res?.actors.map((actor) => curateActor(actor)) || [],
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ async function initUiObservers(store, _router) {
|
||||
|
||||
body.classList.add(store.state.ui.theme);
|
||||
|
||||
store.watch(state => state.ui.theme, (newTheme, oldTheme) => {
|
||||
store.watch((state) => state.ui.theme, (newTheme, oldTheme) => {
|
||||
body.classList.add(newTheme);
|
||||
body.classList.remove(oldTheme);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user