better naming

This commit is contained in:
jb-alvarado 2021-02-22 09:10:07 +01:00
parent 0e9805dba7
commit 21fe48f789

View File

@ -387,10 +387,10 @@ class GetSourceFromPlaylist:
self.node['filter'] = build_filtergraph(self.node, self.prev_node, self.node['filter'] = build_filtergraph(self.node, self.prev_node,
self.next_node) self.next_node)
def fill_the_gap(self, duration): def generate_placeholder(self, duration):
""" """
when playlist not exists, or is not long enough, when playlist not exists, or is not long enough,
fill the gap generate a placeholder node
""" """
current_time = get_time('full_sec') - 86400 current_time = get_time('full_sec') - 86400
# balance small difference to start time # balance small difference to start time
@ -430,11 +430,11 @@ class GetSourceFromPlaylist:
# playlist not exist or is corrupt/empty # playlist not exist or is corrupt/empty
messenger.error('Clip nodes are empty!') messenger.error('Clip nodes are empty!')
self.first = False self.first = False
self.fill_the_gap(30) self.generate_placeholder(30)
else: else:
messenger.error('Playlist not long enough!') messenger.error('Playlist not long enough!')
self.fill_the_gap(60) self.generate_placeholder(60)
def next(self): def next(self):
""" """
@ -485,7 +485,6 @@ class GetSourceFromPlaylist:
else: else:
if not _playlist.length and not stdin_args.loop: if not _playlist.length and not stdin_args.loop:
# when we reach playlist end, stop script # when we reach playlist end, stop script
# TODO: take next playlist, without sync check
messenger.info('Playlist reached end!') messenger.info('Playlist reached end!')
return None return None
else: else: