Closes #23: Implemented go to album
This commit is contained in:
@@ -541,9 +541,13 @@ class SublimeMusicApp(Gtk.Application):
|
|||||||
self.update_window()
|
self.update_window()
|
||||||
|
|
||||||
def on_go_to_album(self, action, album_id):
|
def on_go_to_album(self, action, album_id):
|
||||||
# TODO
|
# Switch to the By Genre view to guarantee that the album is there.
|
||||||
|
album = CacheManager.get_album(album_id.get_string()).result()
|
||||||
|
self.state.current_album_sort = 'byGenre'
|
||||||
|
self.state.current_album_genre = album.genre
|
||||||
|
self.state.selected_album_id = album_id.get_string()
|
||||||
self.state.current_tab = 'albums'
|
self.state.current_tab = 'albums'
|
||||||
self.update_window()
|
self.update_window(force=True)
|
||||||
|
|
||||||
def on_go_to_artist(self, action, artist_id):
|
def on_go_to_artist(self, action, artist_id):
|
||||||
self.state.current_tab = 'artists'
|
self.state.current_tab = 'artists'
|
||||||
|
@@ -160,6 +160,13 @@ class AlbumsPanel(Gtk.Box):
|
|||||||
show_if('byYear', self.from_year_label, self.from_year_entry)
|
show_if('byYear', self.from_year_label, self.from_year_entry)
|
||||||
show_if('byYear', self.to_year_label, self.to_year_entry)
|
show_if('byYear', self.to_year_label, self.to_year_entry)
|
||||||
|
|
||||||
|
self.grid.update_params(
|
||||||
|
type_=state.current_album_sort,
|
||||||
|
alphabetical_type=state.current_album_alphabetical_sort,
|
||||||
|
from_year=state.current_album_from_year,
|
||||||
|
to_year=state.current_album_to_year,
|
||||||
|
genre=state.current_album_genre,
|
||||||
|
)
|
||||||
self.grid.update(
|
self.grid.update(
|
||||||
state,
|
state,
|
||||||
force=force,
|
force=force,
|
||||||
|
Reference in New Issue
Block a user