BUG: Removed subfolder comes back on next sync and kept subfolders lose favourites and albums
I maintainer di solito rispondono entro 3 giorni
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Is there an existing issue for this?
- I have searched the existing issues
What happened?
Description
A subfolder removed from PictoPy comes back on the next sync of its parent folder. The subfolder that was kept is deleted and added again, so its photos lose their favourite mark and album membership.
Steps to reproduce
- Create
main/X/Ywith a photo in each folder, and addmainto PictoPy. - Favourite the photo in
Yand add it to an album. - In Settings, remove
Xand leave Also delete 1 subfolder unchecked. - Copy a new photo into
mainand wait for the automatic sync.
Expected behavior
X stays removed. The photo in Y stays a favourite and stays in its album.
Actual behavior
Xand its photo come back.- The photo in
Ygets a new ID (56aac140->d1289525). - It is no longer a favourite, and the album drops from 1 photo to 0.
Cause
sync_folder (backend/app/routes/folders.py) compares the direct child folders on disk with those in the database. After X is removed, Y is attached to main. Sync then treats Y as obsolete (it is not a direct child on disk) and X as new, deletes Y, and adds X and Y again. Folders removed by the user are not remembered.
Suggested fix
Remember folders the user removed and skip them during sync, do not treat re-attached subfolders as obsolete, and add tests.
Screenshots
1. The photo in Y is a favourite
IMAGE-1
2. Removing X and keeping its subfolder
IMAGE-2
3. X is removed
IMAGE-3
4. After adding a photo to main, X is back
IMAGE-4
5. The favourite is gone
IMAGE-5
Video:-
https://github.com/user-attachments/assets/8d289434-50a0-44c5-a772-0ca6cb511268
Log
== 1. After adding 'main', favouriting y.png and adding it to an album
folders: ['main', 'main/X', 'main/X/Y']
photo: main/X/Y/y.png id=56aac140 favourite=True
photo: main/X/x.png id=1c32e379 favourite=False
photo: main/main.png id=852c1811 favourite=False
album photo counts: {'Demo Trip': 1}
== 2. After removing subfolder X in Settings, keeping its subfolder
folders: ['main', 'main/X/Y']
photo: main/X/Y/y.png id=56aac140 favourite=True
photo: main/main.png id=852c1811 favourite=False
album photo counts: {'Demo Trip': 1}
== 3. After copying new.png into 'main' (synced by the file watcher)
folders: ['main', 'main/X', 'main/X/Y']
photo: main/X/Y/y.png id=d1289525 favourite=False
photo: main/X/x.png id=063800a5 favourite=False
photo: main/main.png id=852c1811 favourite=False
photo: main/new.png id=f1c52cee favourite=False
album photo counts: {'Demo Trip': 0}
Environment
macOS, dev at e3d5a999. Reproduced with the local backend and file watcher. The UI was run in Chrome with a stand-in for the Tauri layer, so thumbnails are generated placeholders. Folder setup and file copies were scripted.
I would like to work on this if approved.
Record
- I agree to follow this project's Code of Conduct
- Lingua principale
- Python
- Stelle
- 322
- Fork
- 793
- Merge medio
- 6g 10h
- PR unite (30g)
- 20
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di AOSSIE-Org/PictoPy
-
bug enhancement
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
AOSSIE-Org/PictoPy#1802 · 2 commenti ·
I maintainer di solito rispondono entro 3 giorni
-
BUG: XMP metadata export permanently overwrites file modification timestamp (mtime), destroying photo datesForse già presa @swastiksharma45 l’ha presa 2 giorni fa. Apertabug enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
AOSSIE-Org/PictoPy#1788 · 6 commenti ·
I maintainer di solito rispondono entro 3 giorni
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
AOSSIE-Org/PictoPy#1786 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
BUG: Semantic search sees portrait phone photos sideways (SigLIP ignores EXIF orientation)Forse già presa @omkar-suryavanshi l’ha presa 3 giorni fa. Apertabug enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
AOSSIE-Org/PictoPy#1780 · 5 commenti ·
I maintainer di solito rispondono entro 3 giorni
-
BUG: Share password loses leading/trailing spaces so the password you set doesn't workForse già presa @ManyaJain111 l’ha presa 2 giorni fa. Apertabug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
AOSSIE-Org/PictoPy#1779 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 3 giorni
Tutte le issue di AOSSIE-Org/PictoPy
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
hermes hooks doctor smoke test never checks the hook exit code — a crashing hook (exit=1) renders ✓ "ran clean" and "All shell hooks look healthy"Forse già presa @cestercian l’ha presa oggi. Apertacomp/cli P2 type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
NousResearch/hermes-agent#162259 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[request] gRpc/1.86.0Apertaupstream update
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
conan-io/conan-center-index#31597 ·
I maintainer di solito rispondono entro 1 giorno
-
community-request
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
NVIDIA-NeMo/Run#727 ·
I maintainer di solito rispondono entro 1 giorno
-
bot-triaged module: higher order operators module: pickle module: pt2-dispatcher oncall: pt2 triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
pytorch/pytorch#207247 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno