mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-02 01:02:48 +01:00
[YouTubeDL] Correct handling of age_limit = None in result
This commit is contained in:
parent
c71dfccc98
commit
be843678b1
@ -480,7 +480,10 @@ def _match_entry(self, info_dict):
|
|||||||
return 'Skipping %s, because it has exceeded the maximum view count (%d/%d)' % (video_title, view_count, max_views)
|
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')
|
age_limit = self.params.get('age_limit')
|
||||||
if age_limit is not None:
|
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'
|
return 'Skipping "' + title + '" because it is age restricted'
|
||||||
if self.in_download_archive(info_dict):
|
if self.in_download_archive(info_dict):
|
||||||
return '%s has already been recorded in archive' % video_title
|
return '%s has already been recorded in archive' % video_title
|
||||||
|
Loading…
Reference in New Issue
Block a user