context['diffusion_path'] = diffusion_path
# end should be a bit before the real end of file so the same file doesn't
- # get repeated.
- context['end'] = diffusion.datetime + datetime.timedelta(seconds=(soundfile.duration or 300) - 180)
+ # get repeated but shouldn't be less or equal than start date or soma would
+ # loop the file
+ context['end'] = diffusion.datetime + datetime.timedelta(seconds=
+ max(((soundfile.duration or 300) - 180), 60))
if 'jingle_id' in kwargs:
context['jingle'] = Jingle.objects.get(id=kwargs['jingle_id'])