true, 'videos' => getChannelVideos($channelId)]);
} else {
echo json_encode(['success' => false, 'error' => 'Channel not found']);
}
break;
case 'get_playlists':
$channelId = getChannelId();
if ($channelId) {
$playlists = getPlaylists($channelId);
// Load videos for each playlist
foreach ($playlists as &$playlist) {
$playlist['videos'] = getPlaylistVideos($playlist['id']);
}
echo json_encode(['success' => true, 'playlists' => $playlists]);
} else {
echo json_encode(['success' => false, 'error' => 'Channel not found']);
}
break;
case 'clear_cache':
// Clear all cache files
$files = glob(CACHE_DIR . '*.json');
foreach ($files as $file) {
unlink($file);
}
echo json_encode(['success' => true, 'message' => 'Cache cleared']);
break;
}
exit;
}
?>
Restomod Videos | Performance & Custom Cars
Video Gallery
South African Performance & Custom Cars
Loading videos...