nextcloud / photos

πŸ“Έ Your memories under your control
GNU Affero General Public License v3.0
564 stars 62 forks source link

πŸ–ΌοΈπŸ“‚ Limit Photos to a single folder + subtree #141

Closed dermalikmann closed 7 months ago

dermalikmann commented 4 years ago

I think it would be really nice to create an option where the user can select a single folder (like /Photos) and the app only scans this folder and its subfolders.

I have tons and tons of images all over my nextcloud, but only in /Photos are my, well, photos. And it's kind of a tedious task to create always a .nomedia file in all other directories.

skjnldsv commented 4 years ago

@jancborchardt ?

jancborchardt commented 4 years ago

Yes, @Mikescops and I briefly talked about this at the Contributor Week as well. What we could go for:

  1. We look for a "Photos" or "Pictures" folder in the root. If it exists, we take that.
  2. We should also account for translations, ideally following the xdg-user-dirs translations.
  3. If no such folder exists, we fall back to root.
  4. We show a settings area in the bottom left with:

    Showing files from Photos and a button: ( Change folder )

That way it’s an automatic setup process but can still be adjusted later.

skjnldsv commented 4 years ago

I would say it doesn't cover my needs. I have multiple folders with pictures that I want to be shown. Android is using all available photos, no idea for other galleries. Could be nice to check what users expect before pushing such drastic changes :)

Also, just having a setting to include/exclude some folders is probably the easiest/most universal way to do? :woman_shrugging:

Mikescops commented 4 years ago

@skjnldsv the point of @jancborchardt during our discussion was to have the most easy and transparent way to have the folder setups. I agree include/exclude would be the prefered way (as it is done on the sync for desktop client) but Jan thought choosing a single folder and having a per default on the Photos folder is the easiest way.

skjnldsv commented 4 years ago

Defaut is indeed always preferable, I'm not arguing this part. But a default automated config needs to be relevant. I'm not sure this is relevant to use a default Pictures or Photos folder. Even our Nextcloud client have the default autoupload set to the InstantUpload folder, so we would not be compliant to our android setup :)

Mikescops commented 4 years ago

Let's take root folder but provide an option asap to restrict it to a given folder

thutex commented 4 years ago

same issue here that i am getting things like icons and unrelated artwork pictures in the photo app. i suggest maybe copying the music app option to specify the path to your picture collection, and only if left empty use the root?

saywebsolutions commented 4 years ago

same issue here that i am getting things like icons and unrelated artwork pictures in the photo app. i suggest maybe copying the music app option to specify the path to your picture collection, and only if left empty use the root?

Yes that would be great, or the other option mentioned above:

Let's take root folder but provide an option asap to restrict it to a given folder

bendschs commented 4 years ago

does .noimage apply to a folder and all subfolders or just the folder itself?

skjnldsv commented 4 years ago

does .noimage apply to a folder and all subfolders or just the folder itself?

folder and subfolders :)

bendschs commented 4 years ago

ok, in that case it simply does not work for me ... latest stable release of nextcloud 18

strugee commented 4 years ago

@bendschs please file a separate issue then. Make sure to search for duplicates beforehand.

kicker334 commented 4 years ago

Can this be developed? the .noimage/.nomedia trick isn't working for any of my folders.

jancborchardt commented 4 years ago

@kicker334 sure thing – are you interested in contributing? :)

kicker334 commented 4 years ago

@jancborchardt I honestly wouldn't know where to start, develop, or test this type of thing... :( I have to ask strangers on the internet for help.

naezeroth commented 4 years ago

I'd love to help out - I'm super new to this kind of thing but if I could get some starting tips I can definitely have a go!

skjnldsv commented 4 years ago

For anyone willing to help, please feel free to do so :) It requires the addition of a setting section here https://github.com/nextcloud/photos/blob/108105a984586db72fcc027cbbfeb87e737a35d5/src/Photos.vue#L27-L41 https://nextcloud-vue-components.netlify.app/#/Components/App%20containers?id=appnavigationsettings

Then a proper selection using our filePicker https://nextcloud.github.io/nextcloud-dialogs/modules/_filepicker_.html to specify which folder to use.

After that there will be various places to implement this filter: https://github.com/nextcloud/photos/blob/108105a984586db72fcc027cbbfeb87e737a35d5/src/services/FileList.js#L53 https://github.com/nextcloud/photos/blob/108105a984586db72fcc027cbbfeb87e737a35d5/src/services/AlbumContent.js#L37 (see the AlbumController file, you should be able to specify the path)

This is definitely a complex task, but we'll be glad to assis anyone diving into this the best we can!

ntimo commented 3 years ago

This is a really important feature to me. Because otherwise the "Your Photos" view is completely broken for me since it displays all kind of images (like my 1 billion screenshots) that are not import and should not be shown there.

muety commented 3 years ago

I totally agree with @ntimo. I'd love to have Nextcloud photos be my primary photo storage, but due to this bug it's essentially unusable.

saywebsolutions commented 3 years ago

