sticker-convert 2.10.7__py3-none-any.whl → 2.10.8__py3-none-any.whl

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.
@@ -154,8 +154,7 @@ class UploadTelegram(UploadBase):
154
154
 
155
155
  init_input_stickers: List[InputSticker] = []
156
156
  sticker_format = None
157
- sticker_format_prev = None
158
- for count, src in enumerate(stickers):
157
+ for src in stickers:
159
158
  self.cb.put(f"Verifying {src} for uploading to telegram")
160
159
 
161
160
  emoji = extract_emojis(emoji_dict.get(Path(src).stem, ""))
@@ -206,29 +205,7 @@ class UploadTelegram(UploadBase):
206
205
  )
207
206
 
208
207
  if sticker_set is None:
209
- if count < 50 and (
210
- sticker_format_prev is None
211
- or sticker_format_prev == sticker_format
212
- ):
213
- init_input_stickers.append(input_sticker)
214
- else:
215
- start_msg = f"Creating pack and bulk uploading {count} stickers with same format of {pack_short_name}"
216
- finish_msg = f"Created pack and bulk uploaded {count} stickers with same format of {pack_short_name}"
217
- error_msg = f"Cannot create pack and bulk upload {count} stickers with same format of {pack_short_name} due to"
218
- self.cb.put(start_msg)
219
- try:
220
- await bot.create_new_sticker_set(
221
- user_id=self.telegram_userid,
222
- name=pack_short_name,
223
- title=pack_title,
224
- stickers=init_input_stickers,
225
- sticker_type=sticker_type,
226
- )
227
- sticker_set = True
228
- self.cb.put(finish_msg)
229
- except TelegramError as e:
230
- self.cb.put(f"{error_msg} {e}")
231
- return None
208
+ init_input_stickers.append(input_sticker)
232
209
  else:
233
210
  try:
234
211
  # We could use tg.start_soon() here
@@ -252,7 +229,24 @@ class UploadTelegram(UploadBase):
252
229
  f"Cannot upload sticker {src} of {pack_short_name} due to {e}"
253
230
  )
254
231
 
255
- sticker_format_prev = sticker_format
232
+ if sticker_set is None and len(init_input_stickers) > 0:
233
+ start_msg = f"Creating pack and bulk uploading {len(init_input_stickers)} stickers with same format of {pack_short_name}"
234
+ finish_msg = f"Created pack and bulk uploaded {len(init_input_stickers)} stickers with same format of {pack_short_name}"
235
+ error_msg = f"Cannot create pack and bulk upload {len(init_input_stickers)} stickers with same format of {pack_short_name} due to"
236
+ self.cb.put(start_msg)
237
+ try:
238
+ await bot.create_new_sticker_set(
239
+ user_id=self.telegram_userid,
240
+ name=pack_short_name,
241
+ title=pack_title,
242
+ stickers=init_input_stickers,
243
+ sticker_type=sticker_type,
244
+ )
245
+ sticker_set = True
246
+ self.cb.put(finish_msg)
247
+ except TelegramError as e:
248
+ self.cb.put(f"{error_msg} {e}")
249
+ return None
256
250
 
257
251
  cover_path = MetadataHandler.get_cover(self.opt_output.dir)
258
252
  if cover_path:
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env python3
2
2
 
3
- __version__ = "2.10.7"
3
+ __version__ = "2.10.8"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sticker-convert
3
- Version: 2.10.7
3
+ Version: 2.10.8
4
4
  Summary: Convert (animated) stickers to/from WhatsApp, Telegram, Signal, Line, Kakao, Viber, Discord, iMessage. Written in Python.
5
5
  Author-email: laggykiller <chaudominic2@gmail.com>
6
6
  Maintainer-email: laggykiller <chaudominic2@gmail.com>
@@ -363,13 +363,13 @@ Classifier: Programming Language :: Python :: 3 :: Only
363
363
  Requires-Python: >=3.9
364
364
  Description-Content-Type: text/markdown
365
365
  License-File: LICENSE
366
- Requires-Dist: aiolimiter~=1.1.0
366
+ Requires-Dist: aiolimiter~=1.2.0
367
367
  Requires-Dist: anyio~=4.6.2.post1
368
368
  Requires-Dist: apngasm_python~=1.3.1
369
369
  Requires-Dist: av~=13.1.0
370
370
  Requires-Dist: beautifulsoup4~=4.12.3
371
371
  Requires-Dist: rookiepy~=0.5.6
372
- Requires-Dist: httpx~=0.27.2
372
+ Requires-Dist: httpx~=0.28.0
373
373
  Requires-Dist: imagequant~=1.1.3
374
374
  Requires-Dist: memory-tempfile~=2.2.3
375
375
  Requires-Dist: mergedeep~=1.3.4
@@ -377,7 +377,7 @@ Requires-Dist: mini-racer~=0.12.4
377
377
  Requires-Dist: numpy>=1.22.4
378
378
  Requires-Dist: Pillow~=11.0.0
379
379
  Requires-Dist: pyoxipng~=9.0.0
380
- Requires-Dist: python-telegram-bot~=21.7
380
+ Requires-Dist: python-telegram-bot~=21.8
381
381
  Requires-Dist: psutil~=6.1.0
382
382
  Requires-Dist: PyMemoryEditor~=1.5.22
