sticker-convert 2.7.6__tar.gz → 2.7.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. {sticker-convert-2.7.6/src/sticker_convert.egg-info → sticker-convert-2.7.7}/PKG-INFO +1 -1
  2. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/gui.py +5 -9
  3. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/gui_components/frames/progress_frame.py +67 -47
  4. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/version.py +1 -1
  5. {sticker-convert-2.7.6 → sticker-convert-2.7.7/src/sticker_convert.egg-info}/PKG-INFO +1 -1
  6. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/LICENSE +0 -0
  7. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/MANIFEST.in +0 -0
  8. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/README.md +0 -0
  9. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/pyproject.toml +0 -0
  10. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/requirements.txt +0 -0
  11. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/setup.cfg +0 -0
  12. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/__init__.py +0 -0
  13. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/__main__.py +0 -0
  14. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/cli.py +0 -0
  15. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/converter.py +0 -0
  16. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/definitions.py +0 -0
  17. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/downloaders/__init__.py +0 -0
  18. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/downloaders/download_base.py +0 -0
  19. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/downloaders/download_kakao.py +0 -0
  20. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/downloaders/download_line.py +0 -0
  21. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/downloaders/download_signal.py +0 -0
  22. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/downloaders/download_telegram.py +0 -0
  23. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/gui_components/__init__.py +0 -0
  24. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/gui_components/frames/__init__.py +0 -0
  25. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/gui_components/frames/comp_frame.py +0 -0
  26. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/gui_components/frames/config_frame.py +0 -0
  27. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/gui_components/frames/control_frame.py +0 -0
  28. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/gui_components/frames/cred_frame.py +0 -0
  29. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/gui_components/frames/input_frame.py +0 -0
  30. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/gui_components/frames/output_frame.py +0 -0
  31. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/gui_components/frames/right_clicker.py +0 -0
  32. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/gui_components/gui_utils.py +0 -0
  33. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/gui_components/windows/__init__.py +0 -0
  34. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/gui_components/windows/advanced_compression_window.py +0 -0
  35. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/gui_components/windows/base_window.py +0 -0
  36. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/gui_components/windows/kakao_get_auth_window.py +0 -0
  37. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/gui_components/windows/line_get_auth_window.py +0 -0
  38. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/gui_components/windows/signal_get_auth_window.py +0 -0
  39. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/ios-message-stickers-template/.github/FUNDING.yml +0 -0
  40. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/ios-message-stickers-template/.gitignore +0 -0
  41. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/ios-message-stickers-template/README.md +0 -0
  42. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/ios-message-stickers-template/stickers/Info.plist +0 -0
  43. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Info.plist +0 -0
  44. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Contents.json +0 -0
  45. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Contents.json +0 -0
  46. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 1.sticker/Contents.json +0 -0
  47. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 1.sticker/Sticker 1.png +0 -0
  48. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 2.sticker/Contents.json +0 -0
  49. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 2.sticker/Sticker 2.png +0 -0
  50. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 3.sticker/Contents.json +0 -0
  51. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 3.sticker/Sticker 3.png +0 -0
  52. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/App-Store-1024x1024pt.png +0 -0
  53. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Contents.json +0 -0
  54. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-App-Store-1024x768pt.png +0 -0
  55. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPad-67x50pt@2x.png +0 -0
  56. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPad-Pro-74x55pt@2x.png +0 -0
  57. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPhone-60x45pt@2x.png +0 -0
  58. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPhone-60x45pt@3x.png +0 -0
  59. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages27x20pt@2x.png +0 -0
  60. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages27x20pt@3x.png +0 -0
  61. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages32x24pt@2x.png +0 -0
  62. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages32x24pt@3x.png +0 -0
  63. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/iPad-Settings-29pt@2x.png +0 -0
  64. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/iPhone-Settings-29pt@3x.png +0 -0
  65. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/iPhone-settings-29pt@2x.png +0 -0
  66. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.pbxproj +0 -0
  67. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -0
  68. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -0
  69. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/xcuserdata/niklaspeterson.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  70. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/xcuserdata/niklaspeterson.xcuserdatad/xcschemes/xcschememanagement.plist +0 -0
  71. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/job.py +0 -0
  72. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/job_option.py +0 -0
  73. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/resources/NotoColorEmoji.ttf +0 -0
  74. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/resources/appicon.icns +0 -0
  75. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/resources/appicon.ico +0 -0
  76. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/resources/appicon.png +0 -0
  77. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/resources/compression.json +0 -0
  78. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/resources/emoji.json +0 -0
  79. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/resources/help.json +0 -0
  80. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/resources/input.json +0 -0
  81. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/resources/output.json +0 -0
  82. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/uploaders/__init__.py +0 -0
  83. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/uploaders/compress_wastickers.py +0 -0
  84. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/uploaders/upload_base.py +0 -0
  85. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/uploaders/upload_signal.py +0 -0
  86. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/uploaders/upload_telegram.py +0 -0
  87. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/uploaders/xcode_imessage.py +0 -0
  88. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/utils/auth/get_kakao_auth.py +0 -0
  89. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/utils/auth/get_line_auth.py +0 -0
  90. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/utils/auth/get_signal_auth.py +0 -0
  91. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/utils/callback.py +0 -0
  92. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/utils/files/cache_store.py +0 -0
  93. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/utils/files/json_manager.py +0 -0
  94. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/utils/files/json_resources_loader.py +0 -0
  95. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/utils/files/metadata_handler.py +0 -0
  96. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/utils/files/run_bin.py +0 -0
  97. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/utils/files/sanitize_filename.py +0 -0
  98. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/utils/media/apple_png_normalize.py +0 -0
  99. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/utils/media/codec_info.py +0 -0
  100. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/utils/media/decrypt_kakao.py +0 -0
  101. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/utils/media/format_verify.py +0 -0
  102. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert/utils/url_detect.py +0 -0
  103. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert.egg-info/SOURCES.txt +0 -0
  104. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert.egg-info/dependency_links.txt +0 -0
  105. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert.egg-info/entry_points.txt +0 -0
  106. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert.egg-info/requires.txt +0 -0
  107. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/src/sticker_convert.egg-info/top_level.txt +0 -0
  108. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/tests/test_compression.py +0 -0
  109. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/tests/test_download.py +0 -0
  110. {sticker-convert-2.7.6 → sticker-convert-2.7.7}/tests/test_export.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sticker-convert
3
- Version: 2.7.6
3
+ Version: 2.7.7
4
4
  Summary: Convert (animated) stickers to/from WhatsApp, Telegram, Signal, Line, Kakao, iMessage. Written in Python.
5
5
  Author-email: laggykiller <chaudominic2@gmail.com>
6
6
  Maintainer-email: laggykiller <chaudominic2@gmail.com>
@@ -8,7 +8,7 @@ from json.decoder import JSONDecodeError
8
8
  from math import ceil
9
9
  from multiprocessing import Event, cpu_count
10
10
  from pathlib import Path
11
- from threading import Lock, Thread
11
+ from threading import Thread
12
12
  from typing import Any, Callable, Dict, Optional, Union
13
13
  from urllib.parse import urlparse
14
14
 
@@ -161,8 +161,6 @@ class GUI(Window):
161
161
  self.settings_save_cred_var = BooleanVar()
162
162
 
163
163
  # Other
164
- self.msg_lock = Lock()
165
- self.bar_lock = Lock()
166
164
  self.response_event = Event()
167
165
  self.response = None
168
166
  self.action: Optional[Callable[..., Any]] = None
@@ -609,8 +607,7 @@ class GUI(Window):
609
607
  return False
610
608
 
611
609
  def cb_msg(self, *args: Any, **kwargs: Any) -> None:
612
- with self.msg_lock:
613
- self.progress_frame.update_message_box(*args, **kwargs)
610
+ self.progress_frame.update_message_box(*args, **kwargs)
614
611
 
615
612
  def cb_msg_block(
616
613
  self,
@@ -641,10 +638,9 @@ class GUI(Window):
641
638
  update_bar: int = 0,
642
639
  **kwargs: Any,
643
640
  ) -> None:
644
- with self.bar_lock:
645
- self.progress_frame.update_progress_bar(
646
- set_progress_mode, steps, update_bar, *args, **kwargs
647
- )
641
+ self.progress_frame.update_progress_bar(
642
+ set_progress_mode, steps, update_bar, *args, **kwargs
643
+ )
648
644
 
649
645
  def highlight_fields(self) -> bool:
650
646
  if not self.init_done:
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env python3
2
- from typing import TYPE_CHECKING, Any, Optional
2
+ from threading import Lock
3
+ from typing import TYPE_CHECKING, Any, List, Optional
3
4
 
4
5
  from tqdm import tqdm
5
6
  from ttkbootstrap import LabelFrame, Progressbar # type: ignore
@@ -15,13 +16,18 @@ class ProgressFrame(LabelFrame):
15
16
  progress_bar_cli = None
16
17
  progress_bar_steps = 0
17
18
  auto_scroll = True
19
+
18
20
  msg_cls = False
19
- msg_buffer = ""
21
+ msg_buffer: List[str] = []
22
+
20
23
  bar_mode_changed = False
21
24
  bar_mode = "clear"
22
25
  bar_updates = 0
23
26
  bar_steps = 0
24
27
 
28
+ msg_lock = Lock()
29
+ bar_lock = Lock()
30
+
25
31
  def __init__(self, gui: "GUI", *args: Any, **kwargs: Any) -> None:
26
32
  self.gui = gui
27
33
  super().__init__(*args, **kwargs) # type: ignore
@@ -46,12 +52,15 @@ class ProgressFrame(LabelFrame):
46
52
  update_bar: int = 0,
47
53
  ) -> None:
48
54
  if update_bar:
49
- self.bar_updates += update_bar
55
+ with self.bar_lock:
56
+ self.bar_updates += update_bar
57
+
50
58
  elif set_progress_mode:
51
- self.bar_mode = set_progress_mode
52
- self.bar_steps = steps
53
- self.bar_updates = 0
54
- self.bar_mode_changed = True
59
+ with self.bar_lock:
60
+ self.bar_mode = set_progress_mode
61
+ self.bar_steps = steps
62
+ self.bar_updates = 0
63
+ self.bar_mode_changed = True
55
64
 
56
65
  def update_message_box(self, *args: Any, **kwargs: Any) -> None:
57
66
  msg = kwargs.get("msg")
@@ -60,22 +69,30 @@ class ProgressFrame(LabelFrame):
60
69
  if not msg and len(args) == 1:
61
70
  msg = str(args[0])
62
71
 
63
- if cls:
64
- self.msg_cls = True
65
- self.msg_buffer = ""
66
-
67
72
  if msg:
68
- self.msg_buffer += msg + "\n"
73
+ with self.msg_lock:
74
+ self.msg_buffer.append(msg)
75
+
76
+ elif cls:
77
+ with self.msg_lock:
78
+ self.msg_cls = True
79
+ self.msg_buffer.clear()
69
80
 
70
81
  def update_ui(self) -> None:
71
- if self.msg_cls or self.msg_buffer:
82
+ if self.msg_buffer or self.msg_cls:
83
+ with self.msg_lock:
84
+ msg_cls = self.msg_cls
85
+ msg = "\n".join(self.msg_buffer)
86
+
87
+ self.msg_cls = False
88
+ self.msg_buffer.clear()
89
+
72
90
  self.message_box._text.config(state="normal") # type: ignore
73
91
 
74
- if self.msg_cls:
92
+ if msg_cls:
75
93
  self.message_box.delete(1.0, "end") # type: ignore
76
94
 
77
- if self.msg_buffer:
78
- msg = self.msg_buffer.strip()
95
+ if msg:
79
96
  if self.progress_bar_cli:
80
97
  self.progress_bar_cli.write(msg)
81
98
  else:
@@ -86,39 +103,42 @@ class ProgressFrame(LabelFrame):
86
103
  if self.auto_scroll:
87
104
  self.message_box._text.yview_moveto(1.0) # type: ignore
88
105
 
89
- self.msg_cls = False
90
- self.msg_buffer = ""
91
-
92
106
  self.message_box._text.config(state="disabled") # type: ignore
93
107
 
94
- if self.bar_mode_changed:
95
- if self.bar_mode == "determinate":
96
- self.progress_bar_cli = tqdm(total=self.bar_steps)
97
- self.progress_bar.config(mode="determinate")
98
- self.progress_bar_steps = self.bar_steps
99
- self.progress_bar.stop()
100
- elif self.progress_bar_cli:
101
- self.progress_bar_cli.close()
102
- self.progress_bar_cli = None
103
-
104
- if self.bar_mode == "indeterminate":
105
- self.progress_bar.config(mode="indeterminate")
106
- self.progress_bar.start(50)
107
- elif self.bar_mode == "clear":
108
- self.progress_bar.config(mode="determinate")
109
- self.progress_bar.stop()
110
-
111
- self.progress_bar["value"] = 0
112
-
113
- if self.bar_updates and self.progress_bar_cli:
114
- self.progress_bar_cli.update(self.bar_updates)
115
- self.progress_bar["value"] += (
116
- 100 / self.progress_bar_steps * self.bar_updates
117
- )
118
- self.update_progress_bar(update_bar=self.bar_updates)
119
-
120
- self.bar_mode_changed = False
121
- self.bar_updates = 0
108
+ if self.bar_mode_changed or self.bar_updates:
109
+ with self.bar_lock:
110
+ bar_mode_changed = self.bar_mode_changed
111
+ bar_mode = self.bar_mode
112
+ bar_updates = self.bar_updates
113
+ bar_steps = self.bar_steps
114
+
115
+ self.bar_mode_changed = False
116
+ self.bar_updates = 0
117
+
118
+ if bar_mode_changed:
119
+ if bar_mode == "determinate":
120
+ self.progress_bar_cli = tqdm(total=bar_steps)
121
+ self.progress_bar.config(mode="determinate")
122
+ self.progress_bar_steps = bar_steps
123
+ self.progress_bar.stop()
124
+ elif self.progress_bar_cli:
125
+ self.progress_bar_cli.close()
126
+ self.progress_bar_cli = None
127
+
128
+ if bar_mode == "indeterminate":
129
+ self.progress_bar.config(mode="indeterminate")
130
+ self.progress_bar.start(50)
131
+ elif bar_mode == "clear":
132
+ self.progress_bar.config(mode="determinate")
133
+ self.progress_bar.stop()
134
+
135
+ self.progress_bar["value"] = 0
136
+
137
+ if bar_updates and self.progress_bar_cli:
138
+ self.progress_bar_cli.update(bar_updates)
139
+ self.progress_bar["value"] += (
140
+ 100 / self.progress_bar_steps * bar_updates
141
+ )
122
142
 
123
143
  self.after(40, self.update_ui)
124
144
 
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env python3
2
2
 
3
- __version__ = "2.7.6"
3
+ __version__ = "2.7.7"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sticker-convert
3
- Version: 2.7.6
3
+ Version: 2.7.7
4
4
  Summary: Convert (animated) stickers to/from WhatsApp, Telegram, Signal, Line, Kakao, iMessage. Written in Python.
5
5
  Author-email: laggykiller <chaudominic2@gmail.com>
6
6
  Maintainer-email: laggykiller <chaudominic2@gmail.com>
File without changes