Kodi Community Forum
Release Picture Slideshow Screensaver - 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: Look and feel (https://forum.kodi.tv/forumdisplay.php?fid=178)
---- Thread: Release Picture Slideshow Screensaver (/showthread.php?tid=154032)



RE: [Release] Picture Slideshow Screensaver - ronie - 2016-05-31

(2016-05-31, 02:31)bam80 Wrote: Can we put whole 'walk' process in the background, to eliminate delay even on the first run?

i'm not sure i get what you mean...
the very first time the screensaver runs, it needs to collect a list of your images, before it can display anything.

on all other occasions, the 'walk' function runs in a background thread.


RE: [Release] Picture Slideshow Screensaver - bam80 - 2016-05-31

I mean - can we start to show pictures while first time 'walk'ing are still in progress, using only that portion of data which the 'walking' extracted already?


RE: [Release] Picture Slideshow Screensaver - kxb3292 - 2016-06-01

Hi Ronie,

Thank you so much for your help and prompt responses! I have been able to make it work. I updated the time to like 10s instead of 3600s, (it seems that making it around 1 or 2 seconds, might cause displaying only portion of images, as they are not still completely loaded). This is a very promising solution to my problem and I am very excited!.

Here is something though.It seems the default slideshow option from pictures is different from the screensaver add-on.
If i go into pictures and click on a picture and say start slideshow from here, then when i update my pictures folder, it won't update.

However, if i let the default screensaver function take over using screensaver.slideshow.pictures add on (after 1 minute etc), then if i update my picture folder it will update the slides and works great.

Here is a recap of what I have for anyone who needs it.
- installed raspbian on raspberry pi 3
- installed kodi v16 as an application on top of raspbian
- installed screensaver.slideshow.pictures add-on
- in the appearance settings chose the default screensaver to use the add-on above
- change idle time for screensaver from 3 min to 1 min
- with this setup you will be able to update picture instantly and it will be reflected by the screensaver.


Here is what i am still trying to perfect/achieve ::: MY WISH LIST
- have the raspberry pi automatically load kodi on startup and start the slideshow immediately (I do need the raspbian as OS underneath)
- if something fails or crashes and if the system restarts, automatically load kodi and do the slideshow again
- never leave the slideshow once started for any reason so that people don't see the underlying os or kodi ever . (this is my priority)

@ronie
I have several questions for ronie.
1) is it possible to lower the time it takes for screensaver to kick in? from 1 min to like something very small like 1 or 2 seconds? or can we have kodi automatically start the slideshow as soon as it starts? instead of having to wait for the screensaver to kick in?
2) Is it possible to have a mix of pictures and videos and have kodi play the slideshow with both of these? is there a separate add on for it?
3) is it possible to have more control on the transition/effects on the slides? (the fade and zoom feature seems to be the only one thats available with this add-on)
4) How can i achieve the above? my WISH LIST

Thank you so much for your help and responses again ronie
kxb3292


RE: [Release] Picture Slideshow Screensaver - ronie - 2016-06-01

i think the best way to start is to turn this screensaver addon into a script addon.
screensavers are pretty limited as to what you can do with them, whereas with scripts the possibilities are endless Smile
to do so, follow these steps:
- rename the screensaver addon folder to script.picture.slideshow
- in the addon.xml file, change the id to script.picture.slideshow
- in the addon.xml file, change the name to Picture Slideshow Script
- in the addon.xml file, change:
Code:
<extension point="xbmc.ui.screensaver" library="default.py"/>
to:
Code:
<extension point="xbmc.python.script" library="default.py">
    <provides>executable</provides>
</extension>

when you start kodi, the addon should now be listed when you click the addons menu item on the homescreen
and you should be able to manually start the script there.
once you've verified this works, you can now can go to the addons settings to reconfigure it to your liking.

now to answer your questions....

1) you need to modify the Startup.xml file of the skin you're using.
it should contain this, and only this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<window>
    <onload>RunScript(script.picture.slideshow)</onload>
</window>
that will autostart your script when kodi starts

2) it's not possible with a screensaver addon, but should be possible once you've converted it to a script (as mentioned above)
up to you to come up with the needed python code for this functionality though ;-)

3) you should be able to add additional effects here:
https://github.com/XBMC-Addons/screensaver.picture.slideshow/blob/master/resources/lib/gui.py#L33-L42


as for the first two items on your wish list, better ask google ;-)
there are many tutorials on the interweb on how to accomplish that.
perhaps it's as easy as: http://forum.kodi.tv/showthread.php?tid=230035&pid=2033481#pid2033481
perhaps not... i don't know :-)

last wish list item, if you want to prevent the slideshow script from ever exiting,
you need to add this piece of code to the Screensaver class in gui.py:
Code:
# catch all input and igonre it
    def onAction( self, action ):
        pass


edit: fixed Startup.xml code


RE: [Release] Picture Slideshow Screensaver - ronie - 2016-06-01

(2016-05-31, 14:41)bam80 Wrote: I mean - can we start to show pictures while first time 'walk'ing are still in progress, using only that portion of data which the 'walking' extracted already?

i'm not sure how easy that would be to implement.
if anyone want to have a go at it, feel free to share the code and i may add it to the addon.


RE: [Release] Picture Slideshow Screensaver - bam80 - 2016-06-01

OK, thanks for clarifying it. I'm not sure either)


RE: [Release] Picture Slideshow Screensaver - kxb3292 - 2016-06-01

