immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
48.24k stars 2.53k forks source link

Photos count is wrong/misleading? #13152

Open andymarden opened 1 week ago

andymarden commented 1 week ago

The bug

I have an external library with about 40,000 photos and 400 videos in it - that is owned by the admin user and shared with user A.

The web page for user A shows, in the (i) popup next to photos, a count of 4000 photos and 200 videos, but when I scroll through the photos, there are way more than 4000 there.

I can see photos both from the shared external library and others as I scroll down this page.

Running this in the db:

select "ownerId", type, count(*)
from assets
group by "ownerId", type

confirms that, while all photos are shown on from both local and shared on the page (I can see that but there is no overall count to confirm that on the page), the count shows only those owner by the user. Rather misleading to say the least.

Trying to see this is further complicated by (unless I am missing something):

It is good that shared libraries are mixed in with your own but I would have thought that:

I know there's a lot to dop on proper integration of libraries cross-user (as per previous discussion threads) but this starts off with what I can only see as a bug and then suggests improvements to supplement that.

The OS that Immich Server is running on

Alpine standard docker on ubuntu

Version of Immich Server

v1.117.0

Version of Immich Mobile App

v1.117.0

Platform with the issue

Your docker-compose.yml content

not relevant for ths

Your .env content

not relevant for this

Reproduction steps

  1. Have a library shared with you
  2. Go to the main web page
  3. Hover over the (i) next to Photos on the menu.

Relevant log output

n/a

Additional information

I have offered and and happy to discuss further that broader question of the data model and multi-user library and functionality

mertalev commented 1 week ago

I think the immediate bug is that the count doesn't take external libraries into account. I don't think this is intended behavior and should be fixed.

The other suggestions are more like feature requests:

andymarden commented 6 days ago

The point here is the scenario (that I know other have expressed to) and it goes like this:

  1. My family/wife and I to keep it simple) have family photos. We have a large existing disk store of photos stretching back 25 years. So that becomes and external library and is owned by a "family" admin user.
  2. We both take photos - some might be personal and some family. Each of has a phone and we have the Immich app on the phone. We naturally would set the Immich app to upload into our individual user accounts.
  3. We want to create family albums of stuff - from the external library and from each of our individual libraries. Both of us want to be able to do this - perhaps I create an album with photos from my library and external store and my wife adds photos to it from her library.
  4. We both also might create our own albums for our own purposes to share with our individual friends.
  5. The photos from our camera - maybe they get put in the external library - not sure - perhaps.
  6. We want to be able to see facial recognition, map location, etc - all the associated things, in both our from any library that we have read access to. We would each fine tune facial recognition etc on our own libraries and both would want to be able to on the shared library (external in this case).
  7. Which library a photo is part of makes a difference so identifying and filtering is important. I can only do certain operation on photos in libraries I own. SO knowing that I can select the stuff I own vs the stuff I don't (at least) is important I think.

There may be ways of doing this that have not occurred to me but others have said similarly on the discussion thread. I think this must be a very common use case in many families.

At the moment, unless I am wrong, we need to do one of: a. We both use only the one admin account and accept that all photos we both take are part of one set and we both login as that user - limiting for the broader usage and b. If we wanted to have our own collections of stuff, have separate accounts we log into for our own stuff (which makes uploading from teh phone quite awkward)

There may be other ways of doing this but it seems an awkward fit at the moment.

I would love to have a broader discussion on this because I think it is important and, at teh heart of it, is the data model that underpins the application. Any thoughts?