Merge pull request #1 from thumbsup/master

merge newest changes
pull/133/head
Andrew McOlash 6 years ago committed by GitHub
commit df5062e02d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -25,6 +25,9 @@ FROM thumbsupgallery/runtime:alpine
RUN apk add --update tini
ENTRYPOINT ["tini", "-g", "--"]
# Thumbsup can be run as any user and needs write-access to HOME
ENV HOME /tmp
# Copy the thumbsup files to the new image
COPY --from=build /thumbsup /thumbsup
RUN ln -s /thumbsup/node_modules/.bin/thumbsup /usr/local/bin/thumbsup

2
package-lock.json generated

@ -1,6 +1,6 @@
{
"name": "thumbsup",
"version": "2.4.1",
"version": "2.4.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

@ -1,6 +1,6 @@
{
"name": "thumbsup",
"version": "2.4.1",
"version": "2.4.2",
"description": "Photo / video gallery generator",
"author": "Romain Prieto",
"license": "MIT",

@ -53,6 +53,7 @@ function getDate (exif) {
function getMetaDate (exif) {
const date = tagValue(exif, 'EXIF', 'DateTimeOriginal') ||
tagValue(exif, 'H264', 'DateTimeOriginal') ||
tagValue(exif, 'QuickTime', 'ContentCreateDate') ||
tagValue(exif, 'QuickTime', 'CreationDate') ||
tagValue(exif, 'QuickTime', 'CreateDate')
if (date) {

@ -32,6 +32,16 @@ describe('Metadata', function () {
should(meta.date).eql(fixtures.date('2016-10-28 17:34:58').getTime())
})
it('prefers the ContentCreateDate field if present', function () {
// when exporting a movie from the macOS Photos app, it sets
// CreateDate=date_of_export and ContentCreateDate=date_taken
const exiftool = fixtures.exiftool()
exiftool.QuickTime.CreateDate = '2016:10:28 17:34:58' // EXIF date format
exiftool.QuickTime.ContentCreateDate = '2016:09:02 10:25:41' // EXIF date format
const meta = new Metadata(exiftool)
should(meta.date).eql(fixtures.date('2016-09-02 10:25:41').getTime())
})
it('infers the date from the filename (Android format)', function () {
const exiftool = fixtures.exiftool()
exiftool.SourceFile = 'folder/VID_20170220_114006.mp4'

Loading…
Cancel
Save