Showing the latest picture in picture library
#1
Hello together,
i've got a really specific usecase and i'm a complete newbie in Kodi.... So sorry for any questions, which seem to be pretty strange Blush


The usecase is the followin:
I've got a library with pictures in it. With the RPC-API i now want to show the latest picture in the library. And just this one picture and not a slideshow of all pictures. The thing is: I don't know the name of the picture. Otherwise it would be pretty simple...
Is there any way to reach that specific use case with the RPC-API?

Thanks a lot!

Martin
Reply
#2
Depending on what you mean by latest, latest dated file, latest added, latest viewed, latest tagged ...,
If the latter using the built in tag and it is a former dated file, I would believe you can use XBMC.GetInfoLabels method. There are ListItem.PictureDate and ListItem.PictureDateTime labels that you can get the latest tagged data.
That is if your picture supported Exif tags.

That said, I don't exactly know how how these infolables work so you might still need to need to put all of the pictures to be evaluated for the latest in one place or in a single picture playlist or slideshow.
Then you can select that pic for display.
Just because all the pictures are part of the list that doesn't mean they all need to be displayed.
Reply
#3
"Latest file" means the most actual foto. But you got it rigt.


And thanks for the reply. Doesn't sound to easy to solve this use case....
Reply
#4
start picture slideshow:
Code:
{"jsonrpc":"2.0","id":1,"method":"Player.Open","params":{"item":{"path":"/media/usb","recursive":false}, "options":{"repeat":"all", "shuffled":false}}

I'm not sure on what params are supported but I guess nothing (since it is requesting exif data instead of querying the database). So sort using builtin XBMC.GetInfoLabels method ListItem.PictureDate and ListItem.PictureDateTime labels. At least you should know which date, file added or photo taken, as axa88 points out.

Other way is using polling / systemevents (like library watchdog) to reload slideshows and restart slideshow as new pictures are added.

Note: You don't have a library with pics. You have pics, hopefully with exif, in a folder mapped to a source.
Reply

Logout Mark Read Team Forum Stats Members Help
Showing the latest picture in picture library0