Don't check deleted cards
This commit is contained in:
parent
b23eb084c3
commit
471f82e457
1 changed files with 23 additions and 19 deletions
|
@ -79,8 +79,10 @@ class FindDuplicateContacts:
|
|||
def compare_cards(self):
|
||||
'''Compare all vCards'''
|
||||
checked_cards = []
|
||||
self.removed_cards = []
|
||||
count = 0
|
||||
for card in self.cards:
|
||||
if card['filename'] not in self.removed_cards:
|
||||
count +=1
|
||||
print(f"Contact {count} of {len(self.cards)}:\b")
|
||||
duplicated = False
|
||||
|
@ -142,12 +144,14 @@ class FindDuplicateContacts:
|
|||
card2['filename'],
|
||||
os.path.join(self.duplicates_folder, os.path.basename(card2['filename']))
|
||||
)
|
||||
self.removed_cards.append(card2['filename'])
|
||||
return True
|
||||
elif option == "2":
|
||||
shutil.move(
|
||||
card1['filename'],
|
||||
os.path.join(self.duplicates_folder, os.path.basename(card1['filename']))
|
||||
)
|
||||
self.removed_cards.append(card1['filename'])
|
||||
return True
|
||||
else:
|
||||
print('Doing nothing.')
|
||||
|
|
Loading…
Reference in a new issue