Giter Site home page Giter Site logo

bpatrik / pigallery2 Goto Github PK

View Code? Open in Web Editor NEW
1.6K 25.0 189.0 100.28 MB

A fast directory-first photo gallery website, with rich UI, optimized for running on low resource servers (especially on raspberry pi)

Home Page: http://bpatrik.github.io/pigallery2/

License: MIT License

TypeScript 85.55% HTML 11.74% CSS 2.46% JavaScript 0.11% Dockerfile 0.13% Procfile 0.01%
raspberry-pi heroku photo-gallery node-js angular2 self-hosted pigallery2 photos photo-gallery-website gallery

pigallery2's People

Contributors

alexislefebvre avatar bpatrik avatar cryptogeek13 avatar desertwitch avatar estshorter avatar grahamalderson avatar grasdk avatar jacroe avatar kagahd avatar lijunle avatar magneticdud avatar marcusfey avatar martadinata666 avatar martyone avatar mblythe86 avatar mcdamo avatar mrtnbr avatar nk9 avatar nriver avatar sam365724 avatar sarayourfriend avatar steima avatar suika avatar tibrisch avatar tmorley2000 avatar tuur29 avatar wdavery avatar wikijm avatar zertrin avatar zigmhount avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pigallery2's Issues

docker-compose file

Here is a quick docker-compose file which will pull the latest stable pigallery2 and mariadb to allow you to quickly transistion from sqlite to mysql.

this will create the pigallery table in mariadb, which you can then connect to.

Note i had to put in the docker IP address into the MySQL configuration

just make sure you update your volume paths and passwords.

pigallery-db:
   container_name: pigallery-db
   image: mariadb
   # links:
   #    - pigallery:pigallery-db
   volumes:
      - /storage/pigallery/data/db:/var/lib/mysql
   environment:
     - MYSQL_ROOT_PASSWORD=putsomethinginherethatyouwouldlikeasthepassword
     - MYSQL_USER=pigallery 
     - MYSQL_PASSWORD=pigallery
     - MYSQL_DATABASE=pigallery


pigallery:
   container_name: pigallery
   image: bpatrik/pigallery2:nightly-stretch
   volumes:
      - /storage/pigallery/data/config.json:/pigallery2-release/config.json
      - /storage/pigallery/data/sqlite.db:/pigallery2-release/sqlite.db
      - /storage/pigallery/photos:/pigallery2-release/demo/images
      - /storage/pigallery/data/temp:/pigallery2-release/demo/TEMP
   environment:
      - NODE_ENV=production
   ports:
      - "1112:80"


@bpatrik, perhaps you could add this to the installation instructions.

cheers,

[Suggestion] download photos

This is a feature request to download multiple photos in a zip file.

When I share a link with family or friends they want to download the collection of photos easily. This could be an option to download all photos in current folder or an interface to select photos in the thumbnail view and then download only the selected photos.

Thankyou for this app, I'm really impressed with the searching tools.

Ability to change files

Hi,

I don't know where to put some improvement ideas I had for this so I'm opening them as issues. If you think they might not be the best ideas or the path you want for PiGallery, just ignore and close them ;)

I would like to be able to:

  • Delete photos
  • Move photos between folders
  • Rename photos

Regards,
Marco

Symlinks on the photos directory break Pigallery2

If you have any symlinks in the photos directory (Images folder) you get the following error in the UI:

Unknown indexing error for: ./
"[object Object]" 

Errors from the logs (from docker logs, I'm using the docker image):

1/23/2019, 12:19:26 AM[WARN] Handled error:
ErrorDTO {
  code: 7,
  message: 'Error during listing the directory',
  details:
   { error:
      'Error: ENOENT: no such file or directory, stat \'/pigallery2-release/demo/images/convert_video_to_MP4.sh\'' } }
{ error:
   'Error: ENOENT: no such file or directory, stat \'/pigallery2-release/demo/images/convert_video_to_MP4.sh\'' }
1/23/2019, 12:19:26 AM[WARN] Handled error:
ErrorDTO {
  code: 7,
  message: 'Error during listing the directory',
  details:
   { error:
      'Error: ENOENT: no such file or directory, stat \'/pigallery2-release/demo/images/convert_video_to_MP4.sh\'' } }

Keywords and exif data don't seems to be working

First of all, thanks for this amazing project I really enjoy it in my PI B+.

Unfortunately I'm currently having issues with metadata related stuff, it seems that keywords are not being recognized. I tried to modify them in the DB having success but it lasts until a new photo is added. When this happens, it seems like the DiskMangerWorker is deleting the values. Any advice?

Im running [email protected]

Thanks in advance!

Random image sorting

PiGallery2 is exactly what I was searching for and I really love it! The only thing I'm missing is the ability to sort the images randomly. At the moment you can only sort by date and name, resulting in seeing the same pictures over and over again when logging in (and scrolling down). It would be awesome to be able to spice it up a little by having them randomly sorted :)

Incorrect thumbnail aspect ratio

Hi, thanks for the great little gallery. I've noticed that some vertical photo thumbnails show up incorrectly in album view, for example:
the original photo dimensions are 3323x4430 (that's from EXIF) but the gallery detects the dimensions as 1x1 (shows this size when viewing full size photo and clicking "i" button) and hence shows the photos thumbnail as being squarish. It is worth to note that the thumbnail itself is of a proper aspect ratio, it's just how the gallery displays it (streches to square) due to incorrect size detection.

Can you pls take a look at the issue? thanks!

[Suggestion] resize images for display

Is it possible to resize an image for viewing in 'full screen'? I have some images which are in the order of 10Mb each.

  • huge images are not good for mobile bandwidth
  • longer load times

My suggestions is that the images a resized to a smaller resolution that is suitable for display on a screen. There are a number of dynamic methods of doing this, but the simplest implementation would be to have a configuration item which you set a static maximum size for the image. It could even be opt in/out. download would still be the original file.

This would require a little more work on part of the server, but should not be too onerous.

future improvements could be:

  • create mediums during index
  • dynamic sizes based on screen resolution

cheers

Hey, this looks promising!

I am trying to host an image viewer on my weak home server and I found this one. (also the v1 php version)

Just want to say this kind of app will be very useful, IMHO. Looking forward to host this when it is ready.

Sorry to create an useless issue, hope you will not be too angry :)

Thumbnails creation in batch

Hi,

Is there anyway to put PIGallery2 to create the thumbnails in batch during low PI use hours?
Something like scheduling the thumbnails creations so that it won't flood the memory/swap/CPU usage when we access a folder with too many photos for the first time?

Cheers,
Marco Angélico

Failure on installation on Raspberry Pi with Jessie

Hi,
I saw this interesting project to turn the Raspberry Pi into photo gallery. Unfortunately I cannot install it either via source or release version according to your guide.
I am using the Raspberry Pi 2 with Rasbian jesse latest release. It includes the nodejs 0.10.29, npm version 1.4.21.
The first option I tried with installation with source, angular/animation was required but the npm cannot locate it. The following exception reported:

npm ERR! 404 Not Found
npm ERR! 404 
npm ERR! 404 'angular/animations' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404 It was specified as a dependency of 'pigallery2'
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.

npm ERR! System Linux 4.9.35-v7+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/pi/gallary
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code E404
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/pi/gallary/npm-debug.log
npm ERR! not ok code 0

Secondly I tried the release installation, lots of issues reported. May I know know to resolve it?

SQL Errors

I am getting a lot of these issues for a certain image. It seems to hang the indexing as a result, by constantly retrying the image.

as you can see there is something weird with the altitude on that photo.

pigallery       |   name: 'QueryFailedError',
pigallery       |   query:
pigallery       |    'INSERT INTO `media_entity`(`id`, `name`, `type`, `directoryId`, `metadataCaption`, `metadataCreationdate`, `metadataFilesize`, `metadataKeywords`, `metadataOrientation`, `metadataBitrate`, `metadataDuration`, `metadataSizeWidth`, `metadataSizeHeight`, `metadataCameraDataIso`, `metadataCameraDataModel`, `metadataCameraDataMake`, `metadataCameraDataFstop`, `metadataCameraDataExposure`, `metadataCameraDataFocallength`, `metadataCameraDataLens`, `metadataPositionDataCountry`, `metadataPositionDataState`, `metadataPositionDataCity`, `metadataPositionDataGPSDataLatitude`, `metadataPositionDataGPSDataLongitude`, `metadataPositionDataGPSDataAltitude`) VALUES (DEFAULT, ?, ?, ?, DEFAULT, ?, ?, DEFAULT, ?, DEFAULT, DEFAULT, ?, ?, ?, ?, ?, ?, ?, ?, DEFAULT, DEFAULT, DEFAULT, DEFAULT, ?, ?, ?)',
pigallery       |   parameters:
pigallery       |    [ 'IMG_20160307_115115.jpg',
pigallery       |      'PhotoEntity',
pigallery       |      20,
pigallery       |      1457351475000,
pigallery       |      2459130,
pigallery       |      1,
pigallery       |      3120,
pigallery       |      4160,
pigallery       |      112,
pigallery       |      'Redmi Note 2',
pigallery       |      'Xiaomi',
pigallery       |      2.2,
pigallery       |      0.000481,
pigallery       |      3.5,
pigallery       |      -32.58647536111111,
pigallery       |      115.74507138888889,
pigallery       |      4294967291 ] }
pigallery       | { QueryFailedError: ER_WARN_DATA_OUT_OF_RANGE: Out of range value for column 'metadataPositionDataGPSDataAltitude' at row 1
pigallery       |     at new QueryFailedError (/pigallery2-release/node_modules/typeorm/error/QueryFailedError.js:11:28)
pigallery       |     at Query.<anonymous> (/pigallery2-release/node_modules/typeorm/driver/mysql/MysqlQueryRunner.js:167:45)
pigallery       |     at Query.<anonymous> (/pigallery2-release/node_modules/mysql/lib/Connection.js:502:10)
pigallery       |     at Query._callback (/pigallery2-release/node_modules/mysql/lib/Connection.js:468:16)
pigallery       |     at Query.Sequence.end (/pigallery2-release/node_modules/mysql/lib/protocol/sequences/Sequence.js:83:24)
pigallery       |     at Query.ErrorPacket (/pigallery2-release/node_modules/mysql/lib/protocol/sequences/Query.js:90:8)
pigallery       |     at Protocol._parsePacket (/pigallery2-release/node_modules/mysql/lib/protocol/Protocol.js:278:23)
pigallery       |     at Parser.write (/pigallery2-release/node_modules/mysql/lib/protocol/Parser.js:76:12)
pigallery       |     at Protocol.write (/pigallery2-release/node_modules/mysql/lib/protocol/Protocol.js:38:16)
pigallery       |     at Socket.<anonymous> (/pigallery2-release/node_modules/mysql/lib/Connection.js:91:28)
pigallery       |   message:
pigallery       |    'ER_WARN_DATA_OUT_OF_RANGE: Out of range value for column \'metadataPositionDataGPSDataAltitude\' at row 1',
pigallery       |   code: 'ER_WARN_DATA_OUT_OF_RANGE',
pigallery       |   errno: 1264,
pigallery       |   sqlMessage:
pigallery       |    'Out of range value for column \'metadataPositionDataGPSDataAltitude\' at row 1',
pigallery       |   sqlState: '22003',
pigallery       |   index: 0,
pigallery       |   sql:
pigallery       |    'INSERT INTO `media_entity`(`id`, `name`, `type`, `directoryId`, `metadataCaption`, `metadataCreationdate`, `metadataFilesize`, `metadataKeywords`, `metadataOrientation`, `metadataBitrate`, `metadataDuration`, `metadataSizeWidth`, `metadataSizeHeight`, `metadataCameraDataIso`, `metadataCameraDataModel`, `metadataCameraDataMake`, `metadataCameraDataFstop`, `metadataCameraDataExposure`, `metadataCameraDataFocallength`, `metadataCameraDataLens`, `metadataPositionDataCountry`, `metadataPositionDataState`, `metadataPositionDataCity`, `metadataPositionDataGPSDataLatitude`, `metadataPositionDataGPSDataLongitude`, `metadataPositionDataGPSDataAltitude`) VALUES (DEFAULT, \'IMG_20160307_115115.jpg\', \'PhotoEntity\', 20, DEFAULT, 1457351475000, 2459130, DEFAULT, 1, DEFAULT, DEFAULT, 3120, 4160, 112, \'Redmi Note 2\', \'Xiaomi\', 2.2, 0.000481, 3.5, DEFAULT, DEFAULT, DEFAULT, DEFAULT, -32.58647536111111, 115.74507138888889, 4294967291)',

[Suggestion] Support for tags?

Had a look at the demo, and love the design, but one thing I'd need before using it is support to tag photos for searching later.

Resource management

Hi,

Whenever I go into a folder that has more than 20 photos (I have some would 200+), my raspberry pi 3+ slows down a lot (stops responding even to ssh sessions). I think I've narrow the problem down to the use of swap during thumbnails creation of PiGallery2.

Would it be possible to limit the number of thumbnails to be created in parallel so that memory usage wouldn't be so high that it would need to swap?

Regards,
Marco Angélico

Duplicate users named admin

Hi all,

Since I wanted to change the default password of admin and found nowhere to approach, I created another user named admin with different password. However, it seems that two users named admin are able to coexist, and either of them cannot be deleted. I haven't tested whether other users with same name will coexist or not. Please help me to figure this out.

screen shot 2019-02-22 at 9 48 31 pm

Thank you!

Language switch not working

I'm running the docker version and the app is great. However, I tried switching the language and I get this error:

{"error":{"code":9,"message":"Unknown server side error"},"result":null}

Have I configured something wrong?

Support IPTC 120 - Caption / Abstract

Search for that tag and if its present show it a nice way or show it via key or button. That way i could add information about a picture there and its present, no matter on which device.
That way there is also no need for a database-field or something like that.

Feature suggestion: Persistent sort order on folders

It would be great if the chosen sort order was remembered for folders. Newly opened folders should start with the default sort order and if changed it should be remembered for that folder.

This would improve my use case as I'd like index folders to show the newest gallery on top, while gallery folders show the oldest picture on top so they can be viewed chronologically. As it is now, I have to change sort order all the time.

Really great photo hosting tool!!

Mysql settings show error

tried to connect to mysql server and returned this error
Error: Error while saving database settings: QueryFailedError: ER_BLOB_KEY_WITHOUT_LENGTH: BLOB/TEXT column 'name' used in key specification without a key length
Mysql server is working without issue.

Duplicate Key error on index

Sorry... i have another one....
looks like it has generated a duplicate key, which seems... rare!

It seemed to continually try to re insert the image, without re-calculating the key. I'm not sure if it continued to index or not, as there is not a lot of stout logging.

pigallery       |   name: 'QueryFailedError',
pigallery       |   query:
pigallery       |    'INSERT INTO `media_entity`(`id`, `name`, `type`, `directoryId`, `metadataCaption`, `metadataCreationdate`, `metadataFilesize`, `metadataKeywords`, `metadataOrientation`, `metadataBitrate`, `metadataDuration`, `metadataSizeWidth`, `metadataSizeHeight`, `metadataCameraDataIso`, `metadataCameraDataModel`, `metadataCameraDataMake`, `metadataCameraDataFstop`, `metadataCameraDataExposure`, `metadataCameraDataFocallength`, `metadataCameraDataLens`, `metadataPositionDataCountry`, `metadataPositionDataState`, `metadataPositionDataCity`, `metadataPositionDataGPSDataLatitude`, `metadataPositionDataGPSDataLongitude`, `metadataPositionDataGPSDataAltitude`) VALUES (DEFAULT, ?, ?, ?, DEFAULT, ?, ?, ?, ?, DEFAULT, DEFAULT, ?, ?, ?, ?, ?, ?, ?, ?, DEFAULT, DEFAULT, DEFAULT, DEFAULT, ?, ?, ?)',
pigallery       |   parameters:
pigallery       |    [ 'IMG_0995.jpg',
pigallery       |      'PhotoEntity',
pigallery       |      103,
pigallery       |      1323184378000,
pigallery       |      2198584,
pigallery       |      '',
pigallery       |      1,
pigallery       |      2592,
pigallery       |      1936,
pigallery       |      80,
pigallery       |      'iPhone 4',
pigallery       |      'Apple',
pigallery       |      2.8,
pigallery       |      0.058823529411764705,
pigallery       |      3.85,
pigallery       |      -32.04533333333333,
pigallery       |      115.81633333333333,
pigallery       |      31.19884726224784 ] }
pigallery       | { QueryFailedError: ER_DUP_ENTRY: Duplicate entry 'IMG_0995.jpg-103' for key 'IDX_332f316a46fcb158ac71210109'
pigallery       |     at new QueryFailedError (/pigallery2-release/node_modules/typeorm/error/QueryFailedError.js:11:28)
pigallery       |     at Query.<anonymous> (/pigallery2-release/node_modules/typeorm/driver/mysql/MysqlQueryRunner.js:167:45)
pigallery       |     at Query.<anonymous> (/pigallery2-release/node_modules/mysql/lib/Connection.js:502:10)
pigallery       |     at Query._callback (/pigallery2-release/node_modules/mysql/lib/Connection.js:468:16)
pigallery       |     at Query.Sequence.end (/pigallery2-release/node_modules/mysql/lib/protocol/sequences/Sequence.js:83:24)
pigallery       |     at Query.ErrorPacket (/pigallery2-release/node_modules/mysql/lib/protocol/sequences/Query.js:90:8)
pigallery       |     at Protocol._parsePacket (/pigallery2-release/node_modules/mysql/lib/protocol/Protocol.js:278:23)
pigallery       |     at Parser.write (/pigallery2-release/node_modules/mysql/lib/protocol/Parser.js:76:12)
pigallery       |     at Protocol.write (/pigallery2-release/node_modules/mysql/lib/protocol/Protocol.js:38:16)
pigallery       |     at Socket.<anonymous> (/pigallery2-release/node_modules/mysql/lib/Connection.js:91:28)
pigallery       |   message:
pigallery       |    'ER_DUP_ENTRY: Duplicate entry \'IMG_0995.jpg-103\' for key \'IDX_332f316a46fcb158ac71210109\'',
pigallery       |   code: 'ER_DUP_ENTRY',
pigallery       |   errno: 1062,
pigallery       |   sqlMessage:
pigallery       |    'Duplicate entry \'IMG_0995.jpg-103\' for key \'IDX_332f316a46fcb158ac71210109\'',
pigallery       |   sqlState: '23000',
pigallery       |   index: 0,
pigallery       |   sql:
pigallery       |    'INSERT INTO `media_entity`(`id`, `name`, `type`, `directoryId`, `metadataCaption`, `metadataCreationdate`, `metadataFilesize`, `metadataKeywords`, `metadataOrientation`, `metadataBitrate`, `metadataDuration`, `metadataSizeWidth`, `metadataSizeHeight`, `metadataCameraDataIso`, `metadataCameraDataModel`, `metadataCameraDataMake`, `metadataCameraDataFstop`, `metadataCameraDataExposure`, `metadataCameraDataFocallength`, `metadataCameraDataLens`, `metadataPositionDataCountry`, `metadataPositionDataState`, `metadataPositionDataCity`, `metadataPositionDataGPSDataLatitude`, `metadataPositionDataGPSDataLongitude`, `metadataPositionDataGPSDataAltitude`) VALUES (DEFAULT, \'IMG_0995.jpg\', \'PhotoEntity\', 103, DEFAULT, 1323184378000, 2198584, \'\', 1, DEFAULT, DEFAULT, 2592, 1936, 80, \'iPhone 4\', \'Apple\', 2.8, 0.058823529411764705, 3.85, DEFAULT, DEFAULT, DEFAULT, DEFAULT, -32.04533333333333, 115.81633333333333, 31.19884726224784)',

Ability to launch thumbnailgeneration from commandline or similar?

Hi Patrik,

I just installed this on a B+ that has become redundant, and it seems to fit my needs quite well.. There's just one feature that i feel would make it kick-ass, and that would be to be able to traverse all images in image folder, and if there's no thumbnail, generate it.

Let me give some backround info, i decided to make a "backup" solution using the B+ and a 2.5" hdd for use with my dslr when traveling. At the moment this works well, it copies all the raw files to a new folder, and renames the files based on the shooting-time. After this i extract the embedded jpeg from the raw files with dcraw (500ms per 24mpixel file, reasonably fast)

Now these are the files that will be used for pigallery2, but since i will be out traveling there won't be any screen, keyboard or internet, so i wanted to use usb tethering from my android phone, problem is the current capacity on usb... once it connects to the rpi it will start to charge, and when doing 'heavy' I/O such as generating thumbnails, the hdd will get into power issues and disconnect and reconnect as a new device (without being mounted in the 'correct' place).

If i was able to have the thumbnails generated before connecting the phone, i could later use my phone to ensure that all files have been transfered correctly (if i need to wipe a memory card)

Are there something similar that could be done with the current code?

Directory Listing Fails

When listing a folder with a certain movie in it, i get the following error, and it returns to the home page:

It seems there is an error with FFMPEG when looking at a certain video file.

pigallery       | 2/4/2019, 11:48:58 AM[WARN] Handled error:
pigallery       | ErrorDTO {
pigallery       |   code: 7,
pigallery       |   message: 'Error during listing the directory',
pigallery       |   details:
pigallery       |    { error:
pigallery       |       'Error: ffprobe exited with code 1\nffprobe version N-45896-g19c3df0cd-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2007-2018 the FFmpeg developers\n  built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516\n  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg\n  libavutil      56. 17.100 / 56. 17.100\n  libavcodec     58. 19.100 / 58. 19.100\n  libavformat    58. 13.100 / 58. 13.100\n  libavdevice    58.  4.100 / 58.  4.100\n  libavfilter     7. 20.100 /  7. 20.100\n  libswscale      5.  2.100 /  5.  2.100\n  libswresample   3.  2.100 /  3.  2.100\n  libpostproc    55.  2.100 / 55.  2.100\n[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5e98380] 
moov atom not found\n/pigallery2-release/demo/images/2017/09 Sep/GOPR0978.MP4: Invalid data found when processing input\n' } }

Gesture support for zoom

On mobile it would be fantastic if there was gesture support to double tap to zoom. Or pinch to zoom.

gallery.RANDOM stopped working.

(node:21718) UnhandledPromiseRejectionWarning: QueryFailedError: ER_SP_DOES_NOT_EXIST: FUNCTION gallery.RANDOM does not exist
    at new QueryFailedError (/home/kadelam/works/kmodules/pigallery2/node_modules/typeorm/error/QueryFailedError.js:27:28)
    at Query.<anonymous> (/home/kadelam/works/kmodules/pigallery2/node_modules/typeorm/driver/mysql/MysqlQueryRunner.js:223:45)
    at Query.<anonymous> (/home/kadelam/works/kmodules/pigallery2/node_modules/mysql/lib/Connection.js:502:10)
    at Query._callback (/home/kadelam/works/kmodules/pigallery2/node_modules/mysql/lib/Connection.js:468:16)
    at Query.Sequence.end (/home/kadelam/works/kmodules/pigallery2/node_modules/mysql/lib/protocol/sequences/Sequence.js:83:24)
    at Query.ErrorPacket (/home/kadelam/works/kmodules/pigallery2/node_modules/mysql/lib/protocol/sequences/Query.js:90:8)
    at Protocol._parsePacket (/home/kadelam/works/kmodules/pigallery2/node_modules/mysql/lib/protocol/Protocol.js:278:23)
    at Parser.write (/home/kadelam/works/kmodules/pigallery2/node_modules/mysql/lib/protocol/Parser.js:76:12)
    at Protocol.write (/home/kadelam/works/kmodules/pigallery2/node_modules/mysql/lib/protocol/Protocol.js:38:16)
    at Socket.<anonymous> (/home/kadelam/works/kmodules/pigallery2/node_modules/mysql/lib/Connection.js:91:28)
(node:21718) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:21718) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Node version is 11.1.0

Folder list view option

The suggestion here is to add a list view option for folders. I would propose a medium sized thumbnail followed by file name, file date and file size. For folders, the number of items in the folder would be a handy piece of information.

The choice of view (list view or matrix view) for individual folders could be stored locally in the browser similar to how the sort order is stored.

Add url base option in config.json

I have a domain from a free ddns service and want to set a reverse proxy on pigalley2.

location /gallery/
{
        proxy_set_header    X-Real-IP    $remote_addr;
        proxy_set_header    X-Forwarded-For    $proxy_add_x_forwarded_for;
        proxy_pass    http://127.0.0.1:10080/;
}

I tried with above nginx config. All .js file's path is rewritten to root.

image

If there be a url base option like other web apps, Reverse proxy config will be much easier.

Show photo statistics in thumbnails

Hi,

I don't know where to put some improvement ideas I had for this so I'm opening them as issues. If you think they might not be the best ideas or the path you want for PiGallery, just ignore and close them ;)

It would be nice to be able to see some photo statistics on the photo thumbnails.
It could be by hovering the mouse over the photo and the statistics would appear within the thumbnail itself or as a hint box.

Some of the statistics I was thinking would be:

  • Filename
  • File Size
  • Photo Dimension
  • File date

Regards,
Marco Angélico

error in your instructions

1.1.1-a Install from release

unzip pigallery2.zip
cd pigallery2

the command unzip pigallery2.zip extract the files without subfolder, so the next command "cd pigallery2" don't work.

Shouldn't it be "unzip pigallery2.zip -d pigallery2"

Use subdirectory media for thumbnails

I have many folders which don't themselves contain any media but contain a folder that does. E.g.

----- Top level
 +--- Folder 1
  +-- Folder 2
   +- Thing.jpg

In cases like this, I'd really like "Folder 1" to show "Thing.jpg" as a thumbnail. I tried to do this with a basic BFS in bobobo1618@8043736 but there seems to be something missing.

[Suggestion ] Create a list of tags to create logical albums

I have all of my photos in YYYY/MM folders, but i also use digikam to tag all of the photos into vitual albums.

Is there a way to list all of these tags so that i can navigate through them? have the folder heirachy, then under that have a heirachy of logical albums / tags?

I would love this, and would make my 50k photos actually navigatable!

thanks :)

Which is the recommended distro for RPi3

Which (minimal) distro should i use?

I tried Raspbian Stretch Lite (November 2018), but i am not able to get it working. Are there any missing packages?

After installation i used "apt-get update" and "apt-get upgrade" and then i followed your manual, but i got many errors (to many to post here).

Wich distro was succesfully tested?

Big Thanks.

Show the number of photo in each page

Hi,

I don't know where to put some improvement ideas I had for this so I'm opening them as issues. If you think they might not be the best ideas or the path you want for PiGallery, just ignore and close them ;)

It would be nice to have at the top, next to the map widget, a way to know how many photos there are in the folder.

Regards,
Marco Angélico

'npm run build' fails

Hi, cool project!

I am trying to install PiGallery2 on my raspberry pi 3 with Raspbian 8 (jessie). Following your install guide gives me the following error after running 'npm run build':

backend/middlewares/thumbnail/THRenderers.ts(1,39): error TS6137: Cannot import type declaration files. Consider importing 'sharp' instead of '@types/sharp'. backend/model/memory/UserManager.ts(10,14): error TS2420: Class 'UserManager' incorrectly implements interface 'IUserManager'. Types of property 'deleteUser' are incompatible. Type '(id: number, cb: (error: any) => void) => void' is not assignable to type '(id: number, cb: (error: any, result: string) => void) => void'. Types of parameters 'cb' and 'cb' are incompatible. backend/model/mysql/UserManager.ts(6,14): error TS2420: Class 'UserManager' incorrectly implements interface 'IUserManager'. Types of property 'deleteUser' are incompatible. Type '(id: number, cb: (error: any) => void) => void' is not assignable to type '(id: number, cb: (error: any, result: string) => void) => void'. Types of parameters 'cb' and 'cb' are incompatible. test/backend/unit/middlewares/uesr/AuthenticationMWs.ts(173,66): error TS2345: Argument of type 'UserManager' is not assignable to parameter of type 'IUserManager'. Types of property 'deleteUser' are incompatible. Type '(id: number, cb: (error: any) => void) => void' is not assignable to type '(id: number, cb: (error: any, result: string) => void) => void'. Types of parameters 'cb' and 'cb' are incompatible. test/backend/unit/middlewares/uesr/AuthenticationMWs.ts(198,66): error TS2345: Argument of type 'UserManager' is not assignable to parameter of type 'IUserManager'.
Do you have any idea what I could be doing wrong?

Here is the npm log:
2017-07-11T12_34_55_364Z-debug.txt

Many thanks,
Rafael

p.s.:
Before that step, I had to install the 'unofficial' phantomjs package for rpi from this location:
https://github.com/fg2it/phantomjs-on-raspberry

typo

settings -> advanced -> database settings -> SQLite settings:

It should be possible to start a single folder reindex

Hi,

This is more of an enhancement.

I've been playing around within the folder, reorganizing and moving fotos between folder.
The issue is that it takes some time for pigallery to notice that some of the fotos are no longer within the folder and reindexing the folder.
It should be possible to start a reindex on a single folder rather than doing a full reindex of all folders.

User access management

Hi!

Do you plan to implement some access management functionality for the shared folders? For example guest user is only allowed to see one folder, but not another, which is only viewable for admin?
Besides this, this is a really great software, runs fast even on a raspberry pi, which makes it a perfect choice for sharing family photos. So a big thumbs up for you! 😃

Tiff Support

It seems like tiff images aren't supported, or I'm missing a library, just using the docker image provided.

1/10/2019 8:05:46 AM1/10/2019, 3:05:46 PM[ERROR] [IndexingManager] Error during indexing job: Error: Input file is missing or of an unsupported image format 1/10/2019 8:05:46 AM[Error: Input file is missing or of an unsupported image format]

