Kodi Community Forum

Full Version: Plugin Slideshow Screensaver
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6
Image

Slideshow screensaver that uses images taken from image plugins. Slideshow display code based off the XBMC Slideshow Screensaver.

For Frodo and up.

It allows you to choose a path from an image plugin's hierarchy to use in a slideshow screensaver. You also have the option to start a slideshow when XBMC starts.

So for instance, when setting the path in the screensaver's settings, you can browse the flickr plugin, browse into the photostream and select ok. The screensaver will show images from your photostream. You could do the same with a set, etc.

It's been tested with flickr, picasa and 500px.
It won't work with paths that require input (ie Search flickr)

Will also display your Facebook images via my ShareSocial addon when my Facebook-Media addon is installed.

Allows you to choose a path from an image plugin's hierarchy to use in a slideshow screensaver. You also have the option to start a slideshow when XBMC starts.

On my REPO.
If you need help, ask a question in this thread or join #ruuk on freenode.


Caption formatting:

Captions are in the format $TOKENNAME[args,prefix,postfix]

Valid token names are TITLE, DATETIME and EXIF.

Example:
Code:
$TITLE[UES,Frog[ , \]]

Where the title is img_1234.jpg

Renders as:
Code:
Frog[ img 1234 ]

Note the \ before the second ]. You need to escape both ] and , in this way.

Title formatting:
U=uppercase
L=lowercase
T=title (capitalize words)
S=convert underscores to spaces
E=remove the file extension

The EXIF arg is an exif tag name.

Date/Time formatting:
%a Locale’s abbreviated weekday name.
%A Locale’s full weekday name.
%b Locale’s abbreviated month name.
%B Locale’s full month name.
%c Locale’s appropriate date and time representation.
%d Day of the month as a decimal number [01,31].
%H Hour (24-hour clock) as a decimal number [00,23].
%I Hour (12-hour clock) as a decimal number [01,12].
%j Day of the year as a decimal number [001,366].
%m Month as a decimal number [01,12].
%M Minute as a decimal number [00,59].
%p Locale’s equivalent of either AM or PM. (1)
%S Second as a decimal number [00,61]. (2)
%U Week number of the year (Sunday as the first day of the week) as a decimal number [00,53]. All days in a new year preceding the first Sunday are considered to be in week 0. (3)
%w Weekday as a decimal number [0(Sunday),6].
%W Week number of the year (Monday as the first day of the week) as a decimal number [00,53]. All days in a new year preceding the first Monday are considered to be in week 0. (3)
%x Locale’s appropriate date representation.
%X Locale’s appropriate time representation.
%y Year without century as a decimal number [00,99].
%Y Year with century as a decimal number.
%Z Time zone name (no characters if no time zone exists).
%% A literal '%' character.
Here's a quick tip I figured out. You can display search type plugin paths by selecting a 'Next Page' item.
For example, with the flickr plugin, you can browse to 'Search Flickr' and enter a term. You will have the option to choose the next page. Choose that and click OK and you will have a screensaver for that term. If you want to start with page one, just click the previous page option and then click OK.
Doing this ensures that the search term is in the plugin's path URL.
Version 0.0.5

Changes:
- Added option in settings 'Show Titles (If Available)'
- Error indicator and message now moves randomly about screen (this is a screensaver, not a screen burner =] )
- Added option in settings under 'Slideshow On XBMC Startup': 'Normal XBMC Slideshow (Plugins Only)'. When checked and path is a plugin, will start with an xbmc slideshow (old behavior). If unchecked (default) will start with the normal screensaver behavior.


On my REPO.

haven't tried this but it looks good.

do you know how i could get a slideshow into my favourites?

also im going to point it towards c:\my documents\dropbox\screensaver folder

that way anyone can add photos to my dropbox folder and they would appear in my xbmc screensaver. only issue is if someone adds a photo AFTER the screensaver has started. do you know of anyway that i could setup the screensaver to restart every 5 minutes so that it uses new files in the folder? or is something you think it may be possible to add into the addon settings as an option?

