Merge pull request #292 from yosifkit/patch-1

Scope seen, missing, and unique per media type
This commit is contained in:
blacktwin 2021-07-13 09:36:04 -04:00 committed by GitHub
commit d10c6cf94f
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 = {}
seen = {}
dupes = []
missing = []
unique = []
# todo-me pull posters from connected servers
for mtype in media_type:
meta_lst = []
seen = {}
missing = []
unique = []
print('...combining {}s'.format(mtype))
for server_lst in lst_dicts:
for item in server_lst[mtype]:
@ -184,7 +183,6 @@ def org_diff(lst_dicts, media_type, main_server):
else:
# Duplicate found
if seen[title] >= 1:
dupes.append([title, item._server.friendlyName])
# Go back through list to find original
for meta in meta_lst:
if meta['title'] == title: