# last track overshot
# 1st strategy: remove last track and try to get a track with
# exact remaining time
+ print('overshoot', current_datetime, file=sys.stderr)
playlist = playlist[:-1]
track = Track.objects.filter(
nonstop_zones=zone,
# or too many failures to get an appropriate file,
# allow whatever comes.
allow_overflow = True
+ print('allow overflow', file=sys.stderr)
current_datetime = start_datetime + sum(
[x.duration for x in playlist], datetime.timedelta(seconds=0))