Skip to content
This repository has been archived by the owner on Oct 12, 2024. It is now read-only.

Commit

Permalink
utpm medium image, image tag and freez update
Browse files Browse the repository at this point in the history
  • Loading branch information
maksii committed Aug 30, 2024
1 parent 1ad5a0d commit dddf6d6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/image_upload_providers/utppm_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def upload(self, image_path):
response.raise_for_status()
response = response.json()
return {
'web_url': response.get('medium', response['image'])['url'],
'web_url': response['image']['medium']['url'],
'img_url': response['image']['url_viewer'],
'raw_url': response['image']['url']
}
2 changes: 1 addition & 1 deletion src/trackers/COMMON.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def generate_images_text(images, screen_count, size):
for image in images[:screen_count]:
web_url = image['web_url']
raw_url = image['raw_url']
images_text += f"[url={web_url}][img={size}]{raw_url}[/img][/url]"
images_text += f"[url={raw_url}][img={size}]{web_url}[/img][/url]"
return images_text

async def unit3d_edit_desc(self, meta, tracker, comparison=False, desc_header=""):
Expand Down
2 changes: 1 addition & 1 deletion upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def check_new_version():
latest_release = response.json()

# Check if running from a frozen executable
if getattr(sys, 'frozen', False):
if getattr(sys, 'frozen', True):
release_date_str = latest_release['published_at']
release_date = datetime.strptime(release_date_str, "%Y-%m-%dT%H:%M:%SZ").replace(tzinfo=timezone.utc)
current_time = datetime.now(timezone.utc)
Expand Down

0 comments on commit dddf6d6

Please sign in to comment.