mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-09 21:24:36 +00:00
Fixed stupid bug with _do_delete() ME/PE overrides not having the right arguments.
This commit is contained in:
parent
ead3b1e651
commit
05478591a4
@ -146,12 +146,12 @@ class DupeGuruME(DupeGuruBase):
|
||||
self.directories = Directories(fileclasses=self.directories.fileclasses)
|
||||
self.dead_tracks = []
|
||||
|
||||
def _do_delete(self, j, replace_with_hardlinks):
|
||||
def _do_delete(self, j, replace_with_hardlinks, direct_deletion):
|
||||
# XXX If I read correctly, Python 3.3 will allow us to go fetch inner function easily, so
|
||||
# we'll be able to replace "op" below with DupeGuruBase._do_delete.op.
|
||||
def op(dupe):
|
||||
j.add_progress()
|
||||
return self._do_delete_dupe(dupe, replace_with_hardlinks)
|
||||
return self._do_delete_dupe(dupe, replace_with_hardlinks, direct_deletion)
|
||||
|
||||
marked = [dupe for dupe in self.results.dupes if self.results.is_marked(dupe)]
|
||||
j.start_job(self.results.mark_count, tr("Sending dupes to the Trash"))
|
||||
@ -164,10 +164,10 @@ class DupeGuruME(DupeGuruBase):
|
||||
pass
|
||||
self.results.perform_on_marked(op, True)
|
||||
|
||||
def _do_delete_dupe(self, dupe, replace_with_hardlinks):
|
||||
def _do_delete_dupe(self, dupe, replace_with_hardlinks, direct_deletion):
|
||||
if isinstance(dupe, ITunesSong):
|
||||
dupe.remove_from_library()
|
||||
DupeGuruBase._do_delete_dupe(self, dupe, replace_with_hardlinks)
|
||||
DupeGuruBase._do_delete_dupe(self, dupe, replace_with_hardlinks, direct_deletion)
|
||||
|
||||
def _create_file(self, path):
|
||||
if (self.directories.itunes_libpath is not None) and (path in self.directories.itunes_libpath[:-1]):
|
||||
|
@ -135,10 +135,10 @@ class DupeGuruPE(DupeGuruBase):
|
||||
DupeGuruBase.__init__(self, view, appdata)
|
||||
self.directories = Directories()
|
||||
|
||||
def _do_delete(self, j, replace_with_hardlinks):
|
||||
def _do_delete(self, j, replace_with_hardlinks, direct_deletion):
|
||||
def op(dupe):
|
||||
j.add_progress()
|
||||
return self._do_delete_dupe(dupe, replace_with_hardlinks)
|
||||
return self._do_delete_dupe(dupe, replace_with_hardlinks, direct_deletion)
|
||||
|
||||
marked = [dupe for dupe in self.results.dupes if self.results.is_marked(dupe)]
|
||||
j.start_job(self.results.mark_count, tr("Sending dupes to the Trash"))
|
||||
@ -152,7 +152,7 @@ class DupeGuruPE(DupeGuruBase):
|
||||
pass
|
||||
self.results.perform_on_marked(op, True)
|
||||
|
||||
def _do_delete_dupe(self, dupe, replace_with_hardlinks):
|
||||
def _do_delete_dupe(self, dupe, replace_with_hardlinks, direct_deletion):
|
||||
if isinstance(dupe, IPhoto):
|
||||
try:
|
||||
a = app('iPhoto')
|
||||
@ -168,7 +168,7 @@ class DupeGuruPE(DupeGuruBase):
|
||||
except (CommandError, RuntimeError) as e:
|
||||
raise EnvironmentError(str(e))
|
||||
else:
|
||||
DupeGuruBase._do_delete_dupe(self, dupe, replace_with_hardlinks)
|
||||
DupeGuruBase._do_delete_dupe(self, dupe, replace_with_hardlinks, direct_deletion)
|
||||
|
||||
def _create_file(self, path):
|
||||
if (self.directories.iphoto_libpath is not None) and (path in self.directories.iphoto_libpath[:-1]):
|
||||
|
Loading…
x
Reference in New Issue
Block a user