Bypass state check if force-full flag is set.

This commit is contained in:
Abdulmhsen B. A. A
2024-04-30 16:27:06 +03:00
parent a0c9413bf2
commit 740578b9dc
2 changed files with 2 additions and 2 deletions

View File

@@ -505,7 +505,7 @@ final class DirectMapper implements iImport
* 2- if the db.metadata.backend.played_at is equal to entity.updated or the db.metadata has no data.
* 3 - mark entity as tainted and re-process it.
*/
if (true === $cloned->isWatched() && false === $entity->isWatched()) {
if (true === $hasAfter && true === $cloned->isWatched() && false === $entity->isWatched()) {
$message = 'MAPPER: Watch state conflict detected in [{backend}: {title}] [{new_state}] vs db [{id}: {current_state}].';
$hasMeta = count($cloned->getMetadata($entity->via)) >= 1;
$hasDate = $entity->updated === ag($cloned->getMetadata($entity->via), iState::COLUMN_META_DATA_PLAYED_AT);

View File

@@ -396,7 +396,7 @@ final class MemoryMapper implements iImport
* 2- if the db.metadata.backend.played_at is equal to entity.updated or the db.metadata has no data.
* 3 - mark entity as tainted and re-process it.
*/
if (true === $cloned->isWatched() && false === $entity->isWatched()) {
if (true === $hasAfter && true === $cloned->isWatched() && false === $entity->isWatched()) {
$message = 'MAPPER: Watch state conflict detected in [{backend}: {title}] [{new_state}] vs db [{id}: {current_state}].';
$hasMeta = count($cloned->getMetadata($entity->via)) >= 1;
$hasDate = $entity->updated === ag($cloned->getMetadata($entity->via), iState::COLUMN_META_DATA_PLAYED_AT);