I totally agree with @ntimo. I'd love to have Nextcloud photos be my primary photo storage, but due to this bug it's essentially unusable.

I concur; I fear that the developers aren't actually using the app to a sufficient extent to realize how poor the experience is in a number of ways. I am really trying to use Nextcloud Photos as my main photo workflow but having a lot of trouble.

Since the 'cloud photo' use-case is such a core feature of Nextcloud for casual users it really deserves a lot of attention and polish.

silverdr commented 3 years ago

Right - just add one more voice to the chorus. Keeping root as default but adding possibility to select what folders/subfolders should be used seems the best way to go.

rebelC0der commented 3 years ago

Hello. I looked through this a few times now, and I just can't figure out what is the solution to changing the Root photos folder for the Photos timeline? I am on the latest release 20. What needs to be done/configured to enable Photos timeline to be pointed to a custom photos folder?

skjnldsv commented 3 years ago

@RebelCoderRU

This is an opened issue. This is not implemented

StarSmasher44 commented 3 years ago

Any idea when this will be implemented at all? It's been almost a year now and in all honesty this isn't that big of a function that it would take so long to add something as simple as a (Customizable) list of scannable folders.

Without that, I have no use for the whole "Photos" app/functionality at all in NextCloud, simply because whatever I add gets buried within a whole bunch of random images..

If this really can't be done by the actual developers themselves, there is no shame but at least just tell us it isn't going to happen unless we build it ourselves.

Uninstalling the app until it actually works right, I suppose..

EDIT: And yes, if you really want to go for the quick, dirty and simple solution? Only scan the Photos folder. That's the whole reason it would be there right? For your photos.. It actually makes sense to only scan /Photos and its subdirectories, just count every subdirectory as an album. There is your quick and easy fix that makes this all work out nicely :)

strugee commented 3 years ago

@StarSmasher44 if you read all the way through this issue you would see that #515 is open. You could try deploying that patch to production. YMMV though.

Utopiah commented 3 years ago

What about have a configuration item with the directory to start from and if it's not in the path in scanCurrentFolder in AlbumsController then ignore the scan?

I'm posting this because even though a naive solution it seems that a lot of people would like to use Photos as a product with their NextCloud instance but have everything is blocking, which is a shame since most of the hard work is already done.

Suggestions done in other issues are surely better but also more complex (fine filtering) which seems not to get approved.

skjnldsv commented 3 years ago

What about have a configuration item with the directory to start from and if it's not in the path in scanCurrentFolder in AlbumsController then ignore the scan?

This is not for the albums, this is for the Timeline, which uses a different endpoint I'm not sure this feature is actually requested for the Albums section :thinking:

Utopiah commented 3 years ago

@skjnldsv then what's the indexing function for the Albums section? The idea would be the same, to filter out paths that are not in the configured one.

skjnldsv commented 3 years ago

This is the dav endpoint. Nextcloud's files indexing core. Please check the other comments in https://github.com/nextcloud/photos/pull/515 so you can fully grasp the issues and why this hasn't been fixed yet :)

b3nis commented 3 years ago

I just wanted to "cheer on" this feature request. I don't have any development skills (I am just a useless product owner as profession). Happy to test tho :-)

halfk1ng commented 3 years ago

From a UX'er, this made my day

useless product owner

iluvatyr commented 2 years ago

is photos app still developed? seems like this issue just doesnt get adressed.

dermalikmann commented 2 years ago

is photos app still developed? seems like this issue just doesnt get adressed.

Have you actually read through the issue? There are several reasons why this hasn't been implemented yet.

ParaplegicRacehorse commented 2 years ago

[not a developer] [but I can write help-docs]

I am also really excited to see this implemented.

Would it difficult to borrow code from the NC Music app, both for the scanning and the settings?

mrtumnus commented 1 year ago

