Remove duplicates while preserving order

This commit is contained in:
Ritiek Malhotra
2018-09-26 10:45:48 +05:30
parent 32c2ace96c
commit 95139222d0
2 changed files with 15 additions and 1 deletions

View File

@@ -68,7 +68,7 @@ def download_list(text_file):
with open(text_file, 'r') as listed:
# read tracks into a list and remove any duplicates
lines = listed.read().splitlines()
lines = list(set(lines))
lines = internals.remove_duplicates(lines)
# ignore blank lines in text_file (if any)
try:
lines.remove('')