scubajeff / lespas

Les Pas, photo album app for Nextcloud user
Apache License 2.0
450 stars 22 forks source link

Select local folders on Android #14

Closed lgwapnitsky closed 1 year ago

lgwapnitsky commented 3 years ago

I'd like the ability to select which folders are synced via the camera roll function, rather than all downloaded images being uploaded

scubajeff commented 3 years ago

Les Pas follows android's privacy guideline and use android's SAF (storage access framework) to read from your phone's camera roll, to be specific, the content of phone's DCIM folder. It's up to Android OS to determine what files fall in that category. As Google just announced several days ago, it will enforce Android 11's scope storage feature from this August. Scope storage is all about protecting user's privacy, it restrict apps from accessing storage area which are not created by their own. Apps without special permission granted can only read from DCIM and Pictures folder using SAF.

BettaGeorge commented 3 years ago

I think @lgwapnitsky was talking about the opposite problem – they do not want the option to sync more folders, they want the option to sync fewer folders. As in, currently you have two options:

If I understand correctly, @lgwapnitsky would like the following option (for example):

I would probably not use that because I organize everything in albums, but I think that is what they meant.

scubajeff commented 3 years ago

Les Pas only works on DCIM folder, not Picture folder.

manny8975 commented 2 years ago

Hi, love this app been searching for a third party photo library for nextcloud for the past week and missed this one somehow.

I'm not sure @BettaGeorge is correct, I think @lgwapnitsky and I want the same functionality. I'd like to be able to sync folders other than just what is in DCMI. I know @scubajeff mentioned this is due to new android limitations on what files an aop can access and also mentioned its not possible without special permissions. Could these special permissions be an optional extra to enable in settings so that Les Pas can use all the media from the android phone (similar to VLC, for example?).

Without this, only my camera roll is backed up and no downloaded photos are backed up (amount other things). I also wanted to ask if the camera roll view could be modified to include the photos from any remote albums too, acting as an "All photos" viewing option similar to default views in iOS/Google Photos.

EDIT: I currently have sync disabled with Les Pas and instead use nextcloud to synchronise with my server with each local folder pointed at it's own remote folder in /lespas/ This let's me upload local folders other than DCMI, although its not ideal since I still cannot see all photos in the camera roll view and the Les Pas app does not recognise there is also a local copy available. It would be great to get just the 'All photos' functionality working - with the extra of supporting 'All files access' android functionality being the cherry ontop.

Thanks

scubajeff commented 2 years ago

@manny8975 Honestly I can not imagine how you are doing with Les Pas in your use case. But the additional permission idea looks feasible.

manny8975 commented 2 years ago

@scubajeff Yes bit of a headache to setup to be honest, not too bad once that was done though. I'm essentially just trying to replace Google photos and the stock nextcloud photo/video experience is not the best. My current setup is a nice compromise.

Any thoughts on an option for showing all albums in the camera roll/adding another album that includes all photos?

scubajeff commented 2 years ago

@manny8975 Do you mean all the media files in your phone? or all the media files on your NC server home? or both?

manny8975 commented 2 years ago

@scubajeff Both ideally, but all media files in NC would do the job.

scubajeff commented 2 years ago

@manny8975 That's nearly impossible. Nextcloud API is base on WebDAV, to get all files meta by reading directory tree recusively just take forever to finish.

manny8975 commented 2 years ago

@scubajeff Not sure on the workings of the API myself, you know more than me. That being said, how does the official nextcloud app achieve this?

Would the option of selecting a specific photos folder (that may have subfolders) reduce the time to read the directory tree? Maybe a local cache of some sort that indexes the files on NC and then runs through the index on startup to check it is up to date before then checking for new files?

scubajeff commented 2 years ago

Both your suggestions are actually implemented in Les Pas right now. Albums synced with lespas/ folder on server works by utilizing NC's fileid and etag meta data. This works quite well since it is the same mechanism NC used for it's own clients. But seems like a overkill to me to use it with a casual backup use case. That's why camera roll archive management is based on WebDAV PROPFIND read on server's DCIM/ folder with indefinite folder depth.

manny8975 commented 2 years ago

@scubajeff Yeah you're right. Not sure why I was clarifying those points to be honest, since that functionality is already there. What I want is to be able to see a full list of all photos, similar to the camera roll but it uses /DCMI and /lespas instead of just /DCMI as it is currently.

I tested with my setup by changing nextcloud to upload local media to the NC DCMI directory. This shows all my media in the camera roll album but does not preserve the albums so I think including an option that allows the NC /lespas folder to be included in the camera roll album would allow me to maintain my albums in lespas and also have a view that shows me all photos.

scubajeff commented 2 years ago

I still can't understand your use case, if you want to use the album feature, why not just create your albums in lespas?

manny8975 commented 2 years ago

My use case is that similar to Google photos. I simply want to be able to see all media (all photos from all albums) in one view, as well as all albums individually. For example: Albums:

Holiday DCMI Download

Functionality:

An album for each of these within lespas (already implemented) A view that let's me see all photos from all albums i.e. Holiday, DCMI, Download

From my knowledge the latter is not currently possible.

I have found a similar app PlayStore/Source that provides what I am looking for. However, this app does not generate video previews on its own and instead relies on nextcloud to provide them, which my managed provider does not support - plus I prefer the UI of lespas.

scubajeff commented 2 years ago

First of all, to avoid confusion, let us agree on that 'album' means album created in Lespas app.

As you mentioned, you already have some albums in Lespas, and I bet you had also used the camera roll managment feature, been able to see all your camera shots. Now, what you want is for the camera roll manager to manage images in folders other than DCIM, is that right?

manny8975 commented 2 years ago

Correct, we're on the same page.

scubajeff commented 2 years ago

Les Pas follows android's privacy guideline and use android's SAF (storage access framework) to read from your phone's camera roll, to be specific, the content of phone's DCIM folder. It's up to Android OS to determine what files fall in that category. As Google just announced several days ago, it will enforce Android 11's scope storage feature from this August. Scope storage is all about protecting user's privacy, it restrict apps from accessing storage area which are not created by their own. Apps without special permission granted can only read from DCIM and Pictures folder using SAF.

As I explained early, the only eligible device folder left to be included is 'Pictures', however, I also advocate users not to store any of their files in public folder to avoid being scanned by 3rd party software.

frederikb96 commented 1 year ago

I am also interested in this topic. To clarify, I would also like to back up with the camera roll function, pictures which are not located within DCIM.

My current solution: One can use a script or simply the foldersync app to move all pictures automatically from Pictures/Screenshots and Pictures/signal-...pictures... to a folder within DCIM. Then Les Pas is backing the files up.

About the feature request: As you said, there is no difference in the DCIM and Pictures folder with regard to privacy. Thus, I would give a thumbs up, to have the option to have checkmarks in the settings, to select the folders from DCIM and Pictures, that you want to have included. Like in the official Nextcloud App.

scubajeff commented 1 year ago

I kind of feel the heat myself of the need to backup screenshot folder, which is now standardized resting in Pictures folder for almost every ROM out there. However, not like DCIM, Pictures folder is more a wild beast. As Google tighten up it's privacy policy implementation, more and more apps find this folder the last place to dump media files, so I think sub folder exclusion might be a desired feature too. I will see what I can do. It won't happen soon.

scubajeff commented 1 year ago

Latest release 2.8.0 added backup of 'Pictures' folder with options to exclude sub folders from backup

scubajeff commented 1 year ago

release 2.9.0 brings the new Gallery.