Skip to content

Commit

Permalink
- Fix unable to verify and upload stickers
Browse files Browse the repository at this point in the history
- Fix Line sticker ID input reported as invalid
  • Loading branch information
laggykiller committed Oct 5, 2023
1 parent 9ec1086 commit db2b1ec
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion msicreator.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"upgrade_guid": "1279FFE1-5C4A-4354-B0A0-5A3FCF2719E3",
"version": "2.1.3",
"version": "2.1.4",
"product_name": "sticker-convert",
"manufacturer": "laggykiller",
"name": "sticker-convert",
Expand Down
2 changes: 1 addition & 1 deletion src/sticker_convert/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env python3
'''sticker-convert'''
__version__ = '2.1.3'
__version__ = '2.1.4'
2 changes: 1 addition & 1 deletion src/sticker_convert/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ def highlight_fields(self) -> bool:
self.input_frame.address_entry.config(bootstyle='warning')

elif (download_option != input_option and
not (input_option == 'kakao' and url.isnumeric())):
not (input_option in ('kakao', 'line') and url.isnumeric())):

self.input_frame.address_entry.config(bootstyle='danger')
self.input_frame.address_tip.config(text=f"Invalid URL. {self.input_presets[input_option_display]['example']}")
Expand Down
10 changes: 8 additions & 2 deletions src/sticker_convert/uploaders/xcode_imessage.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,14 @@ class XcodeImessageIconset:
def __init__(self):
self.iconset = {}

with open('ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Contents.json') as f:
dict = json.load(f)
if os.path.isdir('ios-message-stickers-template'):
with open('ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Contents.json') as f:
dict = json.load(f)
elif os.path.isfile('ios-message-stickers-template.zip'):
with zipfile.ZipFile('ios-message-stickers-template.zip', 'r') as f:
dict = json.loads(f.read('stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Contents.json').decode())
else:
raise FileNotFoundError('ios-message-stickers-template not found')

for i in dict['images']:
filename = i['filename']
Expand Down

0 comments on commit db2b1ec

Please sign in to comment.