コード例 #1
0
ファイル: mainwindow.py プロジェクト: ctsanders1/picard
 def search(self):
     """Search for album, artist or track on the MusicBrainz website."""
     text = self.search_edit.text()
     type = self.search_combo.itemData(self.search_combo.currentIndex())
     if config.setting["builtin_search"]:
         if type == "track":
             dialog = TrackSearchDialog(self)
             dialog.search(text)
             dialog.exec_()
     else:
         self.tagger.search(text, type,
                            config.setting["use_adv_search_syntax"])
コード例 #2
0
ファイル: tagger.py プロジェクト: JDLH/picard
 def search(self, text, type, adv=False):
     """Search on the MusicBrainz website."""
     lookup = self.get_file_lookup()
     if config.setting["builtin_search"]:
         if type == "track" and not lookup.mbidLookup(text, 'recording'):
             dialog = TrackSearchDialog(self.window)
             dialog.search(text)
             dialog.exec_()
         elif type == "album" and not lookup.mbidLookup(text, 'release'):
             dialog = AlbumSearchDialog(self.window)
             dialog.search(text)
             dialog.exec_()
         elif type == "artist" and not lookup.mbidLookup(text, 'artist'):
             dialog = ArtistSearchDialog(self.window)
             dialog.search(text)
             dialog.exec_()
     else:
         getattr(lookup, type + "Search")(text, adv)
コード例 #3
0
ファイル: tagger.py プロジェクト: ironmann250/picard
 def search(self, text, type, adv=False):
     """Search on the MusicBrainz website."""
     lookup = self.get_file_lookup()
     if config.setting["builtin_search"]:
         if type == "track" and not lookup.mbidLookup(text, 'recording'):
             dialog = TrackSearchDialog(self.window)
             dialog.search(text)
             dialog.exec_()
         elif type == "album" and not lookup.mbidLookup(text, 'release'):
             dialog = AlbumSearchDialog(self.window)
             dialog.search(text)
             dialog.exec_()
         elif type == "artist" and not lookup.mbidLookup(text, 'artist'):
             dialog = ArtistSearchDialog(self.window)
             dialog.search(text)
             dialog.exec_()
     else:
         getattr(lookup, type + "Search")(text, adv)