def __init__( self, name, display_name=None, poll=2.5, mime_types=None, rating=False, extra_file_actions=None, extra_playlist_actions=None, ): display_name = display_name or name if rating: max_rating = 5 else: max_rating = 0 all_file_actions = FILE_ACTIONS + tuple(extra_file_actions or ()) PlayerAdapter.__init__( self, display_name, max_rating=max_rating, playback_known=True, volume_known=True, repeat_known=True, shuffle_known=True, progress_known=True, file_actions=all_file_actions, mime_types=mime_types, ) self.__playlist_actions = PLAYLIST_ACTIONS if self.config.getx("playlist-jump-enabled", "0", int): self.__playlist_actions.append(IA_JUMP) if extra_playlist_actions: self.__playlist_actions.extend(extra_playlist_actions) self.__name = name self.__dbus_signal_handler = () self._mp_p = None self._mp_t = None self._repeat = False self._shuffle = False self._playing = PLAYBACK_STOP self.__volume = 0 self.__progress_now = 0 self.__progress_max = 0 self.__can_pause = False self.__can_play = False self.__can_seek = False self.__can_next = False self.__can_prev = False self.__can_tracklist = False log.debug("init done")
def __init__(self, name, display_name=None, poll=2.5, mime_types=None, rating=False, extra_file_actions=None, extra_playlist_actions=None): display_name = display_name or name if rating: max_rating = 5 else: max_rating = 0 all_file_actions = FILE_ACTIONS + tuple(extra_file_actions or ()) PlayerAdapter.__init__(self, display_name, max_rating=max_rating, playback_known=True, volume_known=True, repeat_known=True, shuffle_known=True, progress_known=True, file_actions=all_file_actions, mime_types=mime_types) self.__playlist_actions = PLAYLIST_ACTIONS if self.config.getx("playlist-jump-enabled", "0", int): self.__playlist_actions.append(IA_JUMP) if extra_playlist_actions: self.__playlist_actions.extend(extra_playlist_actions) self.__name = name self.__dbus_signal_handler = () self._mp_p = None self._mp_t = None self._repeat = False self._shuffle = False self._playing = PLAYBACK_STOP self.__volume = 0 self.__progress_now = 0 self.__progress_max = 0 self.__can_pause = False self.__can_play = False self.__can_seek = False self.__can_next = False self.__can_prev = False self.__can_tracklist = False log.debug("init done")