Rev 22 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 22 | Rev 23 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | #!/usr/bin/php |
1 | #!/usr/bin/php |
2 | <?php |
2 | <?php |
3 | 3 | ||
4 | // ViaThinkSoft YouTube Downloader Util 2.4.2 |
4 | // ViaThinkSoft YouTube Downloader Util 2.4.3 |
5 | // Revision: 2023-11-10 |
5 | // Revision: 2024-01-14 |
6 | // Author: Daniel Marschall <www.daniel-marschall.de> |
6 | // Author: Daniel Marschall <www.daniel-marschall.de> |
7 | // Licensed under the terms of the Apache 2.0 License |
7 | // Licensed under the terms of the Apache 2.0 License |
8 | // |
8 | // |
9 | // For syntax and other documentation, please read the file README. |
9 | // For syntax and other documentation, please read the file README. |
10 | 10 | ||
Line 793... | Line 793... | ||
793 | $auto_api_key = str_replace('[listname]', _getLastListname(), $auto_api_key); |
793 | $auto_api_key = str_replace('[listname]', _getLastListname(), $auto_api_key); |
794 | 794 | ||
795 | if (file_exists($auto_api_key)) { |
795 | if (file_exists($auto_api_key)) { |
796 | $out = trim(file_get_contents($auto_api_key)); |
796 | $out = trim(file_get_contents($auto_api_key)); |
797 | } else { |
797 | } else { |
798 | syntax_error("Please specify a YouTube API key with argument '-A'."); |
798 | syntax_error("YouTube API key not found in file '$auto_api_key'. To specify the path, use the argument '-A'"); |
799 | } |
799 | } |
800 | } else { |
800 | } else { |
801 | $out = str_replace('[listname]', _getLastListname(), $out); |
801 | $out = str_replace('[listname]', _getLastListname(), $out); |
802 | $out = expand_tilde($out); |
802 | $out = expand_tilde($out); |
803 | 803 | ||
Line 806... | Line 806... | ||
806 | } else { |
806 | } else { |
807 | // Assume, $out is a key, not a file |
807 | // Assume, $out is a key, not a file |
808 | } |
808 | } |
809 | } |
809 | } |
810 | 810 | ||
811 | if (!yt_check_apikey_syntax($out)) syntax_error("'$out' is not a valid API key, not an existing file containing an API key.\n"); |
811 | if (!yt_check_apikey_syntax($out)) syntax_error("'$out' is not a valid API key, not an existing file containing an API key."); |
812 | 812 | ||
813 | return $out; |
813 | return $out; |
814 | } |
814 | } |
815 | 815 | ||
816 | function _getResultCache() { |
816 | function _getResultCache() { |