Fix missing check for geoblocked tracks (#332) (#334)

Tracks were being downloaded regardless of their location availability.
Now only available tracks for location will be downloaded.
master
hgabs 2020-05-01 17:10:10 +03:00 committed by GitHub
parent 9c32085723
commit b0a164f843
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -557,6 +557,11 @@ def download_track(track, playlist_info=None):
logger.error('{0} is not streamable...'.format(title))
return
# Geoblocked track
if track['policy'] == 'BLOCK':
logger.error('{0} is not available in your location...\n'.format(title))
return
# Downloadable track
filename = None
if track['downloadable'] and track['has_downloads_left'] and not arguments['--onlymp3']: