def script_announceRemainingTime(self, gesture):
audioPos = self.getAudioPos(raw=True)
if not audioPos or " " in audioPos or not self.getTrackLength():
# Translators: An error message presented when remaining time cannot be anounced.
ui.message(_("Cannot tell you remaining time for the current track"))
else:
if ":" in audioPos:
ui.message(self.getRemainingTime(audioPos))
elif float(audioPos) == 0.0:
ui.message(self.getTrackLength())
else:
ui.message(self.getRemainingTime(audioPos))
# Audio channels and zoom level.
评论列表
文章目录