diff options
author | Philipp Hagemeister <[email protected]> | 2014-08-22 17:46:57 +0200 |
---|---|---|
committer | Philipp Hagemeister <[email protected]> | 2014-08-22 17:46:57 +0200 |
commit | be843678b134a76b3509b0ced99dd9fff3867a25 (patch) | |
tree | 0c47e72f971b017db14fea7b4a715a41bc5071db | |
parent | c71dfccc98208be44b1f639af72a257dae34d966 (diff) | |
download | youtube-dl-be843678b134a76b3509b0ced99dd9fff3867a25.tar.gz youtube-dl-be843678b134a76b3509b0ced99dd9fff3867a25.zip |
[YouTubeDL] Correct handling of age_limit = None in result
-rwxr-xr-x | youtube_dl/YoutubeDL.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index e7194f3e3..a671d6450 100755 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -480,7 +480,10 @@ class YoutubeDL(object): return 'Skipping %s, because it has exceeded the maximum view count (%d/%d)' % (video_title, view_count, max_views) age_limit = self.params.get('age_limit') if age_limit is not None: - if age_limit < info_dict.get('age_limit', 0): + actual_age_limit = info_dict.get('age_limit') + if actual_age_limit is None: + actual_age_limit = 0 + if age_limit < actual_age_limit: return 'Skipping "' + title + '" because it is age restricted' if self.in_download_archive(info_dict): return '%s has already been recorded in archive' % video_title |