Skip to content
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

Use original date time to order files in UI #2125

Merged
merged 3 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions js/photos-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/photos-main.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/photos-public.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/photos-public.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/Listener/OriginalDateTimeMetadataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function handle(Event $event): void {
return;
}

if (!in_array($node->getMimeType(), Application::IMAGE_MIMES)) {
if (!in_array($node->getMimeType(), Application::IMAGE_MIMES) && !in_array($node->getMimeType(), Application::VIDEO_MIMES)) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/store/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const mutations = {
file.fileid = file.fileid.toString()

// Precalculate dates as it is expensive.
const date = moment(file.lastmod)
const date = moment((file.metadataPhotosOriginalDateTime * 1000) || file.lastmod)
file.timestamp = date.unix() // For sorting
file.month = date.format('YYYYMM') // For grouping by month
file.day = date.format('MMDD') // For On this day
Expand Down
Loading