|
@@ -194,16 +194,23 @@ trait JellyStatHomepageItem
|
|
|
|
|
|
|
|
public function getJellyStatMetadata($array)
|
|
public function getJellyStatMetadata($array)
|
|
|
{
|
|
{
|
|
|
|
|
+ // Debug logging
|
|
|
|
|
+ $this->writeLog('info', 'JellyStat getJellyStatMetadata called with: ' . json_encode($array));
|
|
|
|
|
+
|
|
|
if (!$this->homepageItemPermissions($this->jellystatHomepagePermissions('main'), true)) {
|
|
if (!$this->homepageItemPermissions($this->jellystatHomepagePermissions('main'), true)) {
|
|
|
|
|
+ $this->writeLog('error', 'JellyStat metadata: Permission check failed');
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
$key = $array['key'] ?? null;
|
|
$key = $array['key'] ?? null;
|
|
|
if (!$key) {
|
|
if (!$key) {
|
|
|
|
|
+ $this->writeLog('error', 'JellyStat metadata: No key provided');
|
|
|
$this->setAPIResponse('error', 'JellyStat metadata key is not defined', 422);
|
|
$this->setAPIResponse('error', 'JellyStat metadata key is not defined', 422);
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ $this->writeLog('info', 'JellyStat metadata: Processing key: ' . $key);
|
|
|
|
|
+
|
|
|
// Get JellyStat data to find the item details
|
|
// Get JellyStat data to find the item details
|
|
|
$url = $this->config['jellyStatURL'] ?? '';
|
|
$url = $this->config['jellyStatURL'] ?? '';
|
|
|
$token = $this->config['jellyStatApikey'] ?? '';
|
|
$token = $this->config['jellyStatApikey'] ?? '';
|