XBMC Slideshow Python Script - Printable Version
+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Python Add-on Development (/forumdisplay.php?fid=26)
+--- Thread: XBMC Slideshow Python Script (/showthread.php?tid=74531)
Pages: 1 2
XBMC Slideshow Python Script - markturnip - 2010-05-25 14:19
Apologies if I've posted this in the wrong forum.
I've written a very small python script that launches a slideshow of an entire tree of folders in random, this script launches every time I turn my XBOX on. The idea being that we can just display all our photo's in random on a display & add new folders onto the drive.
It works fine most of the time; however occasionally it either gets stuck displaying the same image over and over, or it just displays a black screen & the only way of fixing is to restart the entire xbox.
Is this a common fault? or is it something to do with the XBMC finding an image it can't display (ie. RAW) and then gets itself in a loop?
Any ideas/suggestions will be really appreciated!
- sarosh - 2010-11-10 23:36
Do you still have that python script may I take a look at it. I want to do a similar thing but don't know where to start.
- xbmc-user - 2012-01-07 13:25
Same here! I too want to start a slideshow using a script.
Basically my purpose is to start slide show for a selected folder with a single click and not do Right Click->View slideshow from XBMC. I think this can be done by invoking a script on pressing a key, which in turn should fetch the details of current folder path and they start a slideshow by calling an inbuilt function.
Can anyone help please? Your sample script may be helpful I guess.
- spiff - 2012-01-08 11:01
map your key to SendClick(6). only works in the pictures window. note that you have to enter the dir and then send SendClick, it does not operate on the currently selected item.
- xbmc-user - 2012-01-26 03:43
spiff Wrote:map your key to SendClick(6). only works in the pictures window. note that you have to enter the dir and then send SendClick, it does not operate on the currently selected item.
Will give it a try. What is the window id 6 for? It's not listed at http://wiki.xbmc.org/index.php?title=Window_IDs
Also, if it doesn't operate on currently selected item then what does it operate on to?
- spiff - 2012-01-26 13:31
what makes you think SendClick() eats a window ID?
it's the control ID of the 'start slideshow' button you have in the lhs menu.
it operates on the currently *listed* directory.
- xbmc-user - 2012-01-28 07:22
Very nice! I love it!
BTW, I took a guess and thought control ID 7 should be for R. SlideShow! I used SendClick(7) so that slideshow includes sub folders as well. Still I have to be *inside* a dir, otherwise it will start SS for the entire top directory.
In keymap XML we have MyMusicFiles and MyVideoFiles section but nothing for Picture Files to map keys specific to Picture Files browsing! There should have been one.
So, I've mapped my Play key in global section to do SendClick(6) to start Slide Show and overrode it in MyMusicFiles and MyVideoFiles! Not a clean thing, but works!
I'm still looking for an automated way of starting music (may be random) when I start a Slide Show!
- Livin - 2012-01-29 23:39
Seems like it would be logical to have this feature show on a Context menu for a given folder... so the user could highlight the folder, choose 'Context', and the option to play slideshow would be on that menu.
... thus avoiding mapping/remapping
Is there already this feature or should we put in a feature request?
- xbmc-user - 2012-02-10 19:11
By "this feature" if you mean starting a Slide Show on a given folder, then yes it's already there on Context Menu. Mapping that we are looking for is to avoid going through Context Menu.
RE: - xbmc-user - 2012-04-08 17:24
(2012-01-26 13:31)spiff Wrote: it's the control ID of the 'start slideshow' button you have in the lhs menu.
@spiff, need some help! How do I find "controller ID" for various functions? e.g. Now, I'm looking for a way to invoke Bookmark function with a single key press while I'm watching a video. If I can automatically take video file name and the current elapsed time of the movie to automatically create a bookmark name, it will be great!