mirror of
https://github.com/FoxxMD/multi-scrobbler.git
synced 2026-08-20 14:13:20 +00:00
create transform events with createdAt as now
This commit is contained in:
parent
0002777a29
commit
97f575293a
2 changed files with 4 additions and 4 deletions
|
|
@ -1281,7 +1281,7 @@ export default abstract class AbstractScrobbleClient extends AbstractComponent i
|
|||
const { lifecycle = [] } = transformedScrobble;
|
||||
const psLifecycle = lifecycle.filter(x => x.hook === TRANSFORM_HOOK.postCompare);
|
||||
if(psLifecycle.length > 0) {
|
||||
events.push(transformToPlayEvent(psLifecycle));
|
||||
events.push({...transformToPlayEvent(psLifecycle), createdAt: dayjs()});
|
||||
}
|
||||
signal.throwIfAborted();
|
||||
try {
|
||||
|
|
@ -1522,7 +1522,7 @@ export default abstract class AbstractScrobbleClient extends AbstractComponent i
|
|||
const { lifecycle = [] } = transformedScrobble;
|
||||
const psLifecycle = lifecycle.filter(x => x.hook === TRANSFORM_HOOK.postCompare);
|
||||
if(psLifecycle.length > 0) {
|
||||
events.push(transformToPlayEvent(psLifecycle));
|
||||
events.push({...transformToPlayEvent(psLifecycle), createdAt: dayjs()});
|
||||
}
|
||||
signal?.throwIfAborted();
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -515,7 +515,7 @@ export default abstract class AbstractSource extends AbstractComponent implement
|
|||
const {lifecycle = []} = p;
|
||||
const psLifecycle = lifecycle.filter(x => x.hook === TRANSFORM_HOOK.postCompare);
|
||||
if(psLifecycle.length > 0) {
|
||||
events.push({...transformToPlayEvent(psLifecycle), playId: p.id});
|
||||
events.push({...transformToPlayEvent(psLifecycle), playId: p.id, createdAt: dayjs()});
|
||||
}
|
||||
}
|
||||
this.emitEvent('discoveredToScrobble', {
|
||||
|
|
@ -982,7 +982,7 @@ export default abstract class AbstractSource extends AbstractComponent implement
|
|||
try {
|
||||
const {lifecycle = [], ...preCompared} = await this.transformPlay(currQueuedPlay.play, TRANSFORM_HOOK.preCompare);
|
||||
if(lifecycle.length > 0) {
|
||||
events.push(transformToPlayEvent(lifecycle));
|
||||
events.push({...transformToPlayEvent(lifecycle), createdAt: dayjs()});
|
||||
}
|
||||
let existing: PlayObject;
|
||||
// cheap check for existing
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue