def _on_new_playlist_activate(self, item, songs) -> Optional[Playlist]: parent = get_menu_item_top_parent(item) title = Playlist.suggested_name_for(songs) title = self._get_new_name(parent, title) if title is None: return None return self.pl_lib.create_from_songs(songs, title=title)
def _on_new_playlist_activate(self, item, songs): parent = get_menu_item_top_parent(item) title = Playlist.suggested_name_for(songs) title = GetPlaylistName(qltk.get_top_parent(parent)).run(title) if title is None: return playlist = FileBackedPlaylist.new(PLAYLISTS, title) playlist.extend(songs) PlaylistsBrowser.changed(playlist)
def _on_new_playlist_activate(self, item, songs): parent = get_menu_item_top_parent(item) title = Playlist.suggested_name_for(songs) title = self._get_new_name(parent, title) if title is None: return playlist = FileBackedPlaylist.new(PLAYLISTS, title, library=app.library) playlist.extend(songs) self._emit_new(playlist)
def _on_new_playlist_activate(self, item, songs): parent = get_menu_item_top_parent(item) title = Playlist.suggested_name_for(songs) title = self._get_new_name(parent, title) if title is None: return playlist = FileBackedPlaylist.new(PLAYLISTS, title, library=self.librarian) playlist.extend(songs) self._emit_new(playlist)