diff --git a/src/Backends/Plex/Action/Progress.php b/src/Backends/Plex/Action/Progress.php index 096edf5d..1c20cc56 100644 --- a/src/Backends/Plex/Action/Progress.php +++ b/src/Backends/Plex/Action/Progress.php @@ -234,29 +234,31 @@ class Progress } try { -// $url = $context->backendUrl -// ->withPath('/:/timeline/') -// ->withQuery( -// http_build_query([ -// 'ratingKey' => $logContext['remote']['id'], -// 'key' => '/library/metadata/' . $logContext['remote']['id'], -// 'identifier' => 'com.plexapp.plugins.library', -// 'state' => 'stopped', -// 'time' => $entity->getPlayProgress(), -// // -- Without duration & client identifier plex ignore watch progress update. -// 'duration' => ag($remoteData, 'duration', 0), -// 'X-Plex-Client-Identifier' => md5('WatchState/' . getAppVersion()) -// ]) -// ); + // -- it seems /:/timeline/ allow us to update external user progress, while /:/progress/ does not. + $url = $context->backendUrl + ->withPath('/:/timeline/') + ->withQuery( + http_build_query([ + 'ratingKey' => $logContext['remote']['id'], + 'key' => '/library/metadata/' . $logContext['remote']['id'], + 'identifier' => 'com.plexapp.plugins.library', + 'state' => 'stopped', + 'time' => $entity->getPlayProgress(), + // -- Without duration & client identifier plex ignore watch progress update. + 'duration' => ag($remoteData, 'duration', 0), + 'X-Plex-Client-Identifier' => md5('WatchState/' . getAppVersion()) + ]) + ); + +// $url = $context->backendUrl->withPath('/:/progress/')->withQuery( +// http_build_query([ +// 'key' => $logContext['remote']['id'], +// 'identifier' => 'com.plexapp.plugins.library', +// 'state' => 'stopped', +// 'time' => $entity->getPlayProgress(), +// ]) +// ); - $url = $context->backendUrl->withPath('/:/progress/')->withQuery( - http_build_query([ - 'key' => $logContext['remote']['id'], - 'identifier' => 'com.plexapp.plugins.library', - 'state' => 'stopped', - 'time' => $entity->getPlayProgress(), - ]) - ); $logContext['remote']['url'] = (string)$url; $this->logger->debug('Updating [{backend}] {item.type} [{item.title}] watch progress.', [