hi ronie,
I was able to rename the folder and make the changes you suggested and turn it into a script. However, i am using the default skin called "confluence" i could not find the Startup.xml file under .kodi folder to make the changes. Also once the script was there, i was unable to choose it from from setting>appearance>screensaver
as the default option. It gives me the option of dim or none or install the picture slideshow screensaver add on all over again.

also I tried to put the code for catching all input into the gui.py under the add-on itself but that did not do it , moving a keyboard or mouse stopped the slideshow.

thank you again
kxb3292


RE: [Release] Picture Slideshow Screensaver - ronie - 2016-06-01

(2016-06-01, 15:34)kxb3292 Wrote: However, i am using the default skin called "confluence" i could not find the Startup.xml file under .kodi folder to make the changes.

i'm not 100% sure where confluence is installed on rasbian, but check /usr/share/kodi/addons

my previous instructions where incorrect btw, the startup.xml should contain this code:
Code:
<?xml version="1.0" encoding="utf-8"?>
<window>
    <onload>RunScript(script.picture.slideshow)</onload>
</window>

(2016-06-01, 15:34)kxb3292 Wrote: Also once the script was there, i was unable to choose it from from setting>appearance>screensaver

it's not a screensaver anymore :-)

if you go to 'programs' in confluence, you can right-click on the addon and select 'settings' from the context menu.

(2016-06-01, 15:34)kxb3292 Wrote: also I tried to put the code for catching all input into the gui.py under the add-on itself but that did not do it , moving a keyboard or mouse stopped the slideshow.

just put the code at the end of the Screensaver class, just before the img_update class.
make sure the indenting is correct, which is important with python scripts.


RE: [Release] Picture Slideshow Screensaver - kxb3292 - 2016-06-01

found the skin directory in that location, made the changes, and it was a success!. Now I am going to work on a detailed documentation of how this set up works and may be I will post it here for any who needs it. I have seen so many people struggle all over the forums to achieve this. I would love to help them.

After doing all this, I am so interested in contributing to kodi especially this add-on. It would be nice to have features in its default gui, that would say "deactivate all keyboard and mouse input on play", and "automatically activate on startup",also being able to play both videos and pictures would be a nice to have feature. May be I should try to contribute to this add-on and help to add these features.

ronie, you have been a tremendous help. This endeavor was a success. I really do appreciate your help and your time.

Thank you so much again!
kxb3292


RE: [Release] Picture Slideshow Screensaver - boostberry3g - 2016-06-07

I have been following this thread for the past week as I am also experimenting with this screen saver. The setup I have is a photobooth which I setup at my kids birthday party. That machine runs windows 10, and I have the folder shared where the pictures get saved to. Then on the kodi computer I make the windows 10 shared folder a new source, and lastly I add that folder location to where the screen saver points to. This was working very well until last week, and I think what caused it to give me the spinning circles was I clicked update on the repository screen. I did try the old version that you posted last week, but I still get the spinning circles. I am going to experiment tonight/tomorrow night, and see if I can't get it working again. I will post some screenshots, and logs during testing.


RE: [Release] Picture Slideshow Screensaver - boostberry3g - 2016-06-07

(2016-06-07, 00:47)boostberry3g Wrote: I have been following this thread for the past week as I am also experimenting with this screen saver. The setup I have is a photobooth which I setup at my kids birthday party. That machine runs windows 10, and I have the folder shared where the pictures get saved to. Then on the kodi computer I make the windows 10 shared folder a new source, and lastly I add that folder location to where the screen saver points to. This was working very well until last week, and I think what caused it to give me the spinning circles was I clicked update on the repository screen. I did try the old version that you posted last week, but I still get the spinning circles. I am going to experiment tonight/tomorrow night, and see if I can't get it working again. I will post some screenshots, and logs during testing.

So I am not sure what I did, but all of the sudden it is working again. This add-on is just what I need to run in conjunction with my photobooth.
@ronie, is there a way to change the time down to looking for new images every 1-5 minutes without altering the code?


RE: [Release] Picture Slideshow Screensaver - ronie - 2016-06-07

nope. it's hardcoded to 1 hour in the addon.


RE: [Release] Picture Slideshow Screensaver - kxb3292 - 2016-06-09

hi Ronie,

I have another question for you regarding the add-on script. I have noticed that under settings when we choose the option to scale to full screen it kind of zooms it in a bad way like some of the content of the picture is not visible as it goes out of the boundary. On the other hand, if we disable the scale to full screen feature, it only displays the images in a portion of the screen. The top and the bottom of the screen will have (bout half an inch) empty black rows.
Is there a way we can configure it to display images full screen without looking awkward? Like can we make it automatically figure out the size of the monitor and display images full screen properly?

by the way, I have a 16:10, 1920 by 1080 monitor if that helps any.

Sincerely,
kxb3292


RE: [Release] Picture Slideshow Screensaver - Raytestrak - 2016-06-09

(2016-06-09, 14:59)kxb3292 Wrote: hi Ronie,

by the way, I have a 16:10, 1920 by 1080 monitor if that helps any.

Sincerely,
kxb3292

Not that it matters, but you either have a 16:9 1920x1080 or 16:10 1920x1200 monitor.


RE: [Release] Picture Slideshow Screensaver - kxb3292 - 2016-06-09

@Raytestrak
Edited: You are Right. The resolutionis indeed 1920*1200 and 16:10. The monitor is dell u2415.

I am hoping that there is a solution for this. Hopefully ronie will save my world again.


This forum uses Lukasz Tkacz MyBB addons.