mirror of
https://github.com/fergalmoran/picard.git
synced 2026-02-24 00:26:08 +00:00
Fix CD lookup
tagger.lookup_cd is connected to by a QMenu.triggered and a QAction.triggered. The latter sends a "checked" argument even if the QAction is not checkable, so action is never None. The old-style signal syntax allowed you to ignore arguments for certain connections.
This commit is contained in:
@@ -534,12 +534,12 @@ class Tagger(QtGui.QApplication):
|
||||
else:
|
||||
disc.lookup()
|
||||
|
||||
def lookup_cd(self, action=None):
|
||||
def lookup_cd(self, action):
|
||||
"""Reads CD from the selected drive and tries to lookup the DiscID on MusicBrainz."""
|
||||
if action is None:
|
||||
device = self.config.setting["cd_lookup_device"].split(",", 1)[0]
|
||||
else:
|
||||
if isinstance(action, QtGui.QAction):
|
||||
device = unicode(action.text())
|
||||
else:
|
||||
device = self.config.setting["cd_lookup_device"].split(",", 1)[0]
|
||||
|
||||
disc = Disc()
|
||||
self.set_wait_cursor()
|
||||
|
||||
Reference in New Issue
Block a user