Read the statement by Michael Teeuw here.
MMM-GooglePhotos
-
Hey, first thank you for this great module!
Currently i have about 50 pictures in my google album and set the sorting to random. I think it all works as intendet but it would be nice if the pictures are only shown once until every picture in the album was displayed.
Do you think this is possible? Like assigning a specific number to each photo, putting it in an array when it was displayed and before the next one is shown it checks the array if the next photo was already displayed.
Greetings from Germany
Robert -
@rogogu I would do it a different way, saves work…
the list is already ramdomized, so the code just walks thru the list.
I would add another parm, refreshAtEnd = true/false(default)
if the parm is true, then do NOT start the timer in node_helper
at refresh on end of list in true, then this.scanPhotos()
-
@sdetweil okay this seems to do the job. but couldn´t this cause problems with the api limit or base url expiring when there are to many/less photos in the album? let´s say there are 100 photos and the refreshInterval is set to 1min. so it takes 100min before it scans the photos again…
-
@rogogu maybe… could be why it refreshes even tho not done
my code gets next image, and if not connected redoes the authentication…
I get the list and then walk the listbut it looks like code tries to handle that
scanPhotos: function() { this.tempItems = [] var auth = new Auth(this.authConfig) auth.on('ready', (client) => { this.accessToken = client.credentials.access_token this.getPhotos() }) },
-
Mi è comparsa una scritta sul Mirror che è disponibile un aggiornamento del modulo MMM-GooglePhoto come si fa l’aggiornamento?Grazie.
-
@Alex2020 vai alla cartella del modulo nella finestra del terminale ed emetti, git pull. se il modulo ha un file package.json, eseguire anche ‘npm install’
-
Salve mi compare un messaggio sul Mirror che ce una versione più recente come si aggiorna il modulo MMM-GooglePhotos ,come si fa l’aggiornamento?Grazie.
-
my auth_and_test is not working. it worked like a year ago, but I haven’t used it since. I’m really new and don’t really know what I’m doing. this is what i get:
pi@raspberrypi:~/MagicMirror/modules/MMM-GooglePhotos $ node auth_and_test.js
(node:698) UnhandledPromiseRejectionWarning: Error: invalid_grant
at createError (/home/pi/MagicMirror/modules/MMM-GooglePhotos/node_modules/axios/lib/core/createError.js:16:15)
at settle (/home/pi/MagicMirror/modules/MMM-GooglePhotos/node_modules/axios/lib/core/settle.js:18:12)
at IncomingMessage.handleStreamEnd (/home/pi/MagicMirror/modules/MMM-GooglePhotos/node_modules/axios/lib/adapters/http.js:201:11)
at IncomingMessage.emit (events.js:198:15)
at endReadableNT (_stream_readable.js:1139:12)
at processTicksAndRejections (internal/process/task_queues.js:81:17)
(node:698) 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: 2)
(node:698) [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.Any suggestions?
-
@Samwise usually means the authentication code has expired.
-
@Samwise
remove your currenttoken.json
and try again.