Rev 11 | Rev 13 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 11 | Rev 12 | ||
---|---|---|---|
Line 409... | Line 409... | ||
409 | if ($out == NULL) $out = array(); |
409 | if ($out == NULL) $out = array(); |
410 | 410 | ||
411 | if (!empty(_getResultcache())) { |
411 | if (!empty(_getResultcache())) { |
412 | $stats = yt_get_playlist_stats($playlist_id); |
412 | $stats = yt_get_playlist_stats($playlist_id); |
413 | if ($stats === false) { |
413 | if ($stats === false) { |
414 | fwrite(STDERR, "Cannot get stats for playlist with ID '$channel_id'\n"); |
414 | fwrite(STDERR, "Cannot get stats for playlist with ID '$playlist_id'\n"); |
415 | return; |
415 | return; |
416 | } |
416 | } |
417 | $videocount = $stats['itemCount']; |
417 | $videocount = $stats['itemCount']; |
418 | 418 | ||
419 | $key = 'pid:'.$playlist_id; |
419 | $key = 'pid:'.$playlist_id; |
Line 789... | Line 789... | ||
789 | 789 | ||
790 | $out = str_replace('[listname]', _getLastListname(), $out); |
790 | $out = str_replace('[listname]', _getLastListname(), $out); |
791 | 791 | ||
792 | if ($allow_creation_outputdir) { |
792 | if ($allow_creation_outputdir) { |
793 | if (!is_dir($out)) { |
793 | if (!is_dir($out)) { |
794 | mkdir($out, true); |
794 | mkdir($out, 0777, true); |
795 | if (!is_dir($out)) { |
795 | if (!is_dir($out)) { |
796 | fwrite(STDERR, "Output directory '$out' does not exist.\n"); |
796 | fwrite(STDERR, "Output directory '$out' does not exist.\n"); |
797 | exit(1); |
797 | exit(1); |
798 | } |
798 | } |
799 | } |
799 | } |