fall back to position 0 instead of undefined

This commit is contained in:
j 2018-08-03 00:50:34 +02:00
parent 9cc8609244
commit 6a71c56e71
1 changed files with 2 additions and 2 deletions

View File

@ -137,10 +137,10 @@ class Engine:
next_playlist_index.append(i)
break
# Discuss how this behavour should be: should it switch to a new playlist if it is the end of the playlist clip sequence already?
elif prev_grid_list[i].get('playlistPosition') + 1 == len(playlist['clips']):
elif prev_grid_list[i].get('playlistPosition', 0) + 1 == len(playlist['clips']):
playlist_pos = 0
else:
playlist_pos = prev_grid_list[i].get('playlistPosition') + 1
playlist_pos = prev_grid_list[i].get('playlistPosition', 0) + 1
rec_list.append((i, {
'clips': playlist['clips'],