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

Sort by EXIF 'taken' date #315

Closed
wants to merge 2 commits into from
Closed

Sort by EXIF 'taken' date #315

wants to merge 2 commits into from

Conversation

denim2x
Copy link

@denim2x denim2x commented Aug 30, 2017

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 <[email protected]>
@denim2x
Copy link
Author

denim2x commented Aug 30, 2017

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

added missing 'exif' attributes

Signed-off-by: denim2x <[email protected]>
@jancborchardt
Copy link
Member

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

@oparoz
Copy link
Member

oparoz commented Sep 1, 2017

@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

patman15 commented Sep 2, 2017

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
Member

oparoz commented Sep 6, 2017

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
Member

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

@oparoz
Copy link
Member

oparoz commented Sep 6, 2017

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

@jancborchardt
Copy link
Member

jancborchardt commented Oct 3, 2018

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 free to 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.

4 participants