383
383
  Requires-Dist: requests~=2.32.3
@@ -6,7 +6,7 @@ sticker_convert/definitions.py,sha256=ZhP2ALCEud-w9ZZD4c3TDG9eHGPZyaAL7zPUsJAbjt
6
6
  sticker_convert/gui.py,sha256=IsVCXr5_6mzBgIgXtUICI3fcKu51J9WaLE9MBLrm5t4,33064
7
7
  sticker_convert/job.py,sha256=ae0DKz74nctDLSI0VU7BYI4dx3kwTM8ynky_aLspQVU,26491
8
8
  sticker_convert/job_option.py,sha256=HgoiZs9JBjki5_fjAp8l3y3kdAWvU7FEAgtPsy4MRt0,7818
9
- sticker_convert/version.py,sha256=bYJEHSoUxGC_5BYlNNnbAGjQP4nl-tH0j9HcAjHIcLk,47
9
+ sticker_convert/version.py,sha256=OZn0jQlnvhvxvGhU3J4oI8rnSR5dr-YAVroNKeFGbZ0,47
10
10
  sticker_convert/downloaders/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  sticker_convert/downloaders/download_base.py,sha256=a34JcNBgZ5yf6gZnxc-B5uNaKVUG-vs3sjOJnLneWsw,4468
12
12
  sticker_convert/downloaders/download_discord.py,sha256=HeQFjJ7igb5KOk0aXQAUEuJ9OoPKyiE_mAD2_AW9PDw,3435
@@ -81,7 +81,7 @@ sticker_convert/uploaders/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJW
81
81
  sticker_convert/uploaders/compress_wastickers.py,sha256=j5gLXwRHjEtmV2Kqv_-KkU8eeW6cZMo3hoSMvT4PKVk,5984
82
82
  sticker_convert/uploaders/upload_base.py,sha256=uQupPn6r4zrlAzpKzzX7CgvZb69ATyrwPKahWOQj0ds,1203
83
83
  sticker_convert/uploaders/upload_signal.py,sha256=UuJdzwGAQsKhtj2Pkn4-jvak4Set0XI5XG1pEH2KDvI,6452
84
- sticker_convert/uploaders/upload_telegram.py,sha256=7_hfPhnSNY40vC2DEhOI53_-U-D3ZiXv5casNVK69Mk,15708
84
+ sticker_convert/uploaders/upload_telegram.py,sha256=8p8A_e3OR-t6dwFUzq6XxJiUbotEk1Xv7yDGwX3B_CE,15378
85
85
  sticker_convert/uploaders/upload_viber.py,sha256=fkAnsVyWc8vyK24--O4LyPgT-xvt-sAoBfeSWyUOeEg,6152
86
86
  sticker_convert/uploaders/xcode_imessage.py,sha256=5UObj4DvfJ6yL1m71grQeZtqhl4BiZmoYwsVeCO_Rrc,11217
87
87
  sticker_convert/utils/callback.py,sha256=spYUGlklOs1yPZAxoqwOWgR1sdimpfM8a27if3TaVYk,6155
@@ -105,9 +105,9 @@ sticker_convert/utils/media/apple_png_normalize.py,sha256=LbrQhc7LlYX4I9ek4XJsZE
105
105
  sticker_convert/utils/media/codec_info.py,sha256=XoEWBfPWTzr4zSVQIU1XF1yh5viHxH5FytNEpdZR38c,14874
106
106
  sticker_convert/utils/media/decrypt_kakao.py,sha256=4wq9ZDRnFkx1WmFZnyEogBofiLGsWQM_X69HlA36578,1947
107
107
  sticker_convert/utils/media/format_verify.py,sha256=oM32P186tWe9YxvBQRPr8D3FEmBN3b2rEe_2S_MwxyQ,6236
108
- sticker_convert-2.10.7.dist-info/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
109
- sticker_convert-2.10.7.dist-info/METADATA,sha256=0emOJ8oIvhGydLxuGL66DOk2MnUyxe8SdPm6RR-JbaM,52495
110
- sticker_convert-2.10.7.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
111
- sticker_convert-2.10.7.dist-info/entry_points.txt,sha256=MNJ7XyC--ugxi5jS1nzjDLGnxCyLuaGdsVLnJhDHCqs,66
112
- sticker_convert-2.10.7.dist-info/top_level.txt,sha256=r9vfnB0l1ZnH5pTH5RvkobnK3Ow9m0RsncaOMAtiAtk,16
113
- sticker_convert-2.10.7.dist-info/RECORD,,
108
+ sticker_convert-2.10.8.dist-info/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
109
+ sticker_convert-2.10.8.dist-info/METADATA,sha256=X1BMOFJp0oayshTYSdN2C18vx0m6zN9QbhYj2xQ6jXQ,52495
110
+ sticker_convert-2.10.8.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
111
+ sticker_convert-2.10.8.dist-info/entry_points.txt,sha256=MNJ7XyC--ugxi5jS1nzjDLGnxCyLuaGdsVLnJhDHCqs,66
112
+ sticker_convert-2.10.8.dist-info/top_level.txt,sha256=r9vfnB0l1ZnH5pTH5RvkobnK3Ow9m0RsncaOMAtiAtk,16
113
+ sticker_convert-2.10.8.dist-info/RECORD,,