leepeuker / movary

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

Add command to only sync the people and movies that haven't been synced yet. #547

Open JVT038 opened 10 months ago

JVT038 commented 10 months ago

Description

I regularly have people that basically have an empty details page, because they haven't been synced (automatically) yet.

Desired Behavior

Add a new command that only syncs the people and movies which haven't been synced yet. So the people / movies that have been synced will be skipped.

Additionally, add this to the supervisor cron thing, so it happens at least once every 24 hours or so. This way all people will (hopefully) have a full details page.

Additional Context

No response

leepeuker commented 10 months ago

Yes I noticed this behavior too. I am running php bin/console.php tmdb:person:sync --threshold=200 --hours=72 via cron and in theory this should update all persons over time. In theory the sync should get data for the longest existing person without data first, but it does not do this.

I did not notice an issue with movies yet, but I will double check

JVT038 commented 8 months ago

What do you think of this idea?

The current syncing job (and command) will be changed to only sync the movies and people that haven't been synced yet, while there will be a new command called 'full sync' that will sync everything, even the things that have been synced before.

If this issue is fixed, then issue #131 can be fixed as well, by simply automatically scheduling a new syncing job that will only sync the unsynced items (thus syncing everything that has just been imported)

leepeuker commented 8 months ago

I do not think we need new commands for this, we could simply add new option flags to the existing commands (--onlyNotSynced or something like that).

https://github.com/leepeuker/movary/issues/131 Is another issue and not directly related to this topic. The issue there is that after importing new history there is no built in automatic way handling the missing data for the new movies and persons. This can manually already be solved by running the the sync commands (which handle movies and persons with no synced data first by default), but it should do this automatically.