Compare commits

..

No commits in common. "36a8adbd8c463d8507ac6f9d64a3773f494ee019" and "6fef87b0f1ec1139b07b803bce5081efdef48396" have entirely different histories.

5 changed files with 7 additions and 33 deletions

View File

@ -10,11 +10,9 @@
class="photo-link"
>
<img
:src="getPath(photo, 'thumbnail', { local: true })"
:style="{ 'background-image': `url(${getPath(photo, 'lazy', { local: true })})` }"
:src="`/img/${photo.thumbnail}`"
:style="{ 'background-image': `url(/img/${photo.thumbnail})` }"
:alt="photo.comment"
:width="photo.width"
:height="photo.height"
class="photo"
@load="$emit('load', $event)"
>
@ -124,7 +122,6 @@ export default {
.poster,
.photo {
width: auto;
max-height: 15rem;
max-width: 100%;
box-shadow: 0 0 3px var(--shadow-weak);

View File

@ -39,8 +39,6 @@ function initTagsActions(store, _router) {
thumbnail
lazy
path
width
height
comment
entity {
id
@ -71,8 +69,6 @@ function initTagsActions(store, _router) {
thumbnail
lazy
path
width
height
comment
entity {
id
@ -164,8 +160,6 @@ function initTagsActions(store, _router) {
thumbnail
comment
lazy
width
height
entity {
id
name

4
package-lock.json generated
View File

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

View File

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

View File

@ -1,7 +1,4 @@
const path = require('path');
const Promise = require('bluebird');
const sharp = require('sharp');
// const nanoid = require('nanoid/non-secure');
const upsert = require('../src/utils/upsert');
const sfw = Object.entries({
@ -954,27 +951,13 @@ exports.seed = knex => Promise.resolve()
[entity.slug]: entity,
}), {});
const tagMediaWithDimensions = await Promise.map(tagMedia, async (media) => {
const { width, height } = await sharp(path.join('public/img', media.path)).metadata(); // size not available from filepath
return {
...media,
width,
height,
};
}, {
concurrency: 20,
});
const { inserted, updated } = await upsert('media', tagMediaWithDimensions.map(media => ({
const { inserted, updated } = await upsert('media', tagMedia.map(media => ({
id: media.id,
path: media.path,
thumbnail: media.thumbnail,
lazy: media.lazy,
mime: media.mime,
index: media.index,
width: media.width,
height: media.height,
comment: media.comment,
entity_id: entitiesBySlug[media.entitySlug]?.id,
})), 'path', knex);