cloud-py-api / mediadc

Nextcloud Media Duplicate Collector application
https://apps.nextcloud.com/apps/mediadc
GNU Affero General Public License v3.0
95 stars 8 forks source link

Resolved list says there are 20 resolved files, but the list is actually empty #109

Closed gergelypolonkai closed 1 year ago

gergelypolonkai commented 1 year ago

I have ran the app over my media files several times, and deleted many files in the process (including some cases where i deleted all versions of an image because i don’t need it). Looking at the resolved list it tells me that there are 20 resolved files, but the list is actually empty. I can’t seem to find a reliable way to reproduce it, but i suspect it’s because of those cases when i deleted all versions.

Expected behavior If the title says there are resolved files, show them (or, if the file doesn’t exist, tell that and/or automatically remove that file from the list).

Screenshots 2023-01-21T06:26:55,477545494+01:00

Desktop (please complete the following information):

Additional info

I checked the JSON the app sends to the frontend, and it contains a bunch of empty arrays:

{
  "success": true,
  "resolved": {
    "photos": {
      "data": [
        [],
        [],
        [],
        [],
        [],
        [],
        [],
        [],
        [],
        []
      ],
      "page": 0,
      "total_items": 20,
      "total_pages": 2
    }
  }
}
andrey18106 commented 1 year ago

@gergelypolonkai Hi! Thanks for this issue. From one of the previous releases there was a bug with cleanup job, that should delete (once a week) these entries (including marked as resolved) from mediadc_photos and mediadc_videos tables (if they were permanently deleted from the cloud), so that they wouldn't be displayed on the Resolved page.

Anyway, yes, there should be some label/notiсe about that on the page, that the file not available anymore, but a record (media hash with resolved flag) still here at mediadc. I'll think about that. Thank you.