QProgressBar_value_replaced_to_int.patch 999 B

1234567891011121314151617181920212223
  1. From c47d47ab7f66a1973b1314ef531de2fb444c2fe6 Mon Sep 17 00:00:00 2001
  2. From: Ilias Stamatis <ilstam@mailbox.org>
  3. Date: Wed, 22 Dec 2021 14:43:22 +0000
  4. Subject: [PATCH] QProgressBar.setValue() expects an int, not a float
  5. ---
  6. ffmulticonverter/progress.py | 2 +-
  7. 1 file changed, 1 insertion(+), 1 deletion(-)
  8. diff --git a/ffmulticonverter/progress.py b/ffmulticonverter/progress.py
  9. index 5d14efc..e196ef4 100755
  10. --- a/ffmulticonverter/progress.py
  11. +++ b/ffmulticonverter/progress.py
  12. @@ -304,7 +304,7 @@ def convert_video(self, from_file, to_file, command):
  13. time = utils.duration_in_seconds(time)
  14. now_sec = int(float(time))
  15. try:
  16. - self.nowQPBar.setValue(100 * now_sec / total)
  17. + self.nowQPBar.setValue(int(100 * now_sec / total))
  18. except (UnboundLocalError, ZeroDivisionError):
  19. pass
  20. self.update_text_edit_signal.emit(myline)