sort photos in ascending/descending order

Can you please provide an option to switch sorting mode (ascending/descending) in the gallery. It would really nice to have the latest added photos at the top of the main page.

View and edit shared links

A UI to list the shared links that have been created would be useful.
As would being able to update the parameters for a share, such as change password or expiry, or delete the shared link immediately.

Alongside these controls it might be helpful to allow the user to give "names" to the shared links so that the user has a way to identify them easier in the UI.

exif orientation tag not being respected

When seeing thumbnails and pictures in portrait that haven't been rotated (but have the exif orientation tag to rotate).
As you can see in the attached printscreen, two of the pictures should be rotated because they've been taken in portrait mode.
rotate_issue

From the first picture I have the following on the exif data:
exiftran -d 2016-07-28\ 09.34.32.jpg
2016-07-28 09.34.32.jpg
ifd 0
0x0112 Orientation Right-top
0x011a X-Resolution 72
0x011b Y-Resolution 72
0x0128 Resolution Unit Inch
0x0213 YCbCr Positioning Centered

When I use exiftran to process the picture with the "-a" option to apply automatic rotation according to the orientation tag, the pictures start appearing in the correct orientation (if I change their name because I'm assuming that since the thumbnail has been created before the change, pigallery2 woun't recreate the thumbnail and the thumbnail still appears in landscape).

Keep the top information while scrolling

This is more of an enhancement rather than an issue.
When browsing a folder, if I want to go back, I have to go to the top of the page in order to be able to navigate in the folder structure.
It would be nice to have it always available on the top of the page (top menu, navigation on the left and map on the right). Only the fotos would be scrolled.

(BTW, excellent new feature with the latest release. Thanks for it!!)

Sorting should also be applied to folders

Hi,

When I change the sorting method on the top right corner of the page (below the "logout" button) I was expecting for the entire page (folders and photos) to get the sorting method I select (ascending or descending name or ascending or descending date).
However, it is only being applied to the photos.

If you need any more information or some printscreens, just let me know.

Regards,
Marco Angélico

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.