======================================== Testing Episode Behavior Without Video URL Simulating Rate Limit Scenario ======================================== 1. Cache cleared 2. Fetching episode (with video)...
Class "App\Services\EpisodeDataService" not found
dev-utils/test_episode_without_video.php
26Cache::forget($cacheKey);
27echo "1. Cache cleared\n\n";
28
29// Get episode
30echo "2. Fetching episode (with video)...\n";
31$service = new EpisodeDataService();
32$result = $service->getEpisodeDetails($bookId, $episodeIndex, $lang, true);
33
34if ($result) {
35 echo "✓ Episode fetched successfully\n";
36 $episode = $result['episode'] ?? null;
37 if ($episode) {
38 $videoPath = $episode['cdnList'][0]['videoPathList'][0]['videoPath'] ?? null;
39 echo " - Has video URL: " . ($videoPath ? 'YES' : 'NO') . "\n";
40 if (!$videoPath) {
41 echo " ⚠️ Video URL missing but episode data returned (GOOD - prevents 404)\n";
42 }
43