ive also asked ronnie on his screensaver thread but thought id ask both of you to see if you have any ideas?
Well, it looks like ronie's screensaver is the one you need as you are accessing files, rather than plugins. Hopefully he can add an option to auto refresh the image list for you.
right ok, thanks for taking the time to reply Smile
Is there any way you could cache the images? Using 500px and 100 images it takes a long time to load (about 2 1/2 minutes), and it would be nice if it could update the pictures regularly in the background and then have them downloaded, rather than having to access them all every time. Also, could you increase the maximum time to display each image? I'd like to have them on for 20-30 seconds.
MyPicsDB 12.2.0 now supports slideshow screensaver.

Best way to use it is to create a collection from a saved filter wizard setting and to select this collection within slideshow screensaver plugin settings.

MyPicsDB can be found in my repo from my signature. Thread URL http://forum.xbmc.org/showthread.php?tid=133905
Cool Smile
Hi Ruuk,

your plugin has problems with non latin characters in the url of the used picture.

As a quick fix I added encode('utf-8') to following two lines in pluginscreensaver.py.
Line 128: cur_img.setImage(items[-1]['url'].encode('utf-8'))
Line 131: img = item['url'].encode('utf-8')

I don't know if this is a clever change but it seems to work.

Xycl
Version 0.0.7

Changes:
- Fix for non-latin characters in URLs

On my REPO.

Xycl: Thanks for tracking down the issue. Please try this version out. I put the encode() in the code that collects the data from the plugins so that I don't have to worry about it in the screensaver code from now on.
Hi Ruuk,

1) it doesn't work.

Code:
09:49:40 T:6800   DEBUG: [plugin.image.mypicsdb] line   178 in default.py function add_picture >> D:\Album\Frühstück
09:49:40 T:6800   DEBUG: [plugin.image.mypicsdb] line   179 in default.py function add_picture >> DSC00434.JPG
09:49:40 T:6800   DEBUG: [plugin.image.mypicsdb] line   229 in default.py object Main.add_picture >> Picture has EXIF Date/Time 2013-09-26 09:37:15
09:49:40 T:6800   DEBUG: [plugin.image.mypicsdb] line   239 in default.py object Main.add_picture >> Picture has resolution 3872 x 2592
09:49:40 T:6800  NOTICE: screensaver.plugin.slideshow: Showing 49 items
09:49:40 T:6800   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.UnicodeEncodeError'>
                                            Error Contents: 'ascii' codec can't encode character u'\xfc' in position 59: ordinal not in range(128)
                                            Traceback (most recent call last):
                                              File "D:\Apps\XBMC Frodo Portable\portable_data\addons\screensaver.plugin.slideshow\pluginscreensaver.py", line 42, in onInit
                                                self.show(items)
                                              File "D:\Apps\XBMC Frodo Portable\portable_data\addons\screensaver.plugin.slideshow\pluginscreensaver.py", line 128, in show
                                                cur_img.setImage(items[-1]['url'])
                                            UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 59: ordinal not in range(128)
                                            -->End of Python script error report<--

items[-1]['url'] contains Früstück as part of the path and character u'\xfc' is the ü.


2) XBMC installs version 0.7 and still claims that there is an update?

Xycl
File
https://code.google.com/p/ruuks-repo/sou...-0.0.7.zip
contains version 0.0.6 with file dates from march 2013
(2013-11-19, 12:56)Xycl Wrote: [ -> ]File
https://code.google.com/p/ruuks-repo/sou...-0.0.7.zip
contains version 0.0.6 with file dates from march 2013

Sorry, I probably forgot to do a commit before I made the zip. I'll fix it when I get home from work.
(2013-11-19, 12:56)Xycl Wrote: [ -> ]File
https://code.google.com/p/ruuks-repo/sou...-0.0.7.zip
contains version 0.0.6 with file dates from march 2013
You should be able to update to the actual 0.0.7 now Smile
Pages: 1 2 3 4 5 6