feat: check unique

This commit is contained in:
abc1763613206
2021-02-17 18:37:34 +08:00
parent c573a3492b
commit a05d2f1f90

View File

@@ -22,6 +22,8 @@ SKIP_FFPROBE_MESSAGES = [re.compile(pattern) for pattern in (
'number of reference frames .+ exceeds max', 'number of reference frames .+ exceeds max',
)] )]
uniqueList = []
@func_set_timeout(12) @func_set_timeout(12)
def get_stream(num, clist, uri): def get_stream(num, clist, uri):
try: try:
@@ -98,7 +100,11 @@ def main():
print('Channel,Group,Source,Link', file=f0) print('Channel,Group,Source,Link', file=f0)
for row in f_csv: for row in f_csv:
try: try:
ret = check_channel(row,num) if row[3] in uniqueList:
ret = False
else:
uniqueList.append(row[3])
ret = check_channel(row,num)
except FunctionTimedOut as e: except FunctionTimedOut as e:
#traceback.print_exc() #traceback.print_exc()