-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The directory order of "sort by date - descending" is messed up after indexing the folders #751
Comments
Do you have the same issue when you index folder?
The directory sorting changed in the latest release but that assumes a
fully indexed directory or the sorting could be inconsistent.
Bruce Chen ***@***.***> ezt írta (időpont: 2023. okt. 22.,
Vas 11:35):
… *Note:* Please always try reproducing the issue on the :edge build. There
is a chance that it was already fixed. If it's an UI issue, you can try
reporducing it on the demo page <https://pigallery2.onrender.com/>.
------------------------------
*Describe the bug*
This issue happens when I was testing the release of V2.0.0 ( commit
4dc431f
<4dc431f>
). In the Gallery, if we set the sorting order to "By date - descending",
the order of directory will be incorrect after indexing a folder.
To reproduce the issue:
1. Create a folder called test under Gallery
2. Prepare two folders in a tmp folder with the following structure:
> tree ./tmp
.
├── new
│ └── new_in
│ └── new.PNG # can be a random picture
└── old
└── old_in
└── old.PNG # can be a random picture
1. Move the old folder into test folder, wait for 1 min
2. Move the new folder into test folder
3. Goto the Gallery page of test, set the sorting order to "By date -
descending"
4. Now inside the test gallery, the order of the folders should be
correct ( new is in front of old, meaning new is newer ). Both folder
have no cover since the folder is not indexed.
5. Now click the new folder so the folder will be indexed.
6. Go back to test Gallery and refresh the page. We'll notice that the
new folder will be move behind the old folder, which is incorrect
since the new folder should be the first folder in the gallery.
The above is just a simple example to demonstrate the issue. In my case (
a Gallery with lots of folder ), this issue messed up the order of lots of
folder -- most of them will be "shifted" to the last order ( meaning
pigallery2 think it's the oldest even though it's not ) after being indexed.
As for expected behavior: the order of the folders should follow the
result of the ls -lt command. For example, if the result is:
new # latest
|
v
...
old # oldest
Then the order of the folders in Gallery should be:
new ->... old
*Photo/video (optional) that causes the bug*
N/A
*Screenshots (optional)*
N/A
*Server logs (optional)*
N/A
*Environment (please complete the following information):*
- OS: Server runs on Linux, browser on Windows.
- Browser: Brave
*Used app version*:
Using the docker image from here
<https://hub.docker.com/layers/bpatrik/pigallery2/2.0.0/images/sha256-8c9844bb9ea2816c000af78a1538ea64a3a05958affb86a1e175775d5214e599?context=explore>
.
Version: V2.0.0
Commit: 4dc431f
<4dc431f>
—
Reply to this email directly, view it on GitHub
<#751>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABZKA5UJJSX7N4FNWCKE7UTYATSFNAVCNFSM6AAAAAA6KYYDSCVHI2DSMVQWIX3LMV43ASLTON2WKOZRHE2TKOBTGA4TGNQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Not sure what you mean by this, but I'll explain more what I tried : When I reset a Gallery ( click "Gallery reset" ), the folders in the Gallery will be in correct order. Some of the folder doesn't have cover ( since they aren't index yet ). Then, I click the "Run now: Indexing" button in Settings page, after that, lots of folders are out of order ( many of them are being shifted backward even though they aren't that old ). Other observations:
After indexing, since
Notice that
I'm not sure what changed but I would say I prefer how pigallery2 handle directory sorting before |
Since b5dce0a, the app assumes that your gallery is fully indexed and uses that actual oldest photo data for sorting the folders. Previously it was using the last modification date of the folder.
I meant if the issue still exists if you fully index your gallery. Adding a reference to dis discussion to the release notes. |
I'm happy to argue if this is the best approach, and don't mind improving it, but I think using the folder's oldest photo is better then the previous last modified date. |
I see, thanks for the explanation. However it still confuses me since I found a folder, which is newly added that day ( new folder + new picture in it ), still being placed in older order after indexing even though it should be the newest folder in the gallery. Not sure why.
Hmmm to me the last modified date is more intuitive when thinking of "Descending date", I'm not used to remembering the oldest picture in the folder, can only remember which folder is modified last. It's probably because I use pigallery2 to host my comics and CG collections, so for me it's very important to track the folders by last modified date. Is it possible to have both sorting methods in the application ? That way users can choose which "Descending date" sorting method they prefer to use when organizing their gallery. |
Note: Please always try reproducing the issue on the
:edge
build. There is a chance that it was already fixed. If it's an UI issue, you can try reporducing it on the demo page.Describe the bug
This issue happens when I was testing the release of V2.0.0 ( commit 4dc431f ). In the Gallery, if we set the sorting order to "By date - descending", the order of directory will be incorrect after indexing a folder.
To reproduce the issue:
test
under Galleryold
folder intotest
folder, wait for 1 minnew
folder intotest
foldertest
, set the sorting order to "By date - descending"test
gallery, the order of the folders should be correct (new
is in front ofold
, meaningnew
is newer ). Both folder have no cover since the folder is not indexed.new
folder so the folder will be indexed.test
Gallery and refresh the page. We'll notice that thenew
folder will be move behind theold
folder, which is incorrect since thenew
folder should be the first folder in the gallery.The above is just a simple example to demonstrate the issue. In my case ( a Gallery with lots of folder ), this issue messed up the order of lots of folder -- most of them will be "shifted" to the last order ( meaning pigallery2 think it's the oldest even though it's not ) after being indexed.
As for expected behavior: the order of the folders should follow the result of the
ls -lt
command. For example, if the result is:Then the order of the folders in Gallery should be:
Photo/video (optional) that causes the bug
N/A
Screenshots (optional)
N/A
Server logs (optional)
N/A
Environment (please complete the following information):
Used app version:
Using the docker image from here.
Version: V2.0.0
Commit: 4dc431f
The text was updated successfully, but these errors were encountered: