Compare commits
1 Commits
handle-emp
...
fix-new-cl
| Author | SHA1 | Date | |
|---|---|---|---|
| 047d09ffb1 |
@@ -170,10 +170,11 @@ def set_volume(
|
||||
if volume.startswith("+") or volume.startswith("-"):
|
||||
current_volume = api.get_volume()
|
||||
new_volume = max(0, min(100, current_volume + int(volume)))
|
||||
new_volume = int(new_volume)
|
||||
else:
|
||||
new_volume = int(volume)
|
||||
|
||||
rich.print(api.set_volume(volume), file=sys.stderr)
|
||||
rich.print(api.set_volume(new_volume), file=sys.stderr)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -294,7 +294,7 @@ class RemiApp(App):
|
||||
except api.APIError:
|
||||
playback_pos = None
|
||||
|
||||
if playback_pos and isinstance(playback_pos, dict) and playback_pos["current"] and playback_pos["total"]:
|
||||
if playback_pos:
|
||||
slider_pos = playback_pos["current"] / playback_pos["total"] * 100
|
||||
current = seconds_to_timestamp(playback_pos["current"])
|
||||
total = seconds_to_timestamp(playback_pos["total"])
|
||||
|
||||
Reference in New Issue
Block a user