summaryrefslogtreecommitdiff
path: root/providers/Youtube.php
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2025-07-02 16:09:28 +0200
committeremkael <emkael@tlen.pl>2025-07-02 16:09:28 +0200
commit9fcd58aab29e53044fc786aed960ed93c7fde110 (patch)
tree9da421c5ecce943dad0be5a3e162d13d83bcb518 /providers/Youtube.php
parent1e2744b07eb05c26e6e92bd6e7b65938f978da5e (diff)
Bugfix for YouTube metadata cacheHEADmaster
Diffstat (limited to 'providers/Youtube.php')
-rw-r--r--providers/Youtube.php6
1 files changed, 5 insertions, 1 deletions
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);