forked from DebaucheryLibrarian/traxxx
Fixed duplicate query. Updated Jules Jordan logo's.
This commit is contained in:
parent
84117bc074
commit
4c28c8b640
Binary file not shown.
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 41 KiB |
Binary file not shown.
After Width: | Height: | Size: 57 KiB |
Binary file not shown.
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 38 KiB |
|
@ -181,6 +181,8 @@ async function storePhotos(photos, {
|
||||||
concurrency: 10,
|
concurrency: 10,
|
||||||
}).filter(photo => photo);
|
}).filter(photo => photo);
|
||||||
|
|
||||||
|
return metaFiles;
|
||||||
|
|
||||||
const [hashDuplicates, hashOriginals] = await findDuplicates(metaFiles, 'hash', 'hash', label);
|
const [hashDuplicates, hashOriginals] = await findDuplicates(metaFiles, 'hash', 'hash', label);
|
||||||
|
|
||||||
const savedPhotos = await savePhotos(hashOriginals, {
|
const savedPhotos = await savePhotos(hashOriginals, {
|
||||||
|
|
|
@ -347,7 +347,12 @@ async function storeReleaseAssets(release, releaseId) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function storeRelease(release) {
|
async function storeRelease(release) {
|
||||||
const existingRelease = await knex('releases').where('entry_id', release.entryId).first();
|
const existingRelease = await knex('releases')
|
||||||
|
.where({
|
||||||
|
entry_id: release.entryId,
|
||||||
|
site_id: release.site.id,
|
||||||
|
})
|
||||||
|
.first();
|
||||||
const curatedRelease = await curateReleaseEntry(release);
|
const curatedRelease = await curateReleaseEntry(release);
|
||||||
|
|
||||||
if (existingRelease && !argv.redownload) {
|
if (existingRelease && !argv.redownload) {
|
||||||
|
@ -356,7 +361,7 @@ async function storeRelease(release) {
|
||||||
|
|
||||||
if (existingRelease && argv.redownload) {
|
if (existingRelease && argv.redownload) {
|
||||||
const [updatedRelease] = await knex('releases')
|
const [updatedRelease] = await knex('releases')
|
||||||
.where('entry_id', existingRelease.id)
|
.where('id', existingRelease.id)
|
||||||
.update({
|
.update({
|
||||||
...existingRelease,
|
...existingRelease,
|
||||||
...curatedRelease,
|
...curatedRelease,
|
||||||
|
@ -407,8 +412,6 @@ async function storeReleases(releases) {
|
||||||
const actors = accumulateActors(storedReleases);
|
const actors = accumulateActors(storedReleases);
|
||||||
const movies = accumulateMovies(storedReleases);
|
const movies = accumulateMovies(storedReleases);
|
||||||
|
|
||||||
console.log(actors);
|
|
||||||
|
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
associateActors(actors, storedReleases),
|
associateActors(actors, storedReleases),
|
||||||
Promise.map(storedReleases, async release => storeReleaseAssets(release, release.id), {
|
Promise.map(storedReleases, async release => storeReleaseAssets(release, release.id), {
|
||||||
|
|
Loading…
Reference in New Issue