Feature: Add Subfolder Strategy for Automatic Uploads#56
Feature: Add Subfolder Strategy for Automatic Uploads#56PhilippThaler wants to merge 1 commit intoopencloud-eu:mainfrom
Conversation
58a9e8a to
fd65b96
Compare
|
Heavily waiting for that one :-) |
|
this thing is soooo missing! Waiting for this as fu** :-) |
|
Thank you for updating the PR. |
|
Thanks for pointing that out. It was a simple typo that tripped up detekt. Fixed and verified. |
|
hi, ill start reviewing this |
|
Hey, looked through the changes and found a couple issues: MIGRATION_43_44 conflicts with the existing AutoMigration There's already an The migration should target 49->50 (current DB version is 49), not 43->44. SQL syntax in Migration_44.kt The Legacy users get YEAR subfolders Migration_34.kt sets |
cb92357 to
780c49a
Compare
|
Thanks for the review! All issues should be fixed now:
Let me know if there's anything else! |
|
Thanks for the update, I took another look at the latest head (780c49a). The Room migration issues from my earlier pass look fixed now. DB version is 50, the 49 -> 50 migration is registered, and the TEXT default is quoted as 'NONE'. I don't see a critical blocker in the current diff. The one thing I would still add is a small test around AutomaticUploadsWorker's new date based path logic. Covering NONE, YEAR, YEAR_MONTH, and YEAR_MONTH_DAY with a fixed lastModified timestamp would make this easier to trust. Small cleanup: the XML defaultValue is 'None' while the actual entry value is 'NONE'. That probably does not break the current flow, but matching it to 'NONE' would be cleaner. |
|
Changed the XML defaultValue and created AutoUploadPathBuilderTest. The tests should work but the problem is that they won't compile because tests like "eu/opencloud/android/presentation/viewmodels/DrawerViewModelTest.kt are using kotlinx.coroutines.test.TestCoroutineDispatcher#pauseDispatcher() which is deprecated and gives compilation errors. squashed everything |
780c49a to
620f97d
Compare
|
thank u @guruz can u take a look here this PR is pretty old |
Feature: Add Subfolder Strategy for Automatic Uploads
Based on #46
What does this PR do?
This PR introduces a new feature that allows users to automatically organize their camera uploads into subfolders based on the date the picture or video was taken. Users can choose to create subfolders by:
/2025/)/2025/11/)/2025/11/09/)This helps users keep their cloud storage tidy and makes it easier to browse through photos from specific dates.
How is this implemented?
UseSubfoldersBehaviourEnum:FolderBackUpConfiguration.ktto represent the different subfolder options (NONE,YEAR,YEAR_MONTH,YEAR_MONTH_DAY).AutomaticUploadsWorker:buildUploadPathto construct the remote path dynamically based on the selectedUseSubfoldersBehaviourand the file's last modified date.FolderBackUpEntityand the corresponding database migration (MIGRATION_43_44) were updated to include the newuseSubfoldersBehaviourfield.How to test this?
Settings>Automatic Uploadsfor either pictures or videos.Screenshots