2013-12-17, 07:26
Hi everyone, this is my first addon to solve a specific WAF problem I was facing where I would get regular buffering due to only having access to wifi.
Frodo 12.2 - http://windebank.com.au/script.playLocally-1.0.0.zip
What it does
Adds a context menu item to both Movies and TV Episodes to allow a user to cache the file locally before playing. The file is coped to the local device and then plays immediately and the local file is removed once playback ends, either when the file finishes or when the user stops playback.
Features
- Config to allow users to select cache directory (defaulted to system agnostic special://temp)
- Displays progress bar whilst file is copying
- Local file automatically removed once playback completes
- Certain media tags are loaded before playing for display in pause menu (currently title, year, tagline and plot)
- Context menu item only displays if script is enabled
- File copy buffer exposed in addon configuration for testing of optimal setting (changing this didn't make a noticeable difference on my laptop)
To install
See README.txt or below.
Screenshots
If anyone has any issues or requests, please post here. I've only tested on two instances of XBMC - Frodo 12.2 on Openelec and Frodo 12.2 on Windows 8.
Thanks,
Jordan
Frodo 12.2 - http://windebank.com.au/script.playLocally-1.0.0.zip
What it does
Adds a context menu item to both Movies and TV Episodes to allow a user to cache the file locally before playing. The file is coped to the local device and then plays immediately and the local file is removed once playback ends, either when the file finishes or when the user stops playback.
Features
- Config to allow users to select cache directory (defaulted to system agnostic special://temp)
- Displays progress bar whilst file is copying
- Local file automatically removed once playback completes
- Certain media tags are loaded before playing for display in pause menu (currently title, year, tagline and plot)
- Context menu item only displays if script is enabled
- File copy buffer exposed in addon configuration for testing of optimal setting (changing this didn't make a noticeable difference on my laptop)
To install
See README.txt or below.
Code:
To use this script you will need to add a context menu control directly by editing the skin xml files.
Tested with Aeon MQ5
Add the following to DialogContextMenu.xml (\XBMC\addons\skin.aeonmq5\720p) where you want the button to be in the context menu:
<control type="button" id="1034">
<include>DialogContext_Button</include>
<onleft>Dialog.Close(106)</onleft>
<onright>Dialog.Close(106)</onright>
<onclick>RunScript(script.playLocally)</onclick>
<label>88888</label>
<visible>System.HasAddon(script.playLocally) + [Container.Content(episodes) | Container.Content(movies)]</visible>
</control>
Add the following to the skin's language file (\XBMC\addons\skin.aeonmq5\language\English\strings.po):
msgctxt "#88888"
msgid "PLAY LOCALLY"
msgstr "PLAY LOCALLY"
msgctxt "#88889"
msgid "Path to cache local media"
msgstr "Path to cache local media"
msgctxt "#88890"
msgid "Buffer size"
msgstr "Buffer size"
** NOTE - One minor bug with settings.xml being unable to read setting descriptions from strings.po so hard coded in English until resolved.
Screenshots
If anyone has any issues or requests, please post here. I've only tested on two instances of XBMC - Frodo 12.2 on Openelec and Frodo 12.2 on Windows 8.
Thanks,
Jordan