-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Rewrite auto upload #615
Rewrite auto upload #615
Conversation
As for Codacy, my intention is to leave those method bodies empty. |
return false; | ||
} | ||
|
||
return true; |
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.
this can be replaced with return !pathname.getName().startsWith(".")
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.
This I can do :)
* Magical file alteration listener | ||
*/ | ||
|
||
public class FileAlterationMagicListener implements FileAlterationListener { |
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.
Hopefully it is no magic ;-)
As you need a different name as the Implemantion, I suggest something with SyncedFolder or AutoUpload
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.
Where's the fun in renaming it? :P
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.
I second the request to rermove the "Magic" in the name.
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.
shrug Will be done in 5.
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.
Done.
This needs a bit more magic, will be done next week. |
58482f3
to
21aa2ea
Compare
Just a little Feedback for you @mario : https://help.nextcloud.com/t/nc-beta-not-uploading-photos-videos/5010/15 --> You fixed Xiaomi Mi5 , miui version 8 (android 7.0) 🎉 |
@AndyScherzinger can you try this PR out for HDR images on Nexus please? |
I'll test it after lunch! |
@mario , on mi Xiaomi mi5 with miui 8 (android 7), HDR photo was automatically uploaded. |
@mario tested the latest code base and it now catches both on Nexus5X (running 7.1.2 Beta): "burst mode" and HDR processing, took 7 pictures with/without HDR hitting the shutter button and you caught all of them 🚀 |
@AndyScherzinger thank you. I have isolated a few more bugs and am working on fixing them. |
Just for my reference, this PR (so far) fixes/adds:
Todo:
|
@AndyScherzinger if you can test again, I'd appreciate it! |
Okay, maybe wait still until beta tomorrow xD |
I don't run the beta at the moment, so I would install the branch. Anymore changes to be expected for this branch today? |
Yes, there'll be changes to make upload work again xD Thanks for your patience. |
build is broken! |
@AndyScherzinger everyone, panic! :D |
@AndyScherzinger ready for testing! |
This reverts commit e7da3ed. # Conflicts: # src/com/owncloud/android/operations/UploadFileOperation.java
d10d926
to
5fee93d
Compare
Oh so the checkmark is intentional? I guess it would be - shows the file is downloaded, which is technically is residing in the app folder as if it had.. good should. @tobiasKaminsky are you alive? :) |
Yes it is :) |
Due to design flaws of FileObserver on Google side, and lacking implementations on the side of various vendors, the approach Auto Upload was using would never work - at least not in the way we were using it.
Unfortunately, some vendors decided to hide certain inotify events, and you could also never know when the file was finished writing to (CLOSE_WRITE isn't a 100% bulletproof solution).
To remedy the situation, I have rewritten a significant part of Auto Upload, and in the process made it available to Android 5+. In the future, I expect to adapt it to 4+ as well so nobody has to live with pain that is Instant Upload.
As such, this should fix 95% of our troubles with uploads we've had in the past.
I have tested this to the extent possible, and it seems to work quite good.
I appreciate any and all comments, reviews and constructive criticism on both the code and the functionality.