コード例 #1
0
ファイル: showalbum.py プロジェクト: krig/jamaendo
 def start_track_fetcher(self):
     if self.fetcher:
         self.fetcher.stop()
         self.fetcher = None
     self.fetcher = Fetcher(
         lambda: jamaendo.get_tracks(self.album.ID),
         self,
         on_item=self.on_track_result,
         on_ok=self.on_track_complete,
         on_fail=self.on_track_complete,
     )
     self.fetcher.start()
コード例 #2
0
ファイル: showplaylist.py プロジェクト: krig/jamaendo
 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])