From 9fcd58aab29e53044fc786aed960ed93c7fde110 Mon Sep 17 00:00:00 2001 From: emkael Date: Wed, 2 Jul 2025 16:09:28 +0200 Subject: Bugfix for YouTube metadata cache --- providers/Youtube.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'providers') diff --git a/providers/Youtube.php b/providers/Youtube.php index 9989bdd..b84ef77 100644 --- a/providers/Youtube.php +++ b/providers/Youtube.php @@ -31,7 +31,11 @@ class Youtube extends Rss { if (file_exists($cacheFile)) { $cacheData = unserialize(file_get_contents($cacheFile)); } - $oldIDs = array_keys($cacheData); + if ($cacheData) { + $oldIDs = array_keys($cacheData); + } else { + $oldIDs = []; + } $newIDs = array_diff($ids, $oldIDs); if ($newIDs) { $metadata = $this->_youtube->getVideosInfo($newIDs); -- cgit v1.2.3