Kodi Community Forum

Full Version: Random TV Show episode script for skins
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Based largely off of the Random Movie script for skins, I have created a script to play a random television show episode from your library. You can filter by un-watched and the television series.

Source: https://github.com/stafio/xbmc-random-episode/

For my own use, I have added an option to use the script under TV Shows in the default Confluence skin. Here are the changes I made for this:
- Edit the IncludesHomeMenuItems.xml file in the skin.confluence/720p directory (The location on an Ubuntu install is: /usr/share/xbmc/addons/skin.confluence/720p)
- Under the section <include name="HomeSubMenuTVShows"> add the following:

Code:
<!--  Random Episode Script  -->
<control type="button" id="90177">
<include>ButtonHomeSubCommonValues</include>
<label>Random Show</label>
<onclick>RunScript(script.randomepisode,prompt=True)</onclick>
<visible>System.HasAddon(script.randomepisode)</visible>
</control>

Just before:

Code:
<control type="image" id="90177">
<width>35</width>
<height>35</height>
<texture border="0,0,0,3">HomeSubEnd.png</texture>
</control>

Note that you will need to change the id of the last control to 90178 since the script is now using 90177.
can i play randomly from my files (i.e. drive) instead from a scrapped library?
got lotsa documentary which cannot be indexed..
No, the script only works off of the videos in your library.
The script has now been updated for Gotham. The only notable change for the user is that when selecting a series, the titles are sorted ignoring any leading "The " in the series name.

https://github.com/stafio/xbmc-random-ep...master.zip

Extract the directory in the zip to your xbmc/addons directory and re-name the extracted directory script.randomepisode