Пример #1
0
 def _add_albums(self, albums):
     """
         Pop an album and add it to the view,
         repeat operation until album list is empty
         @param [album ids as int]
     """
     size_group = Gtk.SizeGroup(mode=Gtk.SizeGroupMode.HORIZONTAL)
     widget = AlbumDetailedWidget(albums.pop(0), self._genre_id,
                                  self._pop_allowed, False, size_group)
     widget.connect('finished', self._on_album_finished, albums)
     widget.show()
     start_new_thread(widget.populate, ())
     self._albumbox.add(widget)
Пример #2
0
 def _add_albums(self, albums):
     """
         Pop an album and add it to the view,
         repeat operation until album list is empty
         @param [album ids as int]
     """
     size_group = Gtk.SizeGroup(mode=Gtk.SizeGroupMode.HORIZONTAL)
     widget = AlbumDetailedWidget(albums.pop(0), self._genre_id, self._artist_id is not None, size_group)
     widget.connect("finished", self._on_album_finished, albums)
     widget.show()
     t = Thread(target=widget.populate)
     t.daemon = True
     t.start()
     self._albumbox.add(widget)
Пример #3
0
 def _add_albums(self, albums):
     """
         Pop an album and add it to the view,
         repeat operation until album list is empty
         @param [album ids as int]
     """
     size_group = Gtk.SizeGroup(mode=Gtk.SizeGroupMode.HORIZONTAL)
     widget = AlbumDetailedWidget(albums.pop(0), self._genre_id,
                                  self._artist_id is not None, size_group)
     widget.connect('finished', self._on_album_finished, albums)
     widget.show()
     t = Thread(target=widget.populate)
     t.daemon = True
     t.start()
     self._albumbox.add(widget)
Пример #4
0
 def _add_albums(self, albums):
     """
         Pop an album and add it to the view,
         repeat operation until album list is empty
         @param [album ids as int]
     """
     size_group = Gtk.SizeGroup(mode=Gtk.SizeGroupMode.HORIZONTAL)
     widget = AlbumDetailedWidget(albums.pop(0),
                                  self._genre_id,
                                  self._pop_allowed,
                                  False,
                                  size_group)
     widget.connect('finished', self._on_album_finished, albums)
     widget.show()
     start_new_thread(widget.populate, ())
     self._albumbox.add(widget)
Пример #5
0
 def _add_albums(self, albums):
     """
         Pop an album and add it to the view,
         repeat operation until album list is empty
         @param [album ids as int]
     """
     size_group = Gtk.SizeGroup(mode=Gtk.SizeGroupMode.HORIZONTAL)
     widget = AlbumDetailedWidget(albums.pop(0),
                                  self._genre_ids,
                                  self._artist_ids,
                                  size_group)
     # Not needed if only one album
     if self._albums_count == 1:
         widget.disable_play_all()
     widget.connect('finished', self._on_album_finished, albums)
     widget.show()
     t = Thread(target=widget.populate)
     t.daemon = True
     t.start()
     self._albumbox.add(widget)
Пример #6
0
 def __add_albums(self, albums):
     """
         Pop an album and add it to the view,
         repeat operation until album list is empty
         @param [album ids as int]
     """
     if albums and not self._stop:
         album_id = albums.pop(0)
         widget = AlbumDetailedWidget(album_id, self._genre_ids,
                                      self._artist_ids, self.__show_cover)
         widget.set_filter_func(self._filter_func)
         widget.connect('overlayed', self._on_overlayed)
         self._lazy_queue.append(widget)
         widget.show()
         self._albumbox.add(widget)
         GLib.idle_add(self.__add_albums, albums)
     else:
         self.__spinner.stop()
         self.__spinner.hide()
         self.emit('populated')
         GLib.idle_add(self.lazy_loading)
 def __add_albums(self, albums):
     """
         Pop an album and add it to the view,
         repeat operation until album list is empty
         @param [album ids as int]
     """
     if albums and not self._stop:
         album_id = albums.pop(0)
         widget = AlbumDetailedWidget(album_id,
                                      self._genre_ids,
                                      self._artist_ids,
                                      self.__show_cover)
         widget.set_filter_func(self._filter_func)
         widget.connect('overlayed', self._on_overlayed)
         self._lazy_queue.append(widget)
         widget.show()
         self._albumbox.add(widget)
         GLib.idle_add(self.__add_albums, albums)
     else:
         self.__spinner.stop()
         self.__spinner.hide()
         self.emit('populated')
         GLib.idle_add(self.lazy_loading)