-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pro Photo Upload Settings #759
Conversation
And.. IPTC meta-data parsing
# Conflicts: # ownCloud.xcodeproj/project.pbxproj
…nto exif_metadata
- Progress indicator while data is being generated - Fixed parsing of ISO speed rating (film sensitivity) - Not displaying meta-data where value is empty
- Prefer uploading originals (non-edited) - Prefer uploading RAW images
Michael Neuwert seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
@michaelstingl Yes, absolutely.. Although I didn't explicitly mentioned RAW in issue #510, this is what I had in mind.. But we can add a badge for RAW photos in scope of this PR already. |
@michaelstingl Added RAW photo badge in the upload picker UI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making changes. I think bookmarksChanged
needs to wrap the call to reconsiderProPhotoSettingsSection
in OnMainThread
. However, it would still not update in a multi-window use case when accounts are added or removed, though.
Normally, I'd agree that responding dynamically is an edge case, but since license observers make this so easy to implement, I'd go for it. Here's a version that's fully dynamic (and also shows and hides AutoUploadSettingsSection
as needed):
//
// MediaUploadSettingsViewController.swift
// ownCloud
//
// Created by Michael Neuwert on 22.05.20.
// Copyright © 2020 ownCloud GmbH. All rights reserved.
//
/*
* Copyright (C) 2020, ownCloud GmbH.
*
* This code is covered by the GNU Public License Version 3.
*
* For distribution utilizing Apple mechanisms please see https://owncloud.org/contribute/iOS-license-exception/
* You should have received a copy of this license along with this program. If not, see <http://www.gnu.org/licenses/gpl-3.0.en.html>.
*
*/
import UIKit
import ownCloudSDK
import ownCloudApp
import ownCloudAppShared
class MediaUploadSettingsViewController: StaticTableViewController {
private var proPhotoSettingsSection: StaticTableViewSection?
private var autoUploadSection : AutoUploadSettingsSection?
private var licenseObserver : OCLicenseObserver?
deinit {
NotificationCenter.default.removeObserver(self, name: .OCBookmarkManagerListChanged, object: nil)
}
override func viewDidLoad() {
super.viewDidLoad()
navigationItem.title = "Media Upload".localized
if let userDefaults = OCAppIdentity.shared.userDefaults {
proPhotoSettingsSection = ProPhotoUploadSettingsSection(userDefaults: userDefaults)
self.addSection(MediaExportSettingsSection(userDefaults: userDefaults))
}
NotificationCenter.default.addObserver(self, selector: #selector(reconsiderSections), name: .OCBookmarkManagerListChanged, object: nil)
licenseObserver = OCLicenseManager.shared.observeProducts(nil, features: [ .photoProFeatures ], in: OCLicenseEnvironment(), withOwner: self) { [weak self] (_, _, _) in
self?.reconsiderSections()
}
}
@objc private func reconsiderSections() {
OnMainThread {
guard let proSettingsSection = self.proPhotoSettingsSection else { return }
if OCBookmarkManager.shared.bookmarks.count > 0 {
if self.autoUploadSection == nil, let userDefaults = OCAppIdentity.shared.userDefaults {
self.autoUploadSection = AutoUploadSettingsSection(userDefaults: userDefaults)
}
if let autoUploadSection = self.autoUploadSection, !autoUploadSection.attached {
self.addSection(autoUploadSection)
}
// TODO: Re-add this section when we re-gain an ability to run background NSURLSessions
//self.addSection(BackgroundUploadsSettingsSection(userDefaults: userDefaults))
} else {
if let autoUploadSection = self.autoUploadSection, autoUploadSection.attached {
self.removeSection(autoUploadSection)
self.autoUploadSection = nil
}
}
if OCLicenseEnterpriseProvider.numberOfEnterpriseAccounts > 0 || OCLicenseManager.shared.authorizationStatus(forFeature: .photoProFeatures, in: OCLicenseEnvironment()) == .granted {
if !proSettingsSection.attached {
self.addSection(proSettingsSection)
}
} else {
if proSettingsSection.attached {
self.removeSection(proSettingsSection)
}
}
}
}
}
…multi window environment
@felix-schwarz ok, makes sense.. agreed and merged your suggestion |
(1) [wont fix]Probably not bug, but a feature: Options to select are in the
Current: Options are there and available for both accounts. By enabling the Is this behaviour the expected one? iPhoneXR iOS13.7 |
(2) [OK]To test the RAW feature, i'm using a free app called
Did you test with other devices/apps? which result did you get? |
Re (1)@jesmrec That's "works as designed". The settings are not tied to the account. Also, if user buys a feature as IAP it should work with all accounts, right? |
yes, you're right. You purchase a feature and it is available everywhere. But, the mentioned case is not about purchasing a feature (at least by the user itself). Not sure if this make sense... i will write an example: I work for owncloud, so i have an enterprise account in the corporate server that allows me to use all pro-features.
is this corner case expected and accepted as feature (not bug)? |
Behaviour is fine. 👍 (I don't want to make implementation too difficult – will have proper licensing API in a future backend release) |
ok, then (1) is done. |
Re (2)
|
Thanks for the explanations. I will try to do it with the stuff i have. If not posible, probably any member of the team can perform some tests in p2p with me.
Hidding options that are not really available is always a good UX practice. |
(3) [FIXED]
Current: Pic uploaded in JPG By enabling only the iPhoneXR v13.7 |
…ro_photo_features # Conflicts: # ownCloud.xcodeproj/project.pbxproj
Soe apps don’t seem to follow guidelines for storing RAW photos suggested by Apple. So instead of using alternatePhoto, they store RAW as main resource
@jesmrec Addressed (2) and (3). As for (2) made detection of RAW photos in the upload selection view more tolerant. Apple suggests storing RAW as |
…ld support shooting RAW
@jesmrec Improved UX by not displaying the "Prefer RAW" option in case there is no physical camera HW which would support shooting RAW. |
(2) and (3) are fixed. Tested with debug ipa build with Xcode12. |
Xcode compilation problems are fixed and now branch is correctly built with Xcode11.7 Approved. |
Description
Added two photo upload settings in Settings -> Media Upload:
This feature is meant to be added to the same IAP product as EXIF meta-data
Related Issue
#685
#688
Motivation and Context
For users serious about photography we would like to add more flexibility when uploading photos shot on iPhone.
How Has This Been Tested?
1. Upload original vs. edited photo
2. Upload RAW photos
Screenshots (if appropriate):
Types of changes
Checklist:
QA
Test plan: https://github.com/owncloud/QA/blob/master/Mobile/iOS-app/Version%2011.4.1/PhotoUploadsIAP.md
Bugs & improvements: