Exemplo n.º 1
0
    def __on_rewind_clicked(self, button):
        """
        """
        seconds = 30 * self.ui.speed.get_speed()
        if self.ui.first_play:
            ns = seconds * 1000000000
            track = player.get_current_track()
            pos = track.position
            if (pos > ns):
                pos -= ns
            else:
                pos = 0
            player.save_current_track_position(pos=pos, track=track)
        else:
            player.rewind(seconds)

        # we want to see the jump imediatly therefore we apply the new time manually
        if self.progress_scale.get_value() > 30:
            self.progress_scale.set_value(self.progress_scale.get_value() - 30)
        else:
            self.progress_scale.set_value(0)
Exemplo n.º 2
0
 def rewind(self):
     if self.loaded_book:
         player.rewind(30 / self.loaded_book.playback_speed)
Exemplo n.º 3
0
 def _rewind_feature(self):
     if self._app_settings.replay:
         player.rewind(30 / self.loaded_book.playback_speed)
Exemplo n.º 4
0
 def _rewind_feature(self):
     if self._first_play and self._app_settings.replay:
         self._first_play = False
         player.rewind(30 / self.loaded_book.playback_speed)