Announcement

  •  » Extensions
  •  » Memories Plugin, API method memories.photos.list doesn't work

#1 2022-10-06 14:18:23

DerKoerper
Member
2022-10-06
3

Memories Plugin, API method memories.photos.list doesn't work

Hello everyone,

I'm using Piwigo in my private network as central galery for the whole familiy. To improve acceptance by my wife I want to send every other day a memory from a couple years ago.

Sending the photo via my home automation is no issue, but I have trouble to get the picture-link(s) from Piwigo.

The easiest way to process would be the json output of the memories plugin API-method memories.photos.list. But I only get an PHP-Error and a empty answer, even on the memories-page the photos of the last years are displayed correctly. Maybe a bug?

Does anyone maybe see another solution to fetch the links of photos from x years ago? I just need the id or the link of the photos to download them to my home automation server which then sends it with a telegram bot.

btw. my gallery is organized by day - so every day has its own album, maybe i can ask for a specific album like "give me all pictures of album YYYY-MM-DD" ?

My HTTP-Request:

Code:

https://nas.spielkinder.lokal/piwigo/ws.php?format=json&method=memories.photos.list&years=5

The answer of piwigo (getting the same answer no matter what year I'm requesting): 

Code:

<br />
<b>Notice</b>:  Undefined index: memodate in <b>/var/www/html/piwigo/plugins/memories/include/function.pfoya.inc.php</b> on line <b>111</b><br />
{"stat":"ok","result":null}

I also tried XML-output, without SSL, logged in/logged out

My environment:

    Piwigo 12.3.0 Prüfen, ob eine neue Version verfügbar ist.
    Betriebssystem: Linux
    PHP: 7.4.30 (Info anzeigen) [2022-10-06 14:05:39]
    MySQL: 5.5.5-10.5.15-MariaDB-0+deb11u1 [2022-10-06 14:05:39]
    Grafikbibliothek: GD 2.3.0
    Größe des Cache nicht vorhanden   nie berechnet Aktualisieren

Plugins
    Admin Tools
    Batch Downloader
    Memories (Version: 12.0.a)
    OpenStreetMap
    Take A Tour of Your Piwigo
    TravelMap

Piwigo URL: not public

Kind regards
Richard

Last edited by DerKoerper (2022-10-06 14:40:31)

Offline

 

#2 2022-10-06 18:04:08

ddtddt
Piwigo Team
Quetigny - France
2007-07-27
7202

Re: Memories Plugin, API method memories.photos.list doesn't work

Hi :-)

Are you sure API method memories.photos.list exist ?


You love Piwigo so don't hesitate to participate, learn more on the "Contribute to Piwigo" page. If you don't have much time for contribution, you can also help the project with a donation.

Offline

 

#3 2022-10-07 13:21:15

DerKoerper
Member
2022-10-06
3

Re: Memories Plugin, API method memories.photos.list doesn't work

Well it is listed on the web-API explorer:

Code:

https://nas.spielkinder.lokal/piwigo/tools/ws.htm

https://i.ibb.co/w7m3Kwf/piwi-mem-screen.png

... so I guess that it exists? I mean, there is an answer of the method, but it's always empty - thats why I thought of a bug.

Offline

 

#4 2022-10-07 14:21:18

erAck
Only trying to help
2015-09-06
1998

Re: Memories Plugin, API method memories.photos.list doesn't work

The undefined memodate index notice message in your output looks odd. That's exactly what the memories plugin expects in plugins/memories/include/function.pfoya.inc.php line 111 in function ws_memories_photos_list() but doesn't get passed. No idea how that is supposed to work. It seems to me that API method is meant to be used internally through plugins/memories/blockhome/stuffs_homepfoya.tpl so maybe you can figure out what exactly is to be passed there.

But as your albums are named YYYY-MM-DD you could also query the categories with pwg.categories.getList and parse the result for the desired date to obtain its category ID and then use pwg.categories.getImages to get the list of images of that category.


Running Piwigo at https://erack.net/gallery/

Offline

 

#5 2022-10-07 15:00:04

DerKoerper
Member
2022-10-06
3

Re: Memories Plugin, API method memories.photos.list doesn't work

Yep, I also already tried to figure out what this line in function.pfoya.inc.php is meant to do, but without any results.

Okay, I looked for a "get Album" function, as I'm not using categories... But I just realized my albums are what is named categories there... my bad.
Thanks for your suggestion, I will check for a suitable request. I tried pwg.images.search as I didn't see any other possibility but this method is pretty inefficient.

Nonetheless: The API-method is not designed to work as i expect? It's a bit odd to me as there is a plausible description on the ws.htm. I would expect it either to work as API method or to not be displayed at all. See it as suggestion from a very happy Piwigo user ;-) .

Thanks for the help to this point!

Offline

 
  •  » Extensions
  •  » Memories Plugin, API method memories.photos.list doesn't work

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact