Compare commits

...

2 Commits

Author SHA1 Message Date
DebaucheryLibrarian 042d3be4a9 1.226.8 2023-06-04 01:24:20 +02:00
DebaucheryLibrarian 18e91d54f1 Transfer tool finds existing media by source. 2023-06-04 01:24:18 +02:00
3 changed files with 4 additions and 3 deletions

4
package-lock.json generated
View File

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

View File

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

View File

@ -455,6 +455,7 @@ async function addReleaseMedia(medias, release, target) {
const existingMedia = await knex('media')
.where('hash', media.hash)
.orWhere('source', media.source)
.first();
const id = existingMedia?.id || nanoid();