1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-22 14:41:39 +00:00

Removed a little cross-platform code duplication in core_me and core_pe.

This commit is contained in:
Virgil Dupras
2011-09-21 14:04:41 -04:00
parent 0da1947902
commit f0441db88a
6 changed files with 9 additions and 16 deletions

View File

@@ -5,11 +5,14 @@
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licenses/bsd_license
import os.path as op
from hscommon.trans import tr as trbase
from hscommon.util import format_size
from core.app import (DupeGuru as DupeGuruBase, Column, format_timestamp, format_perc,
format_dupe_count, cmp_value)
from .scanner import ScannerPE
from . import prioritize
from . import __appname__
@@ -41,6 +44,8 @@ class DupeGuru(DupeGuruBase):
def __init__(self, view, appdata):
DupeGuruBase.__init__(self, view, appdata)
self.scanner = ScannerPE()
self.scanner.cache_path = op.join(self.appdata, 'cached_pictures.db')
def _get_display_info(self, dupe, group, delta):
size = dupe.size

View File

@@ -22,7 +22,6 @@ from hscommon.trans import tr
from core import directories
from . import _block_osx
from .photo import Photo as PhotoBase
from .scanner import ScannerPE
from .app import DupeGuru as DupeGuruBase
IPHOTO_PATH = Path('iPhoto Library')
@@ -133,9 +132,7 @@ class DupeGuruPE(DupeGuruBase):
def __init__(self, view, appdata):
appdata = op.join(appdata, 'dupeGuru Picture Edition')
DupeGuruBase.__init__(self, view, appdata)
self.scanner = ScannerPE()
self.directories = Directories()
self.scanner.cache_path = op.join(self.appdata, 'cached_pictures.db')
def _do_delete(self, j, replace_with_hardlinks):
def op(dupe):