From cab47f37bce9e0c7dffe5561e392294648819f6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eddy=20Leli=C3=A8vre-Berna?= Date: Sat, 25 Nov 2023 18:21:15 +0100 Subject: [PATCH 01/15] Retrieves save_visits parameter introduced with Piwigo 14 --- .../piwigoWebAPI/piwigoWebAPI.swift | 3 +- .../pwg.session/pwg.session.getStatus.json | 25 ++++++++------- piwigo.xcodeproj/project.pbxproj | 31 ++++++++++++++----- .../xcschemes/piwigoWebAPI.xcscheme | 3 +- .../pwg.session/pwg.session.getStatus.swift | 2 ++ 5 files changed, 41 insertions(+), 23 deletions(-) diff --git a/Supporting Targets/piwigoWebAPI/piwigoWebAPI.swift b/Supporting Targets/piwigoWebAPI/piwigoWebAPI.swift index 89bf575cf..2f42604ad 100644 --- a/Supporting Targets/piwigoWebAPI/piwigoWebAPI.swift +++ b/Supporting Targets/piwigoWebAPI/piwigoWebAPI.swift @@ -514,7 +514,8 @@ class piwigoWebAPI: XCTestCase { XCTAssertEqual(result.status, "ok") XCTAssertEqual(result.data?.userName, "Eddy") - XCTAssertEqual(result.data?.language, "fr_FR") + XCTAssertEqual(result.data?.language, "en_GB") + XCTAssertTrue(result.data?.saveVisits ?? false) } func testPwgSessionLogoutDecoding() { diff --git a/Supporting Targets/piwigoWebAPI/pwg.session/pwg.session.getStatus.json b/Supporting Targets/piwigoWebAPI/pwg.session/pwg.session.getStatus.json index 32aa799d8..08da0940b 100644 --- a/Supporting Targets/piwigoWebAPI/pwg.session/pwg.session.getStatus.json +++ b/Supporting Targets/piwigoWebAPI/pwg.session/pwg.session.getStatus.json @@ -1,5 +1,15 @@ { + "stat": "ok", "result": { + "username": "Eddy", + "status": "webmaster", + "theme": "modus", + "language": "en_GB", + "pwg_token": "5b9087800b6fbd67b8f5b0facfd55696", + "charset": "utf-8", + "current_datetime": "2023-11-25 16:24:21", + "version": "14.0.0RC1", + "save_visits": true, "available_sizes": [ "square", "thumb", @@ -11,16 +21,7 @@ "xlarge", "xxlarge" ], - "charset": "utf-8", - "current_datetime": "2022-02-19 23:04:17", - "language": "fr_FR", - "pwg_token": "8814066d722b4ce75aaa5110e0019b9f", - "status": "webmaster", - "theme": "bootstrap_darkroom", - "upload_file_types": "jpg,jpeg,png,gif,tif,tiff,mp4,m4v,mpg,ogg,ogv,webm,webmv,strm", - "upload_form_chunk_size": 1024, - "username": "Eddy", - "version": "12.2.0" - }, - "stat": "ok" + "upload_file_types": "jpg,jpeg,png,gif,webp,tif,tiff,mp4,m4v,mpg,ogg,ogv,webm,webmv,heic", + "upload_form_chunk_size": 1024 + } } diff --git a/piwigo.xcodeproj/project.pbxproj b/piwigo.xcodeproj/project.pbxproj index f8c203c48..0667c81ba 100644 --- a/piwigo.xcodeproj/project.pbxproj +++ b/piwigo.xcodeproj/project.pbxproj @@ -29,6 +29,10 @@ AD09E2FF2A90D6DD00D8E134 /* VideoDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD09E2FE2A90D6DD00D8E134 /* VideoDetailViewController.swift */; }; AD09E3032A92A05C00D8E134 /* SettingsViewController+Privacy.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD09E3022A92A05C00D8E134 /* SettingsViewController+Privacy.swift */; }; AD09E3052A92A13D00D8E134 /* SettingsViewController+Upload.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD09E3042A92A13D00D8E134 /* SettingsViewController+Upload.swift */; }; + AD0A0D062B125F5B007552A9 /* piwigoKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AD084E462659A27100159FE1 /* piwigoKit.framework */; }; + AD0A0D072B125F5B007552A9 /* piwigoKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = AD084E462659A27100159FE1 /* piwigoKit.framework */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + AD0A0D092B125F5D007552A9 /* uploadKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AD2C623A2A4896A600671582 /* uploadKit.framework */; }; + AD0A0D0A2B125F5D007552A9 /* uploadKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = AD2C623A2A4896A600671582 /* uploadKit.framework */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; AD0ED1002441C42200C69178 /* SliderTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD0ED0FF2441C42200C69178 /* SliderTableViewCell.swift */; }; AD0ED1022441CEC200C69178 /* SwitchTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD0ED1012441CEC200C69178 /* SwitchTableViewCell.swift */; }; AD0ED1042441F65B00C69178 /* TextFieldTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD0ED1032441F65B00C69178 /* TextFieldTableViewCell.swift */; }; @@ -81,7 +85,6 @@ AD27B87325A7A91800528F5F /* ShareUtilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD27B87225A7A91800528F5F /* ShareUtilities.swift */; }; AD2913E926696A9500403026 /* NetworkVars.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD97CFB7265B0DBE00719ED5 /* NetworkVars.swift */; }; AD29BC972A4B73B400777390 /* pwg.tags.getAdminList2.json in Resources */ = {isa = PBXBuildFile; fileRef = AD29BC962A4B73B400777390 /* pwg.tags.getAdminList2.json */; }; - AD29BC982A4B774900777390 /* uploadKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AD2C623A2A4896A600671582 /* uploadKit.framework */; }; AD2A21FE24310E65006B1A8A /* SelectPrivacyViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AD2A21FD24310E65006B1A8A /* SelectPrivacyViewController.storyboard */; }; AD2B0A15243D001A00AF1FEE /* DefaultAlbumThumbnailSizeViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AD2B0A14243D001A00AF1FEE /* DefaultAlbumThumbnailSizeViewController.storyboard */; }; AD2B0A17243D00CD00AF1FEE /* DefaultAlbumThumbnailSizeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD2B0A16243D00CD00AF1FEE /* DefaultAlbumThumbnailSizeViewController.swift */; }; @@ -406,7 +409,6 @@ ADEFBD632074E19000DFAD26 /* CategoryTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = ADEFBD622074E19000DFAD26 /* CategoryTableViewCell.xib */; }; ADF1CC75243D111600D75319 /* SelectCategoryViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF1CC74243D111600D75319 /* SelectCategoryViewController.swift */; }; ADF1CC77243D132100D75319 /* SelectCategoryViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = ADF1CC76243D132100D75319 /* SelectCategoryViewController.storyboard */; }; - ADF232A126D40EB0002ACEC9 /* piwigoKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AD084E462659A27100159FE1 /* piwigoKit.framework */; settings = {ATTRIBUTES = (Required, ); }; }; ADF26FBF24C200040036E778 /* TagTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF26FBD24C200040036E778 /* TagTableViewCell.swift */; }; ADF26FC024C200040036E778 /* TagsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF26FBE24C200040036E778 /* TagsViewController.swift */; }; ADF35E7928B283A8009F3ECE /* Server+CoreDataClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF35E7728B283A8009F3ECE /* Server+CoreDataClass.swift */; }; @@ -506,6 +508,18 @@ name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; }; + AD0A0D082B125F5B007552A9 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + AD0A0D0A2B125F5D007552A9 /* uploadKit.framework in Embed Frameworks */, + AD0A0D072B125F5B007552A9 /* piwigoKit.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ @@ -1057,8 +1071,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - AD29BC982A4B774900777390 /* uploadKit.framework in Frameworks */, - ADF232A126D40EB0002ACEC9 /* piwigoKit.framework in Frameworks */, + AD0A0D092B125F5D007552A9 /* uploadKit.framework in Frameworks */, + AD0A0D062B125F5B007552A9 /* piwigoKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2219,6 +2233,7 @@ AD11E45A24A930B000C8876F /* Sources */, AD11E45B24A930B000C8876F /* Frameworks */, AD11E45C24A930B000C8876F /* Resources */, + AD0A0D082B125F5B007552A9 /* Embed Frameworks */, ); buildRules = ( ); @@ -3389,7 +3404,7 @@ PROVISIONING_PROFILE_SPECIFIER = ""; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; - SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OBJC_BRIDGING_HEADER = ""; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -3408,10 +3423,10 @@ CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_IDENTITY = "Apple Development"; - CODE_SIGN_STYLE = Automatic; + CODE_SIGN_STYLE = Manual; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = ZU5THW8T5W; + DEVELOPMENT_TEAM = ""; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = "Supporting Targets/piwigoWebAPI/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 12.0; @@ -3427,7 +3442,7 @@ PROVISIONING_PROFILE_SPECIFIER = ""; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; - SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_OBJC_BRIDGING_HEADER = ""; SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 5.0; diff --git a/piwigo.xcodeproj/xcshareddata/xcschemes/piwigoWebAPI.xcscheme b/piwigo.xcodeproj/xcshareddata/xcschemes/piwigoWebAPI.xcscheme index 22cbe59ba..c7305fe8f 100644 --- a/piwigo.xcodeproj/xcshareddata/xcschemes/piwigoWebAPI.xcscheme +++ b/piwigo.xcodeproj/xcshareddata/xcschemes/piwigoWebAPI.xcscheme @@ -13,8 +13,7 @@ shouldUseLaunchSchemeArgsEnv = "YES"> + skipped = "NO"> Date: Sat, 25 Nov 2023 18:35:07 +0100 Subject: [PATCH 02/15] Stores 'saveVisits' parameter of pwg.session.getStatus in global variable for future use --- piwigoKit/Network/NetworkVars.swift | 3 +++ piwigoKit/Network/pwg.session/PwgSession+Session.swift | 3 +++ 2 files changed, 6 insertions(+) diff --git a/piwigoKit/Network/NetworkVars.swift b/piwigoKit/Network/NetworkVars.swift index 43354242a..461a1114c 100644 --- a/piwigoKit/Network/NetworkVars.swift +++ b/piwigoKit/Network/NetworkVars.swift @@ -145,4 +145,7 @@ public class NetworkVars: NSObject { public static var hasLargeSizeImages = false public static var hasXLargeSizeImages = false public static var hasXXLargeSizeImages = false + + /// — True is the app should log visits and downloads (since Piwigo 14) + public static var saveVisits = false } diff --git a/piwigoKit/Network/pwg.session/PwgSession+Session.swift b/piwigoKit/Network/pwg.session/PwgSession+Session.swift index 8e4cf3f55..29a26c0c7 100644 --- a/piwigoKit/Network/pwg.session/PwgSession+Session.swift +++ b/piwigoKit/Network/pwg.session/PwgSession+Session.swift @@ -188,6 +188,9 @@ public extension PwgSession { NetworkVars.hasXLargeSizeImages = data.imageSizes?.contains("xlarge") ?? false NetworkVars.hasXXLargeSizeImages = data.imageSizes?.contains("xxlarge") ?? false completion(data.userName ?? "") + + // Should the app log visits and downloads? (since Piwigo 14) + NetworkVars.saveVisits = data.saveVisits ?? false } catch { // Data cannot be digested From c4a0efdfa84b00003947b5c8724298023533e4a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eddy=20Leli=C3=A8vre-Berna?= Date: Sun, 26 Nov 2023 17:01:53 +0100 Subject: [PATCH 03/15] Corrects comment, JSON variable name --- .../pwg.history/pwg.history.log.json | 7 +++ .../pwg.history/PgSession+History.swift | 9 +++ .../Network/pwg.history/pwg.history.log.swift | 63 +++++++++++++++++++ .../pwg.images/PwgSession+Images.swift | 12 ++-- 4 files changed, 85 insertions(+), 6 deletions(-) create mode 100644 Supporting Targets/piwigoWebAPI/pwg.history/pwg.history.log.json create mode 100644 piwigoKit/Network/pwg.history/PgSession+History.swift create mode 100644 piwigoKit/Network/pwg.history/pwg.history.log.swift diff --git a/Supporting Targets/piwigoWebAPI/pwg.history/pwg.history.log.json b/Supporting Targets/piwigoWebAPI/pwg.history/pwg.history.log.json new file mode 100644 index 000000000..ff18b13ba --- /dev/null +++ b/Supporting Targets/piwigoWebAPI/pwg.history/pwg.history.log.json @@ -0,0 +1,7 @@ +{ + "result" : { + "id" : 587, + "info" : "Album added", + }, + "stat" : "ok", +} diff --git a/piwigoKit/Network/pwg.history/PgSession+History.swift b/piwigoKit/Network/pwg.history/PgSession+History.swift new file mode 100644 index 000000000..6ff87b2de --- /dev/null +++ b/piwigoKit/Network/pwg.history/PgSession+History.swift @@ -0,0 +1,9 @@ +// +// PgSession+History.swift +// piwigoKit +// +// Created by Eddy Lelièvre-Berna on 26/11/2023. +// Copyright © 2023 Piwigo.org. All rights reserved. +// + +import Foundation diff --git a/piwigoKit/Network/pwg.history/pwg.history.log.swift b/piwigoKit/Network/pwg.history/pwg.history.log.swift new file mode 100644 index 000000000..46e8ba4c2 --- /dev/null +++ b/piwigoKit/Network/pwg.history/pwg.history.log.swift @@ -0,0 +1,63 @@ +// +// pwg.history.log.swift +// piwigoKit +// +// Created by Eddy Lelièvre-Berna on 26/11/2023. +// Copyright © 2023 Piwigo.org. All rights reserved. +// + +import Foundation + +// MARK: - pwg.history.log +public let pwgHistoryLog = "format=json&method=pwg.history.log" + +public struct HistoryLogJSON: Decodable { + + public var status: String? + public var success = false + public var errorCode = 0 + public var errorMessage = "" + + private enum RootCodingKeys: String, CodingKey { + case status = "stat" + case errorCode = "err" + case errorMessage = "message" + } + + private enum ErrorCodingKeys: String, CodingKey { + case code = "code" + case message = "msg" + } + + public init(from decoder: Decoder) throws + { + // Root container keyed by RootCodingKeys + let rootContainer = try decoder.container(keyedBy: RootCodingKeys.self) + + // Status returned by Piwigo + status = try rootContainer.decodeIfPresent(String.self, forKey: .status) + if status == "ok" + { + success = true + } + else if status == "fail" + { + do { + // Retrieve Piwigo server error + errorCode = try rootContainer.decode(Int.self, forKey: .errorCode) + errorMessage = try rootContainer.decode(String.self, forKey: .errorMessage) + } + catch { + // Error container keyed by ErrorCodingKeys ("format=json" forgotten in call) + let errorContainer = try rootContainer.nestedContainer(keyedBy: ErrorCodingKeys.self, forKey: .errorCode) + errorCode = Int(try errorContainer.decode(String.self, forKey: .code)) ?? NSNotFound + errorMessage = try errorContainer.decode(String.self, forKey: .message) + } + } + else { + // Unexpected Piwigo server error + errorCode = -1 + errorMessage = NSLocalizedString("serverUnknownError_message", comment: "Unexpected error encountered while calling server method with provided parameters.") + } + } +} diff --git a/piwigoKit/Network/pwg.images/PwgSession+Images.swift b/piwigoKit/Network/pwg.images/PwgSession+Images.swift index cd4aa41a5..057c9fd41 100644 --- a/piwigoKit/Network/pwg.images/PwgSession+Images.swift +++ b/piwigoKit/Network/pwg.images/PwgSession+Images.swift @@ -20,20 +20,20 @@ public extension PwgSession { jsonObjectClientExpectsToReceive: ImagesExistJSON.self, countOfBytesClientExpectsToReceive: pwgImagesExistBytes) { jsonData in do { - // Decode the JSON into codable type CommunityUploadCompletedJSON. + // Decode the JSON into codable type ImagesExistJSON. let decoder = JSONDecoder() - let uploadJSON = try decoder.decode(ImagesExistJSON.self, from: jsonData) + let imageJSON = try decoder.decode(ImagesExistJSON.self, from: jsonData) // Piwigo error? - if uploadJSON.errorCode != 0 { + if imageJSON.errorCode != 0 { // Will retry later - let error = self.localizedError(for: uploadJSON.errorCode, - errorMessage: uploadJSON.errorMessage) + let error = self.localizedError(for: imageJSON.errorCode, + errorMessage: imageJSON.errorMessage) failure(error) return } - if let imageID = uploadJSON.data.first(where: {$0.md5sum == md5sum})?.imageID { + if let imageID = imageJSON.data.first(where: {$0.md5sum == md5sum})?.imageID { completion(imageID) } else { completion(nil) From 29985d55d098c3552dcb3fc432c30cfdfec59670 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eddy=20Leli=C3=A8vre-Berna?= Date: Sun, 26 Nov 2023 17:32:22 +0100 Subject: [PATCH 04/15] Disables scrollView logs --- piwigo/Image/ImageDetailViewController.swift | 16 ++++++++-------- piwigo/Image/VideoDetailViewController.swift | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/piwigo/Image/ImageDetailViewController.swift b/piwigo/Image/ImageDetailViewController.swift index 0ad0f6ef2..1b72773df 100644 --- a/piwigo/Image/ImageDetailViewController.swift +++ b/piwigo/Image/ImageDetailViewController.swift @@ -220,10 +220,10 @@ class ImageDetailViewController: UIViewController // Set zoom scale range scrollView.minimumZoomScale = minScale scrollView.maximumZoomScale = max(maxScale, 1) - debugPrint("••> Did reset scrollView scale: ") - debugPrint(" Scale: \(scrollView.minimumZoomScale) to \(scrollView.maximumZoomScale); now: \(scrollView.zoomScale); soon: x\(zoomFactor)") - debugPrint(" Offset: \(scrollView.contentOffset)") - debugPrint(" Inset : \(scrollView.contentInset)") +// debugPrint("••> Did reset scrollView scale: ") +// debugPrint(" Scale: \(scrollView.minimumZoomScale) to \(scrollView.maximumZoomScale); now: \(scrollView.zoomScale); soon: x\(zoomFactor)") +// debugPrint(" Offset: \(scrollView.contentOffset)") +// debugPrint(" Inset : \(scrollView.contentInset)") // Next line calls scrollViewDidZoom() if zoomScale has changed let newZoomScale = minScale * zoomFactor @@ -261,10 +261,10 @@ class ImageDetailViewController: UIViewController scrollView.contentOffset.y = -verticalSpace } - debugPrint("••> Did updateScrollViewInset: ") - debugPrint(" Scale: \(scrollView.minimumZoomScale) to \(scrollView.maximumZoomScale); now: \(scrollView.zoomScale)") - debugPrint(" Offset: \(scrollView.contentOffset)") - debugPrint(" Inset : \(scrollView.contentInset)") +// debugPrint("••> Did updateScrollViewInset: ") +// debugPrint(" Scale: \(scrollView.minimumZoomScale) to \(scrollView.maximumZoomScale); now: \(scrollView.zoomScale)") +// debugPrint(" Offset: \(scrollView.contentOffset)") +// debugPrint(" Inset : \(scrollView.contentInset)") // Remember position of image // calcImagePositionInScrollView() diff --git a/piwigo/Image/VideoDetailViewController.swift b/piwigo/Image/VideoDetailViewController.swift index f1a97cb8b..40248e08e 100644 --- a/piwigo/Image/VideoDetailViewController.swift +++ b/piwigo/Image/VideoDetailViewController.swift @@ -241,10 +241,10 @@ class VideoDetailViewController: UIViewController // Set zoom scale range scrollView.minimumZoomScale = minScale scrollView.maximumZoomScale = 2 * maxScale - debugPrint("••> Did reset scrollView scale: ") - debugPrint(" Scale: \(scrollView.minimumZoomScale) to \(scrollView.maximumZoomScale); now: \(scrollView.zoomScale); soon: x\(zoomFactor)") - debugPrint(" Offset: \(scrollView.contentOffset)") - debugPrint(" Inset : \(scrollView.contentInset)") +// debugPrint("••> Did reset scrollView scale: ") +// debugPrint(" Scale: \(scrollView.minimumZoomScale) to \(scrollView.maximumZoomScale); now: \(scrollView.zoomScale); soon: x\(zoomFactor)") +// debugPrint(" Offset: \(scrollView.contentOffset)") +// debugPrint(" Inset : \(scrollView.contentInset)") // Next line calls scrollViewDidZoom() if zoomScale has changed let newZoomScale = minScale * zoomFactor @@ -281,10 +281,10 @@ class VideoDetailViewController: UIViewController // Show video with controls videoContainerView.isHidden = false videoControls.isHidden = navigationController?.isNavigationBarHidden ?? false - debugPrint("••> Did updateScrollViewInset: ") - debugPrint(" Scale: \(scrollView.minimumZoomScale) to \(scrollView.maximumZoomScale); now: \(scrollView.zoomScale)") - debugPrint(" Offset: \(scrollView.contentOffset)") - debugPrint(" Inset : \(scrollView.contentInset)") +// debugPrint("••> Did updateScrollViewInset: ") +// debugPrint(" Scale: \(scrollView.minimumZoomScale) to \(scrollView.maximumZoomScale); now: \(scrollView.zoomScale)") +// debugPrint(" Offset: \(scrollView.contentOffset)") +// debugPrint(" Inset : \(scrollView.contentInset)") } func updateImageMetadata(with data: Image) { From f4c781ee250c892aff8bfea781379339b854ea19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eddy=20Leli=C3=A8vre-Berna?= Date: Sun, 26 Nov 2023 18:39:07 +0100 Subject: [PATCH 05/15] Fixes testPwgImagesGetInfoDecoding() test --- Supporting Targets/piwigoWebAPI/piwigoWebAPI.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Supporting Targets/piwigoWebAPI/piwigoWebAPI.swift b/Supporting Targets/piwigoWebAPI/piwigoWebAPI.swift index 2f42604ad..a379d59d5 100644 --- a/Supporting Targets/piwigoWebAPI/piwigoWebAPI.swift +++ b/Supporting Targets/piwigoWebAPI/piwigoWebAPI.swift @@ -421,7 +421,7 @@ class piwigoWebAPI: XCTestCase { } XCTAssertEqual(result.status, "ok") - XCTAssertEqual(result.data.md5checksum, "7870f465dd76af3f0bd6d4f087afa5cd") + XCTAssertEqual(result.data.md5checksum, "3175a7347fd5d6348935ec955f52a9e3") XCTAssertEqual(result.data.derivatives.largeImage?.height?.intValue, 756) } From 1c919f6a15f02e1724b9eb6b9bf0c23bbc31df43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eddy=20Leli=C3=A8vre-Berna?= Date: Sun, 26 Nov 2023 18:40:55 +0100 Subject: [PATCH 06/15] Fixes #257 (requires Piwigo 14) --- .../piwigoWebAPI/piwigoWebAPI.swift | 23 +++++++++ .../pwg.history/pwg.history.log.json | 7 +-- piwigo.xcodeproj/project.pbxproj | 30 +++++++++++ .../ImageViewController+Share.swift | 3 ++ piwigo/Image/ImageViewController.swift | 24 ++++++++- .../pwg.history/PwgSession+History.swift | 51 +++++++++++++++++++ .../Network/pwg.history/pwg.history.log.swift | 1 + 7 files changed, 133 insertions(+), 6 deletions(-) create mode 100644 piwigoKit/Network/pwg.history/PwgSession+History.swift diff --git a/Supporting Targets/piwigoWebAPI/piwigoWebAPI.swift b/Supporting Targets/piwigoWebAPI/piwigoWebAPI.swift index a379d59d5..045d3256d 100644 --- a/Supporting Targets/piwigoWebAPI/piwigoWebAPI.swift +++ b/Supporting Targets/piwigoWebAPI/piwigoWebAPI.swift @@ -466,6 +466,29 @@ class piwigoWebAPI: XCTestCase { } + // MARK: - pwg.history.… + func testPwgSessionHistoryLogDecoding() { + + // Case of a successful request + let bundle = Bundle(for: type(of: self)) + guard let url = bundle.url(forResource: "pwg.history.log", withExtension: "json"), + let data = try? Data(contentsOf: url) else { + XCTFail("Could not load resource file") + return + } + + let decoder = JSONDecoder() + guard let result = try? decoder.decode(HistoryLogJSON.self, from: data) else { + XCTFail() + return + } + + XCTAssertEqual(result.status, "ok") + XCTAssertEqual(result.errorCode, 0) + XCTAssertEqual(result.errorMessage, "") + } + + // MARK: - pwg.session.… func testPwgSessionLoginDecoding() { // Case of a successful request diff --git a/Supporting Targets/piwigoWebAPI/pwg.history/pwg.history.log.json b/Supporting Targets/piwigoWebAPI/pwg.history/pwg.history.log.json index ff18b13ba..652cacab8 100644 --- a/Supporting Targets/piwigoWebAPI/pwg.history/pwg.history.log.json +++ b/Supporting Targets/piwigoWebAPI/pwg.history/pwg.history.log.json @@ -1,7 +1,4 @@ { - "result" : { - "id" : 587, - "info" : "Album added", - }, - "stat" : "ok", + "stat": "ok", + "result": null } diff --git a/piwigo.xcodeproj/project.pbxproj b/piwigo.xcodeproj/project.pbxproj index 0667c81ba..9c9ce607e 100644 --- a/piwigo.xcodeproj/project.pbxproj +++ b/piwigo.xcodeproj/project.pbxproj @@ -146,6 +146,7 @@ AD42D08124448B7C00F0BAC1 /* LocalAlbumsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD42D08024448B7C00F0BAC1 /* LocalAlbumsViewController.swift */; }; AD42D08324448F2400F0BAC1 /* LocalAlbumsViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AD42D08224448F2400F0BAC1 /* LocalAlbumsViewController.storyboard */; }; AD42D08524449FF000F0BAC1 /* LocalImageCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD42D08424449FF000F0BAC1 /* LocalImageCollectionViewCell.swift */; }; + AD4379312B13B0B300BC8D09 /* pwg.history.log.json in Resources */ = {isa = PBXBuildFile; fileRef = ADD485BD2B139D3D00C7E30E /* pwg.history.log.json */; }; AD439E4425E14C3600333A91 /* PasteboardObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD439E4325E14C3600333A91 /* PasteboardObject.swift */; }; AD44870C29056D50001288E4 /* AlbumSmart.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD44870B29056D50001288E4 /* AlbumSmart.swift */; }; AD45D8AB2444D1CD00CBE206 /* LocalImagesHeaderReusableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD45D8AA2444D1CD00CBE206 /* LocalImagesHeaderReusableView.swift */; }; @@ -348,6 +349,9 @@ ADD063BD26A08973002558D2 /* Intents.intentdefinition in Sources */ = {isa = PBXBuildFile; fileRef = AD7783B2267E4AB700317F36 /* Intents.intentdefinition */; }; ADD210412440CC7600DD79A6 /* SettingsViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = ADD210402440CC7600DD79A6 /* SettingsViewController.storyboard */; }; ADD210432440DE5A00DD79A6 /* SettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADD210422440DE5A00DD79A6 /* SettingsViewController.swift */; }; + ADD485C12B13A16400C7E30E /* PwgSession+History.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADD485C02B13A16400C7E30E /* PwgSession+History.swift */; }; + ADD485C22B13A23D00C7E30E /* pwg.history.log.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADD485BF2B139EC700C7E30E /* pwg.history.log.swift */; }; + ADD485C32B13A24500C7E30E /* pwg.history.log.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADD485BF2B139EC700C7E30E /* pwg.history.log.swift */; }; ADD511A4285F79C700AD3FEC /* TagsViewController+Add.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADD511A3285F79C700AD3FEC /* TagsViewController+Add.swift */; }; ADD511A6285F7D0700AD3FEC /* TagsViewController+Search.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADD511A5285F7D0700AD3FEC /* TagsViewController+Search.swift */; }; ADD741F62699974800B47056 /* UploadPhotoSizeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADD741F52699974800B47056 /* UploadPhotoSizeViewController.swift */; }; @@ -949,6 +953,9 @@ ADD210402440CC7600DD79A6 /* SettingsViewController.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = SettingsViewController.storyboard; sourceTree = ""; }; ADD210422440DE5A00DD79A6 /* SettingsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsViewController.swift; sourceTree = ""; }; ADD3DD5825A9D53C00FD377F /* ImageMetadata.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageMetadata.swift; sourceTree = ""; }; + ADD485BD2B139D3D00C7E30E /* pwg.history.log.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = pwg.history.log.json; sourceTree = ""; }; + ADD485BF2B139EC700C7E30E /* pwg.history.log.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = pwg.history.log.swift; sourceTree = ""; }; + ADD485C02B13A16400C7E30E /* PwgSession+History.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PwgSession+History.swift"; sourceTree = ""; }; ADD511A3285F79C700AD3FEC /* TagsViewController+Add.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "TagsViewController+Add.swift"; sourceTree = ""; }; ADD511A5285F7D0700AD3FEC /* TagsViewController+Search.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "TagsViewController+Search.swift"; sourceTree = ""; }; ADD6AE9F22E25DA800347BC8 /* en */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/PrivacyPolicy.strings; sourceTree = ""; }; @@ -1208,6 +1215,7 @@ ADF2329F26D4072A002ACEC9 /* pwg */, AD5A31682847FD8A00948FEE /* pwg.categories */, ADD79A4124A9424900428C58 /* pwg.images */, + ADD485BC2B139D0400C7E30E /* pwg.history */, AD211A8227BAFCDD005D5E4F /* pwg.session */, AD5F64E624C601B500660BE3 /* pwg.tags */, ADDD2100270A0B5200CACFF2 /* pwg.users */, @@ -1322,6 +1330,7 @@ ADF2329C26D40619002ACEC9 /* pwg */, AD5A31652847F85F00948FEE /* pwg.categories */, AD9A1BE424E03AC700D22C86 /* pwg.images */, + ADD485BE2B139EB900C7E30E /* pwg.history */, AD211A8427BAFD51005D5E4F /* pwg.session */, AD9A1BE624E03BFF00D22C86 /* pwg.tags */, ADDD2102270A0CAB00CACFF2 /* pwg.users */, @@ -1752,6 +1761,23 @@ path = Privacy; sourceTree = ""; }; + ADD485BC2B139D0400C7E30E /* pwg.history */ = { + isa = PBXGroup; + children = ( + ADD485BD2B139D3D00C7E30E /* pwg.history.log.json */, + ); + path = pwg.history; + sourceTree = ""; + }; + ADD485BE2B139EB900C7E30E /* pwg.history */ = { + isa = PBXGroup; + children = ( + ADD485BF2B139EC700C7E30E /* pwg.history.log.swift */, + ADD485C02B13A16400C7E30E /* PwgSession+History.swift */, + ); + path = pwg.history; + sourceTree = ""; + }; ADD714512301E0B000A1B7B2 /* Images */ = { isa = PBXGroup; children = ( @@ -2443,6 +2469,7 @@ AD6759B028D77D81009C69EC /* pwg.categories.getImages.json in Resources */, AD807F1126E5331B00008162 /* pwg.images.delete.json in Resources */, AD06E3822A42275D007CACD7 /* pwg.images.exist.json in Resources */, + AD4379312B13B0B300BC8D09 /* pwg.history.log.json in Resources */, ADBCABDB26D41562005D1BB2 /* pwg.images.getInfo.json in Resources */, ADBCABDC26D41562005D1BB2 /* pwg.images.setInfo.json in Resources */, ADBCABDD26D41562005D1BB2 /* pwg.images.upload.json in Resources */, @@ -2742,6 +2769,7 @@ ADFFD44B268A29E6001F00E8 /* Location+CoreDataClass.swift in Sources */, ADFFD44C268A29E6001F00E8 /* Location+CoreDataProperties.swift in Sources */, AD94F643266D6E1D00EFC6A9 /* LocationProvider.swift in Sources */, + ADD485C22B13A23D00C7E30E /* pwg.history.log.swift in Sources */, AD94F644266D6E2100EFC6A9 /* LocationError.swift in Sources */, AD2C62312A488F4D00671582 /* UploadVars.swift in Sources */, ADFFD448268A2953001F00E8 /* Upload+CoreDataClass.swift in Sources */, @@ -2759,6 +2787,7 @@ ADF72E9A2670D7340027E2CC /* community.images.uploadCompleted.swift in Sources */, AD211A9327C15827005D5E4F /* community.session.getStatus.swift in Sources */, AD673C202A4B83750080BC0B /* PwgSession+Community.swift in Sources */, + ADD485C12B13A16400C7E30E /* PwgSession+History.swift in Sources */, AD211A7F27BADEA5005D5E4F /* reflection.getMethodList.swift in Sources */, AD673C1E2A4B83170080BC0B /* PwgSession+Reflection.swift in Sources */, AD807F0626E52B8D00008162 /* pwg.getInfos.swift in Sources */, @@ -2795,6 +2824,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + ADD485C32B13A24500C7E30E /* pwg.history.log.swift in Sources */, AD11E46124A930B000C8876F /* piwigoWebAPI.swift in Sources */, AD865773284CFE6D00C06EF4 /* community.categories.getList.swift in Sources */, AD38C04D24AF746000CDC765 /* community.images.uploadCompleted.swift in Sources */, diff --git a/piwigo/Image/Extensions/ImageViewController+Share.swift b/piwigo/Image/Extensions/ImageViewController+Share.swift index 8eda4b4fd..7aa342046 100644 --- a/piwigo/Image/Extensions/ImageViewController+Share.swift +++ b/piwigo/Image/Extensions/ImageViewController+Share.swift @@ -124,6 +124,9 @@ extension ImageViewController // Cancel download task NotificationCenter.default.post(name: .pwgCancelDownload, object: nil) } + } else { + // Update server statistics + logImageVisitIfNeeded(imageData.pwgID, asDownload: true) } } diff --git a/piwigo/Image/ImageViewController.swift b/piwigo/Image/ImageViewController.swift index e430de4b6..e3034a896 100644 --- a/piwigo/Image/ImageViewController.swift +++ b/piwigo/Image/ImageViewController.swift @@ -93,7 +93,10 @@ class ImageViewController: UIViewController { pageViewController!.setViewControllers([imageDVC], direction: .forward, animated: false) } } - + + // Update server statistics + logImageVisitIfNeeded(imageData.pwgID) + // Navigation bar let navigationBar = navigationController?.navigationBar navigationBar?.tintColor = .piwigoColorOrange() @@ -336,6 +339,20 @@ class ImageViewController: UIViewController { } } + func logImageVisitIfNeeded(_ imageID: Int64, asDownload: Bool = false) { + NetworkUtilities.checkSession(ofUser: user) { + if NetworkVars.saveVisits { + PwgSession.shared.logVisitOfImage(withID: imageID, asDownload: asDownload) { + // Statistics updated + } failure: { _ in + // Statistics not updated ► No error reported + } + } + } failure: { _ in + // Statistics not updated ► No error reported + } + } + // MARK: - Navigation Bar & Toolbar func setTitleViewFromImageData() { @@ -744,6 +761,8 @@ extension ImageViewController: UIPageViewControllerDelegate playBarButton = UIBarButtonItem.playImageButton(self, action: #selector(playVideo)) } muteBarButton = UIBarButtonItem.muteAudioButton(VideoVars.shared.isMuted, target: self, action: #selector(muteUnmuteAudio)) + } else { + return } // Set title and buttons @@ -754,6 +773,9 @@ extension ImageViewController: UIPageViewControllerDelegate // Scroll album collection view to keep the selected image centered on the screen imgDetailDelegate?.didSelectImage(atIndex: imageIndex) + + // Update server statistics + logImageVisitIfNeeded(imageData.pwgID) } } diff --git a/piwigoKit/Network/pwg.history/PwgSession+History.swift b/piwigoKit/Network/pwg.history/PwgSession+History.swift new file mode 100644 index 000000000..cacfa49c2 --- /dev/null +++ b/piwigoKit/Network/pwg.history/PwgSession+History.swift @@ -0,0 +1,51 @@ +// +// PwgSession+History.swift +// piwigoKit +// +// Created by Eddy Lelièvre-Berna on 26/11/2023. +// Copyright © 2023 Piwigo.org. All rights reserved. +// + +import os +import Foundation + +public extension PwgSession { + + func logVisitOfImage(withID imageID: Int64, asDownload: Bool, + completion: @escaping () -> Void, + failure: @escaping (Error?) -> Void) { + // Launch request + let paramDict: [String : Any] = ["image_id": imageID, + "is_download": asDownload] + postRequest(withMethod: pwgHistoryLog, paramDict: paramDict, + jsonObjectClientExpectsToReceive: HistoryLogJSON.self, + countOfBytesClientExpectsToReceive: pwgHistoryLogBytes) { jsonData in + do { + // Decode the JSON into codable type HistoryLogJSON. + let decoder = JSONDecoder() + let historyJSON = try decoder.decode(HistoryLogJSON.self, from: jsonData) + + // Piwigo error? + if historyJSON.errorCode != 0 { + // Will retry later + let error = self.localizedError(for: historyJSON.errorCode, + errorMessage: historyJSON.errorMessage) + failure(error) + return + } + + completion() + } + catch { + let error = error as NSError + failure(error) + return + } + } failure: { error in + /// - Network communication errors + /// - Returned JSON data is empty + /// - Cannot decode data returned by Piwigo server + failure(error) + } + } +} diff --git a/piwigoKit/Network/pwg.history/pwg.history.log.swift b/piwigoKit/Network/pwg.history/pwg.history.log.swift index 46e8ba4c2..a1d8f4d29 100644 --- a/piwigoKit/Network/pwg.history/pwg.history.log.swift +++ b/piwigoKit/Network/pwg.history/pwg.history.log.swift @@ -10,6 +10,7 @@ import Foundation // MARK: - pwg.history.log public let pwgHistoryLog = "format=json&method=pwg.history.log" +public let pwgHistoryLogBytes: Int64 = 560 public struct HistoryLogJSON: Decodable { From c80f223955ce3374e7aab6283ee19b67bf60252e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eddy=20Leli=C3=A8vre-Berna?= Date: Sun, 26 Nov 2023 19:32:15 +0100 Subject: [PATCH 07/15] Adds v3.1.1 release notes --- piwigo.xcodeproj/project.pbxproj | 4 ++-- piwigo/Resources/en.lproj/ReleaseNotes.strings | 4 +++- piwigo/Settings/Information/ReleaseNotesViewController.swift | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/piwigo.xcodeproj/project.pbxproj b/piwigo.xcodeproj/project.pbxproj index 9c9ce607e..28e1ab361 100644 --- a/piwigo.xcodeproj/project.pbxproj +++ b/piwigo.xcodeproj/project.pbxproj @@ -3927,7 +3927,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 3.1; + MARKETING_VERSION = 3.1.1; MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++20"; OTHER_LDFLAGS = ( "$(inherited)", @@ -3996,7 +3996,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 3.1; + MARKETING_VERSION = 3.1.1; MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++20"; OTHER_LDFLAGS = ( "$(inherited)", diff --git a/piwigo/Resources/en.lproj/ReleaseNotes.strings b/piwigo/Resources/en.lproj/ReleaseNotes.strings index c34258f86..d5c786d3f 100644 --- a/piwigo/Resources/en.lproj/ReleaseNotes.strings +++ b/piwigo/Resources/en.lproj/ReleaseNotes.strings @@ -6,7 +6,9 @@ Copyright © 2017 Piwigo.org. All rights reserved. */ -"v3.1.0_text" = "Version 3.1\n\n• Swipe down or pinch the image to return to the album when viewing individual photos or videos\n• Watch a video stored on your Piwigo while you use other apps.\n• Bug fixes"; +"v3.1.1_text" = "Version 3.1.1\n\n• Updates server statistics (requires Piwigo 14)\n• Bug fixes"; + +"v3.1.0_text" = "Version 3.1\nNovember 20, 2023\n\n• Swipe down or pinch the image to return to the album when viewing individual photos or videos\n• Watch a video stored on your Piwigo while you use other apps.\n• Bug fixes"; "v3.0.2_text" = "Version 3.0.2\nJuly 15, 2023\n\n• Bug fixes"; diff --git a/piwigo/Settings/Information/ReleaseNotesViewController.swift b/piwigo/Settings/Information/ReleaseNotesViewController.swift index 3d30ca3e7..28ee88581 100644 --- a/piwigo/Settings/Information/ReleaseNotesViewController.swift +++ b/piwigo/Settings/Information/ReleaseNotesViewController.swift @@ -156,6 +156,7 @@ class ReleaseNotesViewController: UIViewController { let notesAttributedString = NSMutableAttributedString(string: "") // Release 3.1.x — Bundle string + notesAttributedString.append(releaseNotes("v3.1.1_text", comment: "v3.1.1 Release Notes text")) notesAttributedString.append(releaseNotes("v3.1.0_text", comment: "v3.1.0 Release Notes text")) // Release 3.0.x — Bundle string From 5884eaaa235b442f2cfcbd490384720d1946085b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eddy=20Leli=C3=A8vre-Berna?= Date: Sun, 26 Nov 2023 19:55:27 +0100 Subject: [PATCH 08/15] Adds and improves translations --- piwigo/Resources/ar.lproj/ReleaseNotes.strings | 4 +++- piwigo/Resources/da.lproj/ReleaseNotes.strings | 4 +++- piwigo/Resources/de.lproj/ReleaseNotes.strings | 4 +++- piwigo/Resources/es.lproj/ReleaseNotes.strings | 4 +++- piwigo/Resources/fr.lproj/ReleaseNotes.strings | 4 +++- piwigo/Resources/hu.lproj/ReleaseNotes.strings | 4 +++- piwigo/Resources/id.lproj/ReleaseNotes.strings | 4 +++- piwigo/Resources/it.lproj/ReleaseNotes.strings | 4 +++- piwigo/Resources/ja.lproj/ReleaseNotes.strings | 4 +++- piwigo/Resources/nl.lproj/ReleaseNotes.strings | 4 +++- piwigo/Resources/pl.lproj/Localizable.strings | 18 +++++++++--------- piwigo/Resources/pl.lproj/ReleaseNotes.strings | 4 +++- piwigo/Resources/ru.lproj/ReleaseNotes.strings | 4 +++- piwigo/Resources/sv.lproj/ReleaseNotes.strings | 4 +++- .../zh-Hans.lproj/ReleaseNotes.strings | 4 +++- .../zh-Hant.lproj/ReleaseNotes.strings | 4 +++- 16 files changed, 54 insertions(+), 24 deletions(-) diff --git a/piwigo/Resources/ar.lproj/ReleaseNotes.strings b/piwigo/Resources/ar.lproj/ReleaseNotes.strings index 29a86b8ff..d942b050a 100644 --- a/piwigo/Resources/ar.lproj/ReleaseNotes.strings +++ b/piwigo/Resources/ar.lproj/ReleaseNotes.strings @@ -6,7 +6,9 @@ Copyright © 2017 Piwigo.org. All rights reserved. */ -"v3.1.0_text" = "Version 3.1\n\n• Swipe down or pinch the image to return to the album when viewing individual photos or videos\n• Watch a video stored on your Piwigo while you use other apps.\n• Bug fixes"; +"v3.1.1_text" = "Version 3.1.1\n\n• Updates server statistics (requires Piwigo 14)\n• Bug fixes"; + +"v3.1.0_text" = "Version 3.1\nNovember 20, 2023\n\n• Swipe down or pinch the image to return to the album when viewing individual photos or videos\n• Watch a video stored on your Piwigo while you use other apps.\n• Bug fixes"; "v3.0.2_text" = "Version 3.0.2\nJuly 15, 2023\n\n• Bug fixes"; diff --git a/piwigo/Resources/da.lproj/ReleaseNotes.strings b/piwigo/Resources/da.lproj/ReleaseNotes.strings index 6d7d53a22..447f56ee3 100644 --- a/piwigo/Resources/da.lproj/ReleaseNotes.strings +++ b/piwigo/Resources/da.lproj/ReleaseNotes.strings @@ -6,7 +6,9 @@ Copyright © 2017 Piwigo.org. All rights reserved. */ -"v3.1.0_text" = "Version 3.1\n\n• Stryg nedad eller klem billedet for at vende tilbage til albummet, når du ser individuelle billeder eller videoer\n• Se en video, der er gemt på din Piwigo, mens du bruger andre apps.\n• Fejlrettelser"; +"v3.1.1_text" = "Version 3.1.1\n\n• Opdaterer serverstatistikker (kræver Piwigo 14)\n• Fejlrettelser"; + +"v3.1.0_text" = "Version 3.1\n20 november 2023\n\n• Stryg nedad eller klem billedet for at vende tilbage til albummet, når du ser individuelle billeder eller videoer\n• Se en video, der er gemt på din Piwigo, mens du bruger andre apps.\n• Fejlrettelser"; "v3.0.2_text" = "Version 3.0.2\n15 juli 2023\n\n• Fejlrettelser"; diff --git a/piwigo/Resources/de.lproj/ReleaseNotes.strings b/piwigo/Resources/de.lproj/ReleaseNotes.strings index ab18c9595..59dc2e5a7 100644 --- a/piwigo/Resources/de.lproj/ReleaseNotes.strings +++ b/piwigo/Resources/de.lproj/ReleaseNotes.strings @@ -6,7 +6,9 @@ Copyright © 2017 Piwigo.org. All rights reserved. */ -"v3.1.0_text" = "Version 3.1\n\n• Wischen Sie nach unten oder halten Sie das Bild fest, um zum Album zurückzukehren, wenn Sie einzelne Fotos oder Videos ansehen\n• Sehen Sie sich ein auf Ihrem Piwigo gespeichertes Video an, während Sie andere Anwendungen nutzen.\n• Fehlerbehebungen"; +"v3.1.1_text" = "Version 3.1.1\n\n• Serverstatistiken aktualisieren (erfordert Piwigo 14)\n• Fehlerbehebungen"; + +"v3.1.0_text" = "Version 3.1\n20. November 2023\n\n• Wischen Sie nach unten oder halten Sie das Bild fest, um zum Album zurückzukehren, wenn Sie einzelne Fotos oder Videos ansehen\n• Sehen Sie sich ein auf Ihrem Piwigo gespeichertes Video an, während Sie andere Anwendungen nutzen.\n• Fehlerbehebungen"; "v3.0.2_text" = "Version 3.0.2\n15. Juli 2023\n\n• Fehlerbehebungen"; diff --git a/piwigo/Resources/es.lproj/ReleaseNotes.strings b/piwigo/Resources/es.lproj/ReleaseNotes.strings index 00d536843..df6d234af 100644 --- a/piwigo/Resources/es.lproj/ReleaseNotes.strings +++ b/piwigo/Resources/es.lproj/ReleaseNotes.strings @@ -6,7 +6,9 @@ Copyright © 2017 Piwigo.org. All rights reserved. */ -"v3.1.0_text" = "Versión 3.1\n\n• Desliza hacia abajo o pellizca la imagen para volver al álbum al ver fotos o vídeos individuales\n• Mira un vídeo almacenado en tu Piwigo mientras usas otras aplicaciones\n• Corrección de errores"; +"v3.1.1_text" = "Versión 3.1.1\n\n• Actualizaciones del servidor de estadísticas (requiere Piwigo 14)\n• Correcciones de errores"; + +"v3.1.0_text" = "Versión 3.1\n20 de noviembre de 2023\n\n• Desliza hacia abajo o pellizca la imagen para volver al álbum al ver fotos o vídeos individuales\n• Mira un vídeo almacenado en tu Piwigo mientras usas otras aplicaciones\n• Corrección de errores"; "v3.0.2_text" = "Versión 3.0.2\n15 de julio de 2023\n\n• Corrección de errores"; diff --git a/piwigo/Resources/fr.lproj/ReleaseNotes.strings b/piwigo/Resources/fr.lproj/ReleaseNotes.strings index 044c02d3e..4e6ef4105 100644 --- a/piwigo/Resources/fr.lproj/ReleaseNotes.strings +++ b/piwigo/Resources/fr.lproj/ReleaseNotes.strings @@ -6,7 +6,9 @@ Copyright © 2017 Piwigo.org. All rights reserved. */ -"v3.1.0_text" = "Version 3.1\n\n• Balayez vers le bas ou pincez l'image pour revenir à l'album lors de la visualisation de photos ou vidéos individuelles\n• Regarder une vidéo stockée sur votre Piwigo pendant que vous utilisez d'autres applications\n• Corrections de bogues"; +"v3.1.1_text" = "Version 3.1.1\n\n• Met à jour les statistiques du serveur (nécessite Piwigo 14)\n• Corrections de bugs"; + +"v3.1.0_text" = "Version 3.1\n20 novembre 2023\n\n• Balayez vers le bas ou pincez l'image pour revenir à l'album lors de la visualisation de photos ou vidéos individuelles\n• Regarder une vidéo stockée sur votre Piwigo pendant que vous utilisez d'autres applications\n• Corrections de bogues"; "v3.0.2_text" = "Version 3.0.2\n15 juillet 2023\n\n• Correction de bugs"; diff --git a/piwigo/Resources/hu.lproj/ReleaseNotes.strings b/piwigo/Resources/hu.lproj/ReleaseNotes.strings index c69591ca3..c11c6fbe9 100644 --- a/piwigo/Resources/hu.lproj/ReleaseNotes.strings +++ b/piwigo/Resources/hu.lproj/ReleaseNotes.strings @@ -6,7 +6,9 @@ Copyright © 2017 Piwigo.org. All rights reserved. */ -"v3.1.0_text" = "3.1 verzió\n\n• Az egyes fényképek vagy videók megtekintésekor a képet lefelé húzva vagy megcsípve visszatérhet az albumba.\n• Nézzen meg egy Piwigo-n tárolt videót, miközben más alkalmazásokat használ.\n• Hibajavítások"; +"v3.1.1_text" = "3.1.1 verzió\n\n• Szerver statisztikák frissítése (Piwigo 14 szükséges)\n• Hibajavítások"; + +"v3.1.0_text" = "3.1 verzió\n2023 November 20\n\n• Az egyes fényképek vagy videók megtekintésekor a képet lefelé húzva vagy megcsípve visszatérhet az albumba.\n• Nézzen meg egy Piwigo-n tárolt videót, miközben más alkalmazásokat használ.\n• Hibajavítások"; "v3.0.2_text" = "3.0.2-es verzió\n2023 Július 15\n\n• Hibajavítások"; diff --git a/piwigo/Resources/id.lproj/ReleaseNotes.strings b/piwigo/Resources/id.lproj/ReleaseNotes.strings index e02f7785e..76c9c3a3b 100644 --- a/piwigo/Resources/id.lproj/ReleaseNotes.strings +++ b/piwigo/Resources/id.lproj/ReleaseNotes.strings @@ -6,7 +6,9 @@ Copyright © 2017 Piwigo.org. All rights reserved. */ -"v3.1.0_text" = "Version 3.1\n\n• Swipe down or pinch the image to return to the album when viewing individual photos or videos\n• Watch a video stored on your Piwigo while you use other apps.\n• Bug fixes"; +"v3.1.1_text" = "Version 3.1.1\n\n• Updates server statistics (requires Piwigo 14)\n• Bug fixes"; + +"v3.1.0_text" = "Version 3.1\nNovember 20, 2023\n\n• Swipe down or pinch the image to return to the album when viewing individual photos or videos\n• Watch a video stored on your Piwigo while you use other apps.\n• Bug fixes"; "v3.0.2_text" = "Versi 3.0.2\n\n• Perbaikan bug"; diff --git a/piwigo/Resources/it.lproj/ReleaseNotes.strings b/piwigo/Resources/it.lproj/ReleaseNotes.strings index 386b68dcd..af645e58d 100644 --- a/piwigo/Resources/it.lproj/ReleaseNotes.strings +++ b/piwigo/Resources/it.lproj/ReleaseNotes.strings @@ -6,7 +6,9 @@ Copyright © 2017 Piwigo.org. All rights reserved. */ -"v3.1.0_text" = "Versione 3.1\n\n• Scorri verso il basso o pizzichi l'immagine per tornare all'album durante la visualizzazione di singole foto o video\n• Guarda un video memorizzato sul tuo Piwigo mentre usi altre applicazioni.\n• Correzioni di bug"; +"v3.1.1_text" = "Versione 3.1.1\n\n• Aggiorna le statistiche del server (richiede Piwigo 14)\n• Correzioni di bug"; + +"v3.1.0_text" = "Versione 3.1\n20 novembre 2023\n\n• Scorri verso il basso o pizzichi l'immagine per tornare all'album durante la visualizzazione di singole foto o video\n• Guarda un video memorizzato sul tuo Piwigo mentre usi altre applicazioni.\n• Correzioni di bug"; "v3.0.2_text" = "Versione 3.0.2\n15 luglio 2023\n\n• Correzioni di bug"; diff --git a/piwigo/Resources/ja.lproj/ReleaseNotes.strings b/piwigo/Resources/ja.lproj/ReleaseNotes.strings index 1592105d9..289e5469d 100644 --- a/piwigo/Resources/ja.lproj/ReleaseNotes.strings +++ b/piwigo/Resources/ja.lproj/ReleaseNotes.strings @@ -6,7 +6,9 @@ Copyright © 2017 Piwigo.org. All rights reserved. */ -"v3.1.0_text" = "バージョン3.1\n\n• 個々の写真やビデオを見るときは、画像を下にスワイプするかピンチしてアルバムに戻ります。\n• Piwigoに保存されているビデオを、他のアプリを使用しながら見ることができます。\n• バグ修正"; +"v3.1.1_text" = "バージョン 3.1.1\n\n• サーバーの統計情報を更新(Piwigo 14が必要)\n• バグの修正"; + +"v3.1.0_text" = "バージョン3.1\n2023年11月20日\n\n• 個々の写真やビデオを見るときは、画像を下にスワイプするかピンチしてアルバムに戻ります。\n• Piwigoに保存されているビデオを、他のアプリを使用しながら見ることができます。\n• バグ修正"; "v3.0.2_text" = "バージョン 3.0.2\n2023年7月15日\n\n• バグの修正"; diff --git a/piwigo/Resources/nl.lproj/ReleaseNotes.strings b/piwigo/Resources/nl.lproj/ReleaseNotes.strings index 7cea0bf98..24c91158d 100644 --- a/piwigo/Resources/nl.lproj/ReleaseNotes.strings +++ b/piwigo/Resources/nl.lproj/ReleaseNotes.strings @@ -6,7 +6,9 @@ Copyright © 2017 Piwigo.org. All rights reserved. */ -"v3.1.0_text" = "Versie 3.1\n\n• Veeg naar beneden of zet de afbeelding om terug te keren naar het album bij het bekijken van individuele foto's of video's\n• Bekijk een video die is opgeslagen op uw Piwigo terwijl u andere apps gebruikt.\n• Foutjes verbeterd"; +"v3.1.1_text" = "Versie 3.1.1\n\n• Serverstatistieken bijwerken (vereist Piwigo 14)\n• Foutjes verbeterd"; + +"v3.1.0_text" = "Versie 3.1\n20 November 2023\n\n• Veeg naar beneden of zet de afbeelding om terug te keren naar het album bij het bekijken van individuele foto's of video's\n• Bekijk een video die is opgeslagen op uw Piwigo terwijl u andere apps gebruikt.\n• Foutjes verbeterd"; "v3.0.2_text" = "Versie 3.0.2\n15 juli 2023\n\n• Foutjes verbeterd"; diff --git a/piwigo/Resources/pl.lproj/Localizable.strings b/piwigo/Resources/pl.lproj/Localizable.strings index 464998a8c..56325f35f 100644 --- a/piwigo/Resources/pl.lproj/Localizable.strings +++ b/piwigo/Resources/pl.lproj/Localizable.strings @@ -178,7 +178,7 @@ "categorySort_manual" = "Ustaw ręcznie"; "categorySort_random" = "Kolejność losowa"; -"categorySort_videosOnly" = "Tylko Filmy"; +"categorySort_videosOnly" = "Tylko filmy"; "categorySort_imagesOnly" = "Tylko zdjęcia"; // Album selection @@ -408,13 +408,13 @@ "deleteImageProgress_title" = "Usuwanie %@%% zakończone"; "deleteSingleImage_title" = "Usuń zdjęcie"; -"deleteSingleVideo_title" = "Usuń wideo"; +"deleteSingleVideo_title" = "Usuń film"; "deleteSingleImageHUD_deleting" = "Usuwanie zdjęcia…"; "deleteSingleVideoHUD_deleting" = "Usuwam film…"; "deleteSeveralImagesHUD_deleting" = "Usuwanie zdjęć/filmów…"; "removeSingleImage_title" = "Usuń z albumu"; "removeSingleImageHUD_removing" = "Usuwanie zdjęcia…"; -"removeSingleVideoHUD_removing" = "Usuwanie wideo…"; +"removeSingleVideoHUD_removing" = "Usuwanie filmu…"; "removeSeveralImagesHUD_removing" = "Usuwanie zdjęć/filmów…"; "deleteSingleImage_message" = "Czy na pewno chcesz usunąć to zdjęcie? Nie można tego cofnąć!"; "deleteSingleVideo_message" = "Czy na pewno chcesz usunąć ten film? Nie można tego cofnąć!"; @@ -444,7 +444,7 @@ "imageSaveError_title" = "Nie udało się zapisać zdjęcia"; "imageSaveError_message" = "Nie można zapisać zdjęcia. Błąd: %@"; -"videoSaveError_title" = "Nie udało się zapisać Filmu"; +"videoSaveError_title" = "Nie udało się zapisać filmu"; "videoSaveError_message" = "Nie można zapisać filmu. Błąd: %@"; // Image move @@ -537,12 +537,12 @@ "audioUploadError_title" = "Błąd Przesyłania Audio"; "audioUploadError_format" = "Niestety, pliki audio nie są jeszcze obsługiwane przez Piwigo Mobile."; -"videoUploadError_title" = "Błąd Przesyłania Wideo"; +"videoUploadError_title" = "Błąd Przesyłania filmu"; "videoUploadError_format" = "Przepraszamy, pliki wideo z rozszerzeniem .%@ nie są akceptowane przez serwer Piwigo."; -"videoUploadError_iCloud" = "Nie można pobrać wideo. Błąd: %@"; +"videoUploadError_iCloud" = "Nie można pobrać filmu. Błąd: %@"; "videoUploadError_export" = "Niestety, film nie mógł zostać odzyskany do wysłania. Błąd: %@"; -"videoUploadError_unknown" = "Niestety, wysyłanie wideo nie udało się z powodu nieznanego błędu podczas konwersji w MP4. Błąd: %@"; -"videoUploadCancelled_message" = "Wysyłanie wideo zostało anulowane."; +"videoUploadError_unknown" = "Niestety, wysyłanie filmu nie udało się z powodu nieznanego błędu podczas konwersji do MP4. Błąd: %@"; +"videoUploadCancelled_message" = "Wysyłanie filmu zostało anulowane."; // Image share "shareImageMetadata_Title" = "Udostępnij metadane"; @@ -838,5 +838,5 @@ "whatsNew_title1" = "Nowe gesty"; "whatsNew_desc1" = "Przesuń palcem w dół lub uszczypnij obraz, aby powrócić do albumu podczas przeglądania pojedynczych zdjęć lub filmów."; "whatsNew_title2" = "Obsługa PiP"; -"whatsNew_desc2" = "Oglądaj wideo przechowywane na twoim Piwigo podczas korzystania z innych aplikacji."; +"whatsNew_desc2" = "Oglądaj film przechowywany na twoim Piwigo podczas korzystania z innych aplikacji."; "whatsNew_continue" = "Kontynuuj"; diff --git a/piwigo/Resources/pl.lproj/ReleaseNotes.strings b/piwigo/Resources/pl.lproj/ReleaseNotes.strings index 2ae5901a1..4b5d9ca0e 100644 --- a/piwigo/Resources/pl.lproj/ReleaseNotes.strings +++ b/piwigo/Resources/pl.lproj/ReleaseNotes.strings @@ -6,7 +6,9 @@ Copyright © 2017 Piwigo.org. All rights reserved. */ -"v3.1.0_text" = "Wersja 3.1\n\n• Przesuń palcem w dół lub zsuń obraz, aby powrócić do albumu podczas przeglądania pojedynczych zdjęć lub filmów.\n• Oglądaj wideo przechowywane na twoim Piwigo podczas korzystania z innych aplikacji.\n• Poprawki błędów"; +"v3.1.1_text" = "Wersja 3.1.1\n\n• Aktualizuje statystyki serwera (wymaga Piwigo 14)\n• Poprawki błędów"; + +"v3.1.0_text" = "Wersja 3.1\n20 listopada 2023\n\n• Przesuń palcem w dół lub zsuń obraz, aby powrócić do albumu podczas przeglądania pojedynczych zdjęć lub filmów.\n• Oglądaj wideo przechowywane na twoim Piwigo podczas korzystania z innych aplikacji.\n• Poprawki błędów"; "v3.0.2_text" = "Wersja 3.0.2\n\n• Poprawki błędów"; diff --git a/piwigo/Resources/ru.lproj/ReleaseNotes.strings b/piwigo/Resources/ru.lproj/ReleaseNotes.strings index e6de39dfa..4be1e9488 100644 --- a/piwigo/Resources/ru.lproj/ReleaseNotes.strings +++ b/piwigo/Resources/ru.lproj/ReleaseNotes.strings @@ -6,7 +6,9 @@ Copyright © 2017 Piwigo.org. All rights reserved. */ -"v3.1.0_text" = "Версия 3.1\n\n• Проведите пальцем вниз или зажмите изображение, чтобы вернуться в альбом при просмотре отдельных фотографий или видео.\n• Просмотр видео, сохраненного на Piwigo, во время работы с другими приложениями.\n• Исправления ошибок"; +"v3.1.1_text" = "Версия 3.1.1\n\n• Обновления статистики сервера (требует Piwigo 14)\n• Исправления ошибок"; + +"v3.1.0_text" = "Версия 3.1\n20 ноября 2023\n\n• Проведите пальцем вниз или зажмите изображение, чтобы вернуться в альбом при просмотре отдельных фотографий или видео.\n• Просмотр видео, сохраненного на Piwigo, во время работы с другими приложениями.\n• Исправления ошибок"; "v3.0.2_text" = "Версия 3.0.2\n15 июля 2023\n\n• Исправления ошибок"; diff --git a/piwigo/Resources/sv.lproj/ReleaseNotes.strings b/piwigo/Resources/sv.lproj/ReleaseNotes.strings index 4914144f4..57fa75321 100644 --- a/piwigo/Resources/sv.lproj/ReleaseNotes.strings +++ b/piwigo/Resources/sv.lproj/ReleaseNotes.strings @@ -6,7 +6,9 @@ Copyright © 2017 Piwigo.org. All rights reserved. */ -"v3.1.0_text" = "Version 3.1\n\n• Svep nedåt eller nypa bilden för att återgå till albumet när du visar enskilda foton eller videor\n• Titta på en video som lagras på din Piwigo medan du använder andra appar.\n• Felrättelser"; +"v3.1.1_text" = "Version 3.1.1\n\n• Uppdaterar serverstatistik (kräver Piwigo 14)\n• Felrättelser"; + +"v3.1.0_text" = "Version 3.1\n20 november 2023\n\n• Svep nedåt eller nypa bilden för att återgå till albumet när du visar enskilda foton eller videor\n• Titta på en video som lagras på din Piwigo medan du använder andra appar.\n• Felrättelser"; "v3.0.2_text" = "Version 3.0.2\n15 juli 2023\n\n• Buggfixar"; diff --git a/piwigo/Resources/zh-Hans.lproj/ReleaseNotes.strings b/piwigo/Resources/zh-Hans.lproj/ReleaseNotes.strings index 77a36e2a2..7c774866b 100644 --- a/piwigo/Resources/zh-Hans.lproj/ReleaseNotes.strings +++ b/piwigo/Resources/zh-Hans.lproj/ReleaseNotes.strings @@ -6,7 +6,9 @@ Copyright © 2017 Piwigo.org. All rights reserved. */ -"v3.1.0_text" = "版本 3.1\n\n• 查看单张照片或视频时,向下轻扫或捏住图片即可返回相册\n• 在使用其他应用程序时观看存储在 Piwigo 中的视频。\n• 错误修复"; +"v3.1.1_text" = "版本 3.1.1\n\n• 更新服务器统计(需要 Piwigo 14)\n• Bug 修复"; + +"v3.1.0_text" = "版本 3.1\n2023年11月20日\n\n• 查看单张照片或视频时,向下轻扫或捏住图片即可返回相册\n• 在使用其他应用程序时观看存储在 Piwigo 中的视频。\n• 错误修复"; "v3.0.2_text" = "版本 3.0.2\n2023年7月15日\n\n• 错误修复"; diff --git a/piwigo/Resources/zh-Hant.lproj/ReleaseNotes.strings b/piwigo/Resources/zh-Hant.lproj/ReleaseNotes.strings index a7057c646..b1dcdbc5b 100644 --- a/piwigo/Resources/zh-Hant.lproj/ReleaseNotes.strings +++ b/piwigo/Resources/zh-Hant.lproj/ReleaseNotes.strings @@ -6,7 +6,9 @@ Copyright © 2017 Piwigo.org. All rights reserved. */ -"v3.1.0_text" = "版本 3.1\n\n• 當觀看相片或影片時向下滑或用雙指縮小圖片以回歸到相簿\n• 在使用其他應用程式的同時觀看儲存在Piwigo的影片\n• 錯誤修正"; +"v3.1.1_text" = "版本 3.1.1\n\n• 更新服务器统计数据(需要 Piwigo 14)\n• 錯誤修正"; + +"v3.1.0_text" = "版本 3.1\n2023年11月20日\n\n• 當觀看相片或影片時向下滑或用雙指縮小圖片以回歸到相簿\n• 在使用其他應用程式的同時觀看儲存在Piwigo的影片\n• 錯誤修正"; "v3.0.2_text" = "版本 3.0.2\n2023年7月15日\n\n• 錯誤修正"; From 6ffbbc806764a4398b61794d9234959c486189c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eddy=20Leli=C3=A8vre-Berna?= Date: Sun, 26 Nov 2023 20:12:16 +0100 Subject: [PATCH 09/15] Version 3.1.1 build 544 for TestFlight testing --- Supporting Targets/piwigoKit/Info.plist | 2 +- Supporting Targets/uploadKit/Info.plist | 2 +- piwigo/Info.plist | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Supporting Targets/piwigoKit/Info.plist b/Supporting Targets/piwigoKit/Info.plist index 2747f0682..6ad7ceb3e 100644 --- a/Supporting Targets/piwigoKit/Info.plist +++ b/Supporting Targets/piwigoKit/Info.plist @@ -17,6 +17,6 @@ CFBundleShortVersionString 3.0 CFBundleVersion - 543 + 544 diff --git a/Supporting Targets/uploadKit/Info.plist b/Supporting Targets/uploadKit/Info.plist index 2747f0682..6ad7ceb3e 100644 --- a/Supporting Targets/uploadKit/Info.plist +++ b/Supporting Targets/uploadKit/Info.plist @@ -17,6 +17,6 @@ CFBundleShortVersionString 3.0 CFBundleVersion - 543 + 544 diff --git a/piwigo/Info.plist b/piwigo/Info.plist index 4becefdcd..8f7f11c3f 100644 --- a/piwigo/Info.plist +++ b/piwigo/Info.plist @@ -25,7 +25,7 @@ CFBundleShortVersionString $(MARKETING_VERSION) CFBundleVersion - 543 + 544 INIntentsSupported AutoUploadIntent From 8b46f173da18911a3c5d491d6a857cc2969b997d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eddy=20Leli=C3=A8vre-Berna?= Date: Wed, 29 Nov 2023 22:02:36 +0100 Subject: [PATCH 10/15] =?UTF-8?q?Fixes=20#560=20=E2=80=94=20URL(string:)?= =?UTF-8?q?=20method=20returns=20nil=20when=20the=20provided=20string=20is?= =?UTF-8?q?=20of=20type=20ip:port=20(without=20scheme)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- piwigoKit/Data Cache/Server Data/Server+CoreDataClass.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/piwigoKit/Data Cache/Server Data/Server+CoreDataClass.swift b/piwigoKit/Data Cache/Server Data/Server+CoreDataClass.swift index 0b32e7007..541f9e766 100644 --- a/piwigoKit/Data Cache/Server Data/Server+CoreDataClass.swift +++ b/piwigoKit/Data Cache/Server Data/Server+CoreDataClass.swift @@ -26,7 +26,7 @@ public class Server: NSManagedObject { lastUsed: Date = Date()) throws { // Server path guard path.isEmpty == false, - let _ = URL(string: NetworkVars.serverPath) else { + let _ = URL(string: NetworkVars.serverProtocol + path) else { throw ServerError.wrongURL } if self.path != path { From a446d234f873e3dc0fde468f734675040d136dc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eddy=20Leli=C3=A8vre-Berna?= Date: Wed, 29 Nov 2023 22:27:58 +0100 Subject: [PATCH 11/15] Version 3.1.1 build 545 for TestFlight testing --- Supporting Targets/piwigoKit/Info.plist | 2 +- Supporting Targets/uploadKit/Info.plist | 2 +- piwigo/Info.plist | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Supporting Targets/piwigoKit/Info.plist b/Supporting Targets/piwigoKit/Info.plist index 6ad7ceb3e..0a8476ba0 100644 --- a/Supporting Targets/piwigoKit/Info.plist +++ b/Supporting Targets/piwigoKit/Info.plist @@ -17,6 +17,6 @@ CFBundleShortVersionString 3.0 CFBundleVersion - 544 + 545 diff --git a/Supporting Targets/uploadKit/Info.plist b/Supporting Targets/uploadKit/Info.plist index 6ad7ceb3e..0a8476ba0 100644 --- a/Supporting Targets/uploadKit/Info.plist +++ b/Supporting Targets/uploadKit/Info.plist @@ -17,6 +17,6 @@ CFBundleShortVersionString 3.0 CFBundleVersion - 544 + 545 diff --git a/piwigo/Info.plist b/piwigo/Info.plist index 8f7f11c3f..4a4b66d01 100644 --- a/piwigo/Info.plist +++ b/piwigo/Info.plist @@ -25,7 +25,7 @@ CFBundleShortVersionString $(MARKETING_VERSION) CFBundleVersion - 544 + 545 INIntentsSupported AutoUploadIntent From 246017cae4a80b0bc347ea461e252ef5130e7172 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eddy=20Leli=C3=A8vre-Berna?= Date: Wed, 29 Nov 2023 22:34:18 +0100 Subject: [PATCH 12/15] Improves translations --- piwigo/Resources/de.lproj/ReleaseNotes.strings | 2 +- piwigo/Resources/es.lproj/ReleaseNotes.strings | 2 +- piwigo/Resources/pl.lproj/ReleaseNotes.strings | 2 +- piwigo/Resources/zh-Hant.lproj/ReleaseNotes.strings | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/piwigo/Resources/de.lproj/ReleaseNotes.strings b/piwigo/Resources/de.lproj/ReleaseNotes.strings index 59dc2e5a7..7f1992d87 100644 --- a/piwigo/Resources/de.lproj/ReleaseNotes.strings +++ b/piwigo/Resources/de.lproj/ReleaseNotes.strings @@ -6,7 +6,7 @@ Copyright © 2017 Piwigo.org. All rights reserved. */ -"v3.1.1_text" = "Version 3.1.1\n\n• Serverstatistiken aktualisieren (erfordert Piwigo 14)\n• Fehlerbehebungen"; +"v3.1.1_text" = "Version 3.1.1\n\n• Aktualisiert Serverstatistiken(erfordert Piwigo 14)\n• Fehlerbehebungen"; "v3.1.0_text" = "Version 3.1\n20. November 2023\n\n• Wischen Sie nach unten oder halten Sie das Bild fest, um zum Album zurückzukehren, wenn Sie einzelne Fotos oder Videos ansehen\n• Sehen Sie sich ein auf Ihrem Piwigo gespeichertes Video an, während Sie andere Anwendungen nutzen.\n• Fehlerbehebungen"; diff --git a/piwigo/Resources/es.lproj/ReleaseNotes.strings b/piwigo/Resources/es.lproj/ReleaseNotes.strings index df6d234af..e49a947d3 100644 --- a/piwigo/Resources/es.lproj/ReleaseNotes.strings +++ b/piwigo/Resources/es.lproj/ReleaseNotes.strings @@ -6,7 +6,7 @@ Copyright © 2017 Piwigo.org. All rights reserved. */ -"v3.1.1_text" = "Versión 3.1.1\n\n• Actualizaciones del servidor de estadísticas (requiere Piwigo 14)\n• Correcciones de errores"; +"v3.1.1_text" = "Versión 3.1.1\n\n• Actualiza el servidor de estadísticas (requiere Piwigo 14)\n• Correcciones de errores"; "v3.1.0_text" = "Versión 3.1\n20 de noviembre de 2023\n\n• Desliza hacia abajo o pellizca la imagen para volver al álbum al ver fotos o vídeos individuales\n• Mira un vídeo almacenado en tu Piwigo mientras usas otras aplicaciones\n• Corrección de errores"; diff --git a/piwigo/Resources/pl.lproj/ReleaseNotes.strings b/piwigo/Resources/pl.lproj/ReleaseNotes.strings index 4b5d9ca0e..55d4294ed 100644 --- a/piwigo/Resources/pl.lproj/ReleaseNotes.strings +++ b/piwigo/Resources/pl.lproj/ReleaseNotes.strings @@ -6,7 +6,7 @@ Copyright © 2017 Piwigo.org. All rights reserved. */ -"v3.1.1_text" = "Wersja 3.1.1\n\n• Aktualizuje statystyki serwera (wymaga Piwigo 14)\n• Poprawki błędów"; +"v3.1.1_text" = "Wersja 3.1.1\n\n• Aktualizacja statystyk serwera (wymaga Piwigo 14)\n• Poprawki błędów"; "v3.1.0_text" = "Wersja 3.1\n20 listopada 2023\n\n• Przesuń palcem w dół lub zsuń obraz, aby powrócić do albumu podczas przeglądania pojedynczych zdjęć lub filmów.\n• Oglądaj wideo przechowywane na twoim Piwigo podczas korzystania z innych aplikacji.\n• Poprawki błędów"; diff --git a/piwigo/Resources/zh-Hant.lproj/ReleaseNotes.strings b/piwigo/Resources/zh-Hant.lproj/ReleaseNotes.strings index b1dcdbc5b..eb0a5ef71 100644 --- a/piwigo/Resources/zh-Hant.lproj/ReleaseNotes.strings +++ b/piwigo/Resources/zh-Hant.lproj/ReleaseNotes.strings @@ -6,7 +6,7 @@ Copyright © 2017 Piwigo.org. All rights reserved. */ -"v3.1.1_text" = "版本 3.1.1\n\n• 更新服务器统计数据(需要 Piwigo 14)\n• 錯誤修正"; +"v3.1.1_text" = "版本 3.1.1\n\n• 更新伺服器統計數據 (需要 Piwigo 14)\n• 錯誤修正"; "v3.1.0_text" = "版本 3.1\n2023年11月20日\n\n• 當觀看相片或影片時向下滑或用雙指縮小圖片以回歸到相簿\n• 在使用其他應用程式的同時觀看儲存在Piwigo的影片\n• 錯誤修正"; From 24f9bb93788a9132048b8105fcc2de1849a4f201 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eddy=20Leli=C3=A8vre-Berna?= Date: Wed, 29 Nov 2023 23:04:22 +0100 Subject: [PATCH 13/15] Version 3.1.1 build 546 for TestFlight testing --- Supporting Targets/piwigoKit/Info.plist | 2 +- Supporting Targets/uploadKit/Info.plist | 2 +- piwigo/Info.plist | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Supporting Targets/piwigoKit/Info.plist b/Supporting Targets/piwigoKit/Info.plist index 0a8476ba0..45ecae493 100644 --- a/Supporting Targets/piwigoKit/Info.plist +++ b/Supporting Targets/piwigoKit/Info.plist @@ -17,6 +17,6 @@ CFBundleShortVersionString 3.0 CFBundleVersion - 545 + 546 diff --git a/Supporting Targets/uploadKit/Info.plist b/Supporting Targets/uploadKit/Info.plist index 0a8476ba0..45ecae493 100644 --- a/Supporting Targets/uploadKit/Info.plist +++ b/Supporting Targets/uploadKit/Info.plist @@ -17,6 +17,6 @@ CFBundleShortVersionString 3.0 CFBundleVersion - 545 + 546 diff --git a/piwigo/Info.plist b/piwigo/Info.plist index 4a4b66d01..4bc6ed0d2 100644 --- a/piwigo/Info.plist +++ b/piwigo/Info.plist @@ -25,7 +25,7 @@ CFBundleShortVersionString $(MARKETING_VERSION) CFBundleVersion - 545 + 546 INIntentsSupported AutoUploadIntent From cd7a3738368a3c21d8b3e1579928209ab689b738 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eddy=20Leli=C3=A8vre-Berna?= Date: Thu, 30 Nov 2023 21:46:39 +0100 Subject: [PATCH 14/15] Fixes crash occurring when trying to update undefined server instance --- piwigoKit/Data Cache/User Data/User+CoreDataClass.swift | 8 ++++++++ piwigoKit/Network/NetworkUtilities.swift | 7 ++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/piwigoKit/Data Cache/User Data/User+CoreDataClass.swift b/piwigoKit/Data Cache/User Data/User+CoreDataClass.swift index fca14e56b..1b8cd7adf 100644 --- a/piwigoKit/Data Cache/User Data/User+CoreDataClass.swift +++ b/piwigoKit/Data Cache/User Data/User+CoreDataClass.swift @@ -99,4 +99,12 @@ extension User { if self.role != .normal { return false } return self.uploadRights.components(separatedBy: ",").contains(String(categoryId)) } + + public func setLastUsedToNow() { + let dateOfLogin = Date.timeIntervalSinceReferenceDate + self.lastUsed = dateOfLogin + if let server = self.server { + server.lastUsed = dateOfLogin + } + } } diff --git a/piwigoKit/Network/NetworkUtilities.swift b/piwigoKit/Network/NetworkUtilities.swift index 3c72e2cf2..9bc0d9936 100644 --- a/piwigoKit/Network/NetworkUtilities.swift +++ b/piwigoKit/Network/NetworkUtilities.swift @@ -98,7 +98,6 @@ public class NetworkUtilities: NSObject { logger.notice("New token: \(NetworkVars.pwgToken, privacy: .private(mask: .hash))") } if username != NetworkVars.username || oldToken.isEmpty || NetworkVars.pwgToken != oldToken { - let dateOfLogin = Date.timeIntervalSinceReferenceDate // Collect list of methods supplied by Piwigo server // => Determine if Community extension 2.9a or later is installed and active requestServerMethods { @@ -111,8 +110,7 @@ public class NetworkUtilities: NSObject { // Session now opened getPiwigoConfig { // Update date of accesss to the server by guest - user?.lastUsed = dateOfLogin - user?.server?.lastUsed = dateOfLogin + user?.setLastUsedToNow() user?.status = NetworkVars.userStatus.rawValue completion() } failure: { error in @@ -129,8 +127,7 @@ public class NetworkUtilities: NSObject { // Session now opened getPiwigoConfig { // Update date of accesss to the server by user - user?.lastUsed = dateOfLogin - user?.server?.lastUsed = dateOfLogin + user?.setLastUsedToNow() user?.status = NetworkVars.userStatus.rawValue completion() } failure: { error in From 24c335d096e12f0b6e5c0f23f3a1c7fde4b9b93c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eddy=20Leli=C3=A8vre-Berna?= Date: Thu, 30 Nov 2023 22:41:27 +0100 Subject: [PATCH 15/15] Version 3.1.1 build 547 for TesFlight testing --- Supporting Targets/piwigoKit/Info.plist | 2 +- Supporting Targets/uploadKit/Info.plist | 2 +- piwigo/Info.plist | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Supporting Targets/piwigoKit/Info.plist b/Supporting Targets/piwigoKit/Info.plist index 45ecae493..d4d207697 100644 --- a/Supporting Targets/piwigoKit/Info.plist +++ b/Supporting Targets/piwigoKit/Info.plist @@ -17,6 +17,6 @@ CFBundleShortVersionString 3.0 CFBundleVersion - 546 + 547 diff --git a/Supporting Targets/uploadKit/Info.plist b/Supporting Targets/uploadKit/Info.plist index 45ecae493..d4d207697 100644 --- a/Supporting Targets/uploadKit/Info.plist +++ b/Supporting Targets/uploadKit/Info.plist @@ -17,6 +17,6 @@ CFBundleShortVersionString 3.0 CFBundleVersion - 546 + 547 diff --git a/piwigo/Info.plist b/piwigo/Info.plist index 4bc6ed0d2..1841ec10e 100644 --- a/piwigo/Info.plist +++ b/piwigo/Info.plist @@ -25,7 +25,7 @@ CFBundleShortVersionString $(MARKETING_VERSION) CFBundleVersion - 546 + 547 INIntentsSupported AutoUploadIntent