PICARD-1624: Fix saving options without AUTO_DETECT_DRIVES

Since 995281f saving options without CD auto detection available caused an error.
This commit is contained in:
Philipp Wolfer
2019-10-08 09:16:37 +02:00
parent 9ac535bf9b
commit 416267f929

View File

@@ -70,9 +70,12 @@ class CDLookupOptionsPage(OptionsPage):
def save(self):
if AUTO_DETECT_DRIVES:
config.setting["cd_lookup_device"] = self.ui.cd_lookup_device.currentText()
drives = self.drives
else:
config.setting["cd_lookup_device"] = self.ui.cd_lookup_device.text()
self.tagger.window.update_cd_lookup_drives(self.drives)
selected_drive = self.ui.cd_lookup_device.text()
config.setting["cd_lookup_device"] = selected_drive
drives = [selected_drive]
self.tagger.window.update_cd_lookup_drives(drives)
register_options_page(CDLookupOptionsPage)