From bad7efb977300f74529d7769743dd84e198b5a16 Mon Sep 17 00:00:00 2001 From: Jim Easterbrook Date: Mon, 13 May 2024 07:55:21 +0100 Subject: [PATCH 1/2] Use https in Ipernity uploader --- src/photini/ipernity.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/photini/ipernity.py b/src/photini/ipernity.py index a4cac635..9c081869 100644 --- a/src/photini/ipernity.py +++ b/src/photini/ipernity.py @@ -1,6 +1,6 @@ ## Photini - a simple photo metadata editor. ## http://github.com/jim-easterbrook/Photini -## Copyright (C) 2022-23 Jim Easterbrook jim@jim-easterbrook.me.uk +## Copyright (C) 2022-24 Jim Easterbrook jim@jim-easterbrook.me.uk ## ## This program is free software: you can redistribute it and/or ## modify it under the terms of the GNU General Public License as @@ -40,8 +40,8 @@ # requests: https://docs.python-requests.org/ class IpernitySession(UploaderSession): - api_url = 'http://api.ipernity.com/api/' - auth_url = 'http://www.ipernity.com/apps/authorize' + api_url = 'https://api.ipernity.com/api/' + auth_url = 'https://www.ipernity.com/apps/authorize' def sign_request(self, method, params): params = dict(params) From 18b06fdfe301bdac3f5df3ea44a0b0a63a65f953 Mon Sep 17 00:00:00 2001 From: Jim Easterbrook Date: Wed, 5 Jun 2024 11:45:27 +0100 Subject: [PATCH 2/2] Allow setting ownership template if date is empty This should fix bug #239 (The problem occurs because I didn't update this module when changing "empty" metadata from 'None' to an empty Photini data type.) --- src/photini/ownership.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/photini/ownership.py b/src/photini/ownership.py index ee9f0c57..106e8c6e 100644 --- a/src/photini/ownership.py +++ b/src/photini/ownership.py @@ -1,6 +1,6 @@ ## Photini - a simple photo metadata editor. ## http://github.com/jim-easterbrook/Photini -## Copyright (C) 2021-23 Jim Easterbrook jim@jim-easterbrook.me.uk +## Copyright (C) 2021-24 Jim Easterbrook jim@jim-easterbrook.me.uk ## ## This program is free software: you can redistribute it and/or ## modify it under the terms of the GNU General Public License as @@ -349,10 +349,10 @@ def init_template(self): template = {} for image in self.app.image_list.get_selected_images(): date_taken = image.metadata.date_taken - if date_taken is None: - date_taken = datetime.now() - else: + if date_taken: date_taken = date_taken['datetime'] + else: + date_taken = datetime.now() year = str(date_taken.year) for key in self.widgets: value = self._get_value(image, key)