2009-06-01 09:55:11 +00:00
|
|
|
# Created By: Virgil Dupras
|
|
|
|
# Created On: 2009-05-21
|
2015-01-03 21:30:57 +00:00
|
|
|
# Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
2009-08-05 08:59:46 +00:00
|
|
|
#
|
2015-01-03 21:33:16 +00:00
|
|
|
# This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
2009-08-05 08:59:46 +00:00
|
|
|
# which should be included with this package. The terms are also available at
|
2015-01-03 21:33:16 +00:00
|
|
|
# http://www.gnu.org/licenses/gpl-3.0.html
|
2009-06-01 09:55:11 +00:00
|
|
|
|
2011-09-21 18:04:41 +00:00
|
|
|
from core_me import __appname__
|
2011-09-20 22:40:27 +00:00
|
|
|
from core_me.app import DupeGuru as DupeGuruModel
|
2009-06-01 09:55:11 +00:00
|
|
|
|
2010-10-04 13:29:00 +00:00
|
|
|
from ..base.app import DupeGuru as DupeGuruBase
|
|
|
|
from .details_dialog import DetailsDialog
|
2011-11-28 15:27:17 +00:00
|
|
|
from .results_model import ResultsModel
|
2010-10-04 13:29:00 +00:00
|
|
|
from .preferences import Preferences
|
|
|
|
from .preferences_dialog import PreferencesDialog
|
2009-06-01 09:55:11 +00:00
|
|
|
|
|
|
|
class DupeGuru(DupeGuruBase):
|
2011-09-20 22:40:27 +00:00
|
|
|
MODELCLASS = DupeGuruModel
|
2010-04-07 16:04:58 +00:00
|
|
|
EDITION = 'me'
|
2009-06-01 09:55:11 +00:00
|
|
|
LOGO_NAME = 'logo_me'
|
2011-01-21 12:57:54 +00:00
|
|
|
NAME = __appname__
|
2009-06-01 09:55:11 +00:00
|
|
|
|
2011-11-28 15:27:17 +00:00
|
|
|
DETAILS_DIALOG_CLASS = DetailsDialog
|
|
|
|
RESULT_MODEL_CLASS = ResultsModel
|
|
|
|
PREFERENCES_CLASS = Preferences
|
|
|
|
PREFERENCES_DIALOG_CLASS = PreferencesDialog
|
|
|
|
|
2009-06-01 09:55:11 +00:00
|
|
|
def _update_options(self):
|
|
|
|
DupeGuruBase._update_options(self)
|
2011-09-20 19:06:29 +00:00
|
|
|
self.model.scanner.min_match_percentage = self.prefs.filter_hardness
|
|
|
|
self.model.scanner.scan_type = self.prefs.scan_type
|
|
|
|
self.model.scanner.word_weighting = self.prefs.word_weighting
|
|
|
|
self.model.scanner.match_similar_words = self.prefs.match_similar
|
2009-06-01 09:55:11 +00:00
|
|
|
scanned_tags = set()
|
|
|
|
if self.prefs.scan_tag_track:
|
|
|
|
scanned_tags.add('track')
|
|
|
|
if self.prefs.scan_tag_artist:
|
|
|
|
scanned_tags.add('artist')
|
|
|
|
if self.prefs.scan_tag_album:
|
|
|
|
scanned_tags.add('album')
|
|
|
|
if self.prefs.scan_tag_title:
|
|
|
|
scanned_tags.add('title')
|
|
|
|
if self.prefs.scan_tag_genre:
|
|
|
|
scanned_tags.add('genre')
|
|
|
|
if self.prefs.scan_tag_year:
|
|
|
|
scanned_tags.add('year')
|
2011-09-20 19:06:29 +00:00
|
|
|
self.model.scanner.scanned_tags = scanned_tags
|
2009-06-01 09:55:11 +00:00
|
|
|
|