Skip to content
This repository was archived by the owner on Nov 1, 2020. It is now read-only.

Sort by EXIF 'taken' date - #315

Closed
ghost wants to merge 2 commits into
masterfrom
unknown repository
Closed

Sort by EXIF 'taken' date#315
ghost wants to merge 2 commits into
masterfrom
unknown repository

Conversation

@ghost

@ghostghost commented Aug 30, 2017

Copy link
Copy Markdown

Fixes: #51

Licence: AGPL

Description

Attempts to implement new feature: sort by EXIF 'taken' date; new button added to the interface -
switches sortType to date-taken, causes the files to be sorted by their exif.taken_date properties.

Features

  • new button for sorting by EXIF 'taken' date
  • improved JS code for supporting new sortTypes
  • FilesService.php improvements
    • getNodeData() return value has new exif attribute;
    • new method getEXIF() for retrieving specific EXIF data
      • taken_date attribute (UNIX timestamp) maps to DateTimeOriginal EXIF field; defaults to 0.

Screenshots or screencasts

screencast

Caveats

Tests

Test plan

Update Gallery app, launch Nextcloud, navigate to Gallery, open any album, click on Sort by EXIF taken date button (next to the Sort by modified date button); the ordering should change depending on each photo's exif.taken_date property.

Tested on

  • Windows/Opera
  • Windows/Firefox
  • Android 6.1/Chrome

TODO

  • Optimize backend code through caching (Redis, MySQL)

Check list

  • Code is properly documented
  • Code is properly formatted
  • Commits have been squashed
  • Tests (unit, integration, api and/or acceptance) are included
  • Documentation (manuals or wiki) has been updated or is not required

Reviewers

@oparoz, @jancborchardt

'/files/list' response -> new 'exif' attribute (['taken_date' => <timestamp>]); new button for sorting by 'exif.taken_date'; new camera icons
Signed-off-by: denim2x <denim2x@cyberdude.com>
@ghost

Copy link
Copy Markdown
Author

@oparoz What can I do about the failed SignInAsUserCept test?

added missing 'exif' attributes
Signed-off-by: denim2x <denim2x@cyberdude.com>
@jancborchardt

Copy link
Copy Markdown
Member

A code review please :) @rullzer@MorrisJobke@lcalaresu@irgendwie@skjnldsv

@oparoz

Copy link
Copy Markdown
Member

@oparoz What can I do about the failed SignInAsUserCept test?

You can open another PR if you want, the CSS for the menu item has changed, so the acceptance test fails.

@patman15

Copy link
Copy Markdown

Since my name is mentioned under "Reviewers", I'm too far away from the project to provide reasonable feedback. I can test if you want. Let me know if "easy" tasks are required I would support that.

@oparoz

Copy link
Copy Markdown
Member

Regarding this PR, my biggest issue is that the information is never saved, which will lead to a performance hit, which should be measured.

I think a better option is still to have some form of meta data extraction being performed at upload time and it should be a core functionality of the server since it isn't only useful for images, but lots of other file types.

@jancborchardt

Copy link
Copy Markdown
Member

Then we should continue in the core issue at nextcloud/server#5106 ?

@oparoz

Copy link
Copy Markdown
Member

Correct. And once EXIF data is available via an API, then we can re-activate this PR and create lots of fun others :)

@jancborchardt

jancborchardt commented Oct 3, 2018

Copy link
Copy Markdown
Member

Closing then as we should work on this in core as commented. @denim2x let’s continue in the core issue at nextcloud/server#5106 🙂

Please also note that we will likely focus our efforts on the upcoming grid view of Files rather than Gallery.

Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@jancborchardt@oparoz@patman15