diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2015-01-07 07:30:57 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2015-01-07 07:30:57 +0100 |
commit | e4a8eae701f22395dae607ed000d39f7a57e80a0 (patch) | |
tree | ff33173e1320f25a6af60140c3cd4ff98346d2c3 /youtube_dl/utils.py | |
parent | 75e51819d010b38d9a3464f8749688c8d53fc123 (diff) | |
parent | 8ee341500dea885c79316fb8f12adde2028c55a5 (diff) |
Merge commit '8ee3415'
Diffstat (limited to 'youtube_dl/utils.py')
-rw-r--r-- | youtube_dl/utils.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index d4951c406..29739a483 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -1560,3 +1560,13 @@ def urlhandle_detect_ext(url_handle): getheader = url_handle.info().getheader return getheader('Content-Type').split("/")[1] + + +def age_restricted(content_limit, age_limit): + """ Returns True iff the content should be blocked """ + + if age_limit is None: # No limit set + return False + if content_limit is None: + return False # Content available for everyone + return age_limit < content_limit |