Kodi Community Forum
Add-on to "Star" a picture and copy it to a "Favorites" folder for later printing - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Picture Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=150)
+---- Thread: Add-on to "Star" a picture and copy it to a "Favorites" folder for later printing (/showthread.php?tid=150171)



Add-on to "Star" a picture and copy it to a "Favorites" folder for later printing - jorge.leitao - 2012-12-31

Hi,

I want to make an add-on that copies the current picture file (during a slideshow) to a specified folder. The destination folder would be for example a pen drive that allowed me to take my favorite pictures to print them.

I intend to call the script from a dedicated key in my keymap.xml.

The problem here is that I can't find the python function to retrieve the current picture (path+filename) during a slideshow.

Anyone knows how to do that? Or does anybody know a script that can do this?

After that I can do the rest of the script.

Thank you in advance!





RE: Add-on to "Star" a picture and copy it to a "Favorites" folder for later printing - Robotica - 2012-12-31

many people would love to have a rating function in xbmc. For this, you need to use a library which support exif writing. Best way to go forward is to replace current exif library in xbmc instead of adding new ones for addon specific usage. Either way, it would bd great if you pull this of.


RE: Add-on to "Star" a picture and copy it to a "Favorites" folder for later printing - jorge.leitao - 2012-12-31

I can do this and I will share it with the Comunity. All I need is to know is the Python function that returns the current path/filename during a slideshow..

Anyone?


RE: Add-on to "Star" a picture and copy it to a "Favorites" folder for later printing - Xycl - 2013-01-30

I'm not sure but
picturename = xbmc.getInfoLabel("ListItem.PicturePath")

should do it.


RE: Add-on to "Star" a picture and copy it to a "Favorites" folder for later printing - jorge.leitao - 2013-01-30

(2013-01-30, 10:12)Xycl Wrote: I'm not sure but
picturename = xbmc.getInfoLabel("ListItem.PicturePath")

should do it.

Thank you, but it didn't work.. I've tried:

Code:
import os, xbmc
filename = xbmc.getInfoLabel('System.CurrentWindow')
xbmc.executebuiltin("Notification(Filename:,%s)" % filename)

and your suggestion:

Code:
import os, xbmc
filename = xbmc.getInfoLabel("ListItem.PicturePath")
xbmc.executebuiltin("Notification(Filename:,%s)" % filename)

they both give me an "Filename: <empty>" notification...




RE: Add-on to "Star" a picture and copy it to a "Favorites" folder for later printing - Xycl - 2013-01-30

You started your plugin during the slideshow with a bind key in keymap.xml?


RE: Add-on to "Star" a picture and copy it to a "Favorites" folder for later printing - jorge.leitao - 2013-01-30

(2013-01-30, 11:12)Xycl Wrote: You started your plugin during the slideshow with a bind key in keymap.xml?

Exactly. My keymap.xml:

Code:
(...)
  <SlideShow>
    <keyboard>      
      <e>RunScript(plugin.program.starpicture)</e>
(...)

Started the slideshow ad then pressed the "e" key. I got a notification saying "Filename: <newline> <empty>"