Added FAQ about unplayed items sync.

This commit is contained in:
Abdulmhsen B. A. A
2022-05-22 20:25:54 +03:00
parent f9c08e9c65
commit 75a00d4ae9
3 changed files with 18 additions and 1 deletions

16
FAQ.md
View File

@@ -231,3 +231,19 @@ These are the agents we support for plex media server.
* com.plexapp.agents.xbmcnfo://(id)?lang=en `(XBMC NFO parser agent)`
* com.plexapp.agents.xbmcnfotv://(id)?lang=en `(XBMC NFO parser agent for tv)`
* com.plexapp.agents.hama://(db)\d?-(id)?lang=en `(hama agent is multi db source agent)`
---
### Q: Marking items as unplayed and then importing does not change the status?
That's happens because the media servers API reset the last played date on the items, and there is no indicator that the
status has changed, usually there are field called `updated_at` that would reflect any changes to the object. but that's
not the case here. to import `mark as unplayed` items, You have to use the webhook frontend as those events indicate
the date at which the event triggered. Unfortunately this will not work for `Plex` backend as they do not send events
for `mark as played/unplayed`.
For backends that does not support those events, you can force sync by running the import command with `--ignore-date`
and `--force-full`flags, this will allow you to reimport the items.
We are exploring different implementation to hopefully support syncing unplayed events via normal state:import
operations.

View File

@@ -70,6 +70,7 @@ class JellyfinServer implements ServerInterface
'RunTimeTicks' => 'duration_mil',
'PremiereDate' => 'datetime',
'DateCreated' => 'datetime',
'LastPlayedDate' => 'datetime',
'Size' => 'size',
];

View File

@@ -836,8 +836,8 @@ class PlexServer implements ServerInterface
if (false === (bool)ag($this->options, Options::IGNORE_DATE, false)) {
$date = max(
(int)ag($json, 'updatedAt', 0),
(int)ag($json, 'lastViewedAt', 0),
(int)ag($json, 'updatedAt', 0),
(int)ag($json, 'addedAt', 0)
);