A feature-rich command-line audio/video downloader
[8tracks] Use predefined avg duration when duration is negative (Closes #5200)
Sergey M․85741b998660
diff --git a/youtube_dl/extractor/eighttracks.py b/youtube_dl/extractor/eighttracks.pyindex fb5dbbe2b0..869ff72d65 100644--- a/youtube_dl/extractor/eighttracks.py+++ b/youtube_dl/extractor/eighttracks.py@@ -117,6 +117,9 @@ class EightTracksIE(InfoExtractor):track_count = data['tracks_count']duration = data['duration']avg_song_duration = float(duration) / track_count+ # duration is sometimes negative, use predefined avg duration+ if avg_song_duration <= 0:+ avg_song_duration = 300first_url = 'http://8tracks.com/sets/%s/play?player=sm&mix_id=%s&format=jsonh' % (session, mix_id)next_url = first_urlentries = []