Scope seen, missing, and unique per media type

Also drop unused "dupes" list
This commit is contained in:
yosifkit 2021-05-08 18:15:37 -07:00 committed by GitHub
parent 4a67ece43d
commit 973adc0148
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -161,14 +161,13 @@ def org_diff(lst_dicts, media_type, main_server):
} }
""" """
diff_dict = {} diff_dict = {}
seen = {}
dupes = []
missing = []
unique = []
# todo-me pull posters from connected servers # todo-me pull posters from connected servers
for mtype in media_type: for mtype in media_type:
meta_lst = [] meta_lst = []
seen = {}
missing = []
unique = []
print('...combining {}s'.format(mtype)) print('...combining {}s'.format(mtype))
for server_lst in lst_dicts: for server_lst in lst_dicts:
for item in server_lst[mtype]: for item in server_lst[mtype]:
@ -184,7 +183,6 @@ def org_diff(lst_dicts, media_type, main_server):
else: else:
# Duplicate found # Duplicate found
if seen[title] >= 1: if seen[title] >= 1:
dupes.append([title, item._server.friendlyName])
# Go back through list to find original # Go back through list to find original
for meta in meta_lst: for meta in meta_lst:
if meta['title'] == title: if meta['title'] == title: