def open_item(self, item): if isinstance(item, jamaendo.Album): tracks = jamaendo.get_tracks(item.ID) if tracks: wnd = open_playerwindow() wnd.play_tracks(tracks) elif isinstance(item, jamaendo.Artist): from showartist import ShowArtist wnd = ShowArtist(item) wnd.show_all() elif isinstance(item, jamaendo.Track): wnd = open_playerwindow() wnd.play_tracks([item])
def row_activated(self, treeview, path, view_column): # TODO: wait for all tracks to load _id = self.tracks.get_track_id(path) playlist = Playlist(self.tracklist) playlist.jump_to(_id) wnd = open_playerwindow() wnd.play_tracks(playlist)
def open_item(self, item): if isinstance(item, jamaendo.Album): wnd = ShowAlbum(item) wnd.show_all() elif isinstance(item, jamaendo.Artist): wnd = ShowArtist(item) wnd.show_all() elif isinstance(item, jamaendo.Track): wnd = open_playerwindow() wnd.play_tracks([item])
def on_tag_complete(self, wnd, error=None): if wnd is self: taglist = self.fetcher.taglist self.fetcher.stop() if not error: wnd = open_playerwindow() wnd.play_tracks(taglist) else: banner = hildon.hildon_banner_show_information(self, '', "Error getting tracks") banner.set_timeout(2000) self.fetcher = None
def open_item(self, item): if isinstance(item, jamaendo.Album): wnd = ShowAlbum(item) wnd.show_all() elif isinstance(item, jamaendo.Artist): wnd = ShowArtist(item) wnd.show_all() elif isinstance(item, jamaendo.Track): playlist = Playlist(self.items) playlist.jump_to(item.ID) wnd = open_playerwindow() wnd.play_tracks(playlist) elif isinstance(item, jamaendo.Tag): self.start_tag_fetcher(item.ID)
def on_player(*args): from playerwindow import open_playerwindow open_playerwindow()
def on_player(self, button): open_playerwindow()
def row_activated(self, treeview, path, view_column): name, _id = self.radiolist.get_radio_id(path) wnd = open_playerwindow() wnd.play_radio(name, _id)