mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-05 00:51:29 +00:00
[8tracks] Use predefined avg duration when duration is negative (Closes #5200)
This commit is contained in:
parent
f247a199fe
commit
85741b9986
1 changed files with 3 additions and 0 deletions
|
@ -117,6 +117,9 @@ class EightTracksIE(InfoExtractor):
|
||||||
track_count = data['tracks_count']
|
track_count = data['tracks_count']
|
||||||
duration = data['duration']
|
duration = data['duration']
|
||||||
avg_song_duration = float(duration) / track_count
|
avg_song_duration = float(duration) / track_count
|
||||||
|
# duration is sometimes negative, use predefined avg duration
|
||||||
|
if avg_song_duration <= 0:
|
||||||
|
avg_song_duration = 300
|
||||||
first_url = 'http://8tracks.com/sets/%s/play?player=sm&mix_id=%s&format=jsonh' % (session, mix_id)
|
first_url = 'http://8tracks.com/sets/%s/play?player=sm&mix_id=%s&format=jsonh' % (session, mix_id)
|
||||||
next_url = first_url
|
next_url = first_url
|
||||||
entries = []
|
entries = []
|
||||||
|
|
Loading…
Reference in a new issue