leepeuker / movary

Self hosted web app to track and rate your watched movies
MIT License
393 stars 14 forks source link

Jellyfin import a second time fails #532

Closed slimshizn closed 11 months ago

slimshizn commented 11 months ago

Description

Attempting to import after a failed import still fails because now it shows as a duplicate. Could you implement "--overwrite" for Jellyfin imports?

Version

0.59.0

Steps to Reproduce

Import Jellyfin data Try to again

Screenshots

No response

Logs

2023-10-08 11:41:08:704019 - Importing movie plays from Jellyfin...
2023-10-08 11:41:55:562435 - ERROR: Could not complete Jellyfin import.
[2023-10-08T13:41:55.562687+02:00] movary.ERROR: Could not complete Jellyfin import {"exception":"[object] (Doctrine\\DBAL\\Exception\\UniqueConstraintViolationException(code: 1062): An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '2-00003d972d4eb31a3a7d51785582ae5e' for key 'user_jellyfin_cache.PRIMARY' at /app/vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php:62)\n[previous exception] [object] (Doctrine\\DBAL\\Driver\\PDO\\Exception(code: 1062): SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '2-00003d972d4eb31a3a7d51785582ae5e' for key 'user_jellyfin_cache.PRIMARY' at /app/vendor/doctrine/dbal/src/Driver/PDO/Exception.php:28)\n[previous exception] [object] (PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '2-00003d972d4eb31a3a7d51785582ae5e' for key 'user_jellyfin_cache.PRIMARY' at /app/vendor/doctrine/dbal/src/Driver/PDO/Statement.php:121)"} []

Server OS

docker

Client Platform

None

Client Device

No response

Client OS

ssh

Client Browser

No response

Additional Context

No response

leepeuker commented 11 months ago

I am looking into it. In the mean time a php bin/console.php jellyfin:cache:delete should be the quickest fix for you I think. Please report back if that helped

slimshizn commented 11 months ago

Thank you for the quick reply. Ran docker exec movary php bin/console.php jellyfin:cache:delete <userId> and re ran the import with docker exec movary php bin/console.php jellyfin:import <userId>. Looks to have ran successfully.