IMO, this feature is no longer necessary due to the completion of the .nomedia/.noimage filter (#944). Does exactly what I need (thought will require a bit more management to make sure any potential added folders get excluded if needed).

inthreedee commented 1 year ago

This is definitely still necessary. As stated in the original post:

I have tons and tons of images all over my nextcloud, but only in /Photos are my, well, photos. And it's kind of a tedious task to create always a .nomedia file in all other directories.

An include list makes so much more sense than an exclude list, especially when the exclude list is handled by dot files in this way.

brainfellout commented 1 year ago

I agree 100% with what @inthreedee says above.

I provide Nextcloud services to various family members as well as myself, and none of us have any wish for the Photos app to show anything outside of the ~/Photos directory (or the like). Using the .nomedia / .noimage filter is just not feasible for most casual users of a certain age / background.

Outside of family, I provide support to other computer users. I see they generally all have the same basic setup as each other, with all their photos in a single top level directory - usually the default photos folder generated by their OS. Images outside of this directory are generally not suitable for showing in a Photos app.

A nice easy include list that can be set once (or left to use a default value) seems to me like it would be the ideal way forward for 95% of users, with no future planning or maintenance required. As it stands, the .nomedia / .noimage filter won't be bothered with by many, meaning in turn, the Photos app remains next to useless.

mrtumnus commented 1 year ago

Fair enough, @inthreedee and @brainfellout . I would also take advantage of this feature, as I similarly have a single "Shared Photos" folder.

The underlying reason I commented was that the workaround that I had previously tried to use to address this problem is now fixed (.nomedia previously didn't even work for Photos). So at least Photos is usable again (for me, and perhaps some others). But I agree that this feature would indeed still be helpful for a common use-case.

bendschs commented 1 year ago

for me the .nomedia/.noimage tag seems to be working for dekstop/browser (macos/brave) but not for the mobile app (ios). just wanted to point that out.

( i am running NC 24.0.6 and Apache PHP 8.0)

ArtemSmaznov commented 1 year ago

I hoped Photos 2.0 would fix this issue but seems there is no change. My photos are still swamped by the album arts from my Music directory. A custom Photos directory is a must have for a photos app

nssatlantis commented 1 year ago

I hoped Photos 2.0 would fix this issue but seems there is no change. My photos are still swamped by the album arts from my Music directory. A custom Photos directory is a must have for a photos app

You can use the .nomedia and .noimage files in said music folders so they will no longer show up.

danieljkemp commented 1 year ago

Needing to add files to folders explicitly is an incomplete solution when people might have auto-created folders (like when your music software imports a new album)

On Sat, Oct 22, 2022, 08:17 NSS Atlantis @.***> wrote:

I hoped Photos 2.0 would fix this issue but seems there is no change. My photos are still swamped by the album arts from my Music directory. A custom Photos directory is a must have for a photos app

You can use the .nomedia and .noimage files in said music folders so they will no longer show up.

β€” Reply to this email directly, view it on GitHub https://github.com/nextcloud/photos/issues/141#issuecomment-1287775537, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACON7ONJISYLKW2KLSAYJNTWEPLNVANCNFSM4KJGAL4A . You are receiving this because you are subscribed to this thread.Message ID: @.***>

ArtemSmaznov commented 1 year ago

I hoped Photos 2.0 would fix this issue but seems there is no change. My photos are still swamped by the album arts from my Music directory. A custom Photos directory is a must have for a photos app

You can use the .nomedia and .noimage files in said music folders so they will no longer show up.

I already tried that. As a test I created a new folder, added an empty .noimage file and uploaded a screenshot. It still showed in both All Media and Photos tabs.

Additionally, I'm not sure if this is supposed to work recursively (as in can I put 1 file in the root of my music dir or I need it in every album as I use beetz to organize my music and adding a file manually to each and every folder there seems like an unreasonable task)

kitzler-walli commented 1 year ago

Since the upgrade to nextcloud 25 the photos app ignores all .nomedia and .noimage files (it worked just fine in Version 24) and the new option "Photos directory" is ignored as well. No matter which folder I select I always see all images in all folders.

bendschs commented 1 year ago

Since the upgrade to nextcloud 25 the photos app ignores all .nomedia and .noimage files (it worked just fine in Version 24) and the new option "Photos directory" is ignored as well. No matter which folder I select I always see all images in all folders.

can confirm, in NC25 it does not work for me even in the webbrowser any longer.

ssc85 commented 1 year ago

I am also looking forward having a whitelist option to select root folders which are part of the photos/all media streams and not scanning all available files.

ArtemSmaznov commented 1 year ago

One thing that I haven't seen anyone mention yet. The android nextcloud app does have this feature - when inside the photos tab (called media) you can click the 3 dots on the top right and set the media folder and it updates the view to display only photos from that directory. Unfortunately it doesn't persist and you need to do it each time you go to media. This makes me think that all we need is a similar option for web where you can specify which folder to display the photos from (would be too bad to have a list instead of just 1 path but that is just a cherry on top, at least for me personally)

mrtumnus commented 1 year ago

TIL the Nextcloud Android app has a Multimedia tab. A bit slow to load, but promising nonetheless!

snagglewest commented 1 year ago

Not a whole lot to add but we're almost 3 years down the road and this is still a huge unresolved issue. I'd love to get the "photos" app back but this version is simply useless for me as well as many other users. Like most folks, I have tons and tons of images all over my various folders mapped into NC but only a few are actually photos. Either living with thousands of images that aren't photos or trying to create a few hundred .nomedia files in all other directories is asinine. If this app can't be fixed then NC needs to remove it as the standard because it's really not a "photos app", it's an image app...

bendschs commented 1 year ago

@meichthys thanx for the advice, had a quick look and i have to say, i actually don't see the need of an extra app (also considering all it's limitations of not running within the mobile nextcloud app on ios/android for instance) when up to 90% of it's functions are actually already covered within the fotos app. the straight forward thing to do from my point of view would be to manually pick the folders nextcloud should look for fotos. as @snagglewest pointed out, the app just becomes unusable for many users without that function. you will see all of your album covers, screenhots, icons and every other kind of image that actually just does not belong in the app.