def show_more_tracks(self): obj = self.selected_objects[0] if isinstance(obj, Track): obj = obj.linked_files[0] dialog = TrackSearchDialog(self) dialog.load_similar_tracks(obj) dialog.exec_()
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"])
def search(self, text, search_type, adv=False): """Search on the MusicBrainz website.""" lookup = self.get_file_lookup() if config.setting["builtin_search"]: if search_type == "track" and not lookup.mbid_lookup( text, 'recording'): dialog = TrackSearchDialog(self.window) dialog.search(text) dialog.exec_() elif search_type == "album" and not lookup.mbid_lookup( text, 'release'): dialog = AlbumSearchDialog(self.window) dialog.search(text) dialog.exec_() elif search_type == "artist" and not lookup.mbid_lookup( text, 'artist'): dialog = ArtistSearchDialog(self.window) dialog.search(text) dialog.exec_() else: getattr(lookup, search_type + "_search")(text, adv)
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)