Add-on:Simple Downloader for xbmc plugins: Difference between revisions
Jump to navigation
Jump to search
>NedBot m (Addon-Bot Update) |
>TobiasTheCommie No edit summary |
||
Line 10: | Line 10: | ||
|Platform=all | |Platform=all | ||
|icon url=}} | |icon url=}} | ||
= Introduction = | |||
This is a downloader developed and used with the YouTube and BlipTV addons. | |||
= Features = | |||
* One queue across all plugins | |||
* Requeing an existing item moves it to the front of the queue. | |||
= Developers = | |||
This service works as an independant storage server to XBMC's implementation. | |||
It provides proper thread safe locking and storage management. | |||
== Setup == | |||
To use the cacheing service add the following to your py file. | |||
import xbmc, xbmcvfs, xbmcaddon | |||
settings = xbmcaddon.Addon(id='your.plugin.id') # The same as in addon.xml | |||
import SimpleDownloader as downloader | |||
downloader = downloader.SimpleDownloader() | |||
You can now access the caching service through the "cache" variable. | |||
Remember to include a fallback [http://hg.tobiasussing.dk/hgweb.cgi/youtubexbmc/file/21b17fff9eea/storageserverdummy.py storageserverdummy.py] file. | |||
=== Settings === | |||
In your resources/settings.xml you need the following. | |||
<setting id="downloadPath" type="folder" label="Download Location" default="" /> | |||
<setting id="hideDuringPlayback" type="bool" label="Hide during playback" default="true" /> | |||
<setting id="notification_length" type="enum" label="Notification length in seconds" values="1|2|3|4|5|6|7|8|9|10" default="2" /> | |||
== Debugging == | |||
To enable debugging set the following values in default.py | |||
dbg = True # Default | |||
Whenever you debug your own code you should also debug in the cache. Otherwise you should remember to DISABLE it. | |||
== downloadVideo(self, params = {}) == | |||
Takes dictionary list with video name and url. | |||
Returns None | |||
params = {} | |||
params["video_url"] = "http://server.com/video.mp4" | |||
params["Title"] = "my video" | |||
self.downloader.downloadVideo(params) |
Revision as of 08:53, 7 December 2011
Simple downloader for xbmc plugins. | ||||||||||
|
Add-ons | Simple downloader for xbmc plugins. |
Introduction
This is a downloader developed and used with the YouTube and BlipTV addons.
Features
- One queue across all plugins
- Requeing an existing item moves it to the front of the queue.
Developers
This service works as an independant storage server to XBMC's implementation.
It provides proper thread safe locking and storage management.
Setup
To use the cacheing service add the following to your py file.
import xbmc, xbmcvfs, xbmcaddon settings = xbmcaddon.Addon(id='your.plugin.id') # The same as in addon.xml import SimpleDownloader as downloader downloader = downloader.SimpleDownloader()
You can now access the caching service through the "cache" variable.
Remember to include a fallback storageserverdummy.py file.
Settings
In your resources/settings.xml you need the following.
<setting id="downloadPath" type="folder" label="Download Location" default="" /> <setting id="hideDuringPlayback" type="bool" label="Hide during playback" default="true" /> <setting id="notification_length" type="enum" label="Notification length in seconds" values="1|2|3|4|5|6|7|8|9|10" default="2" />
Debugging
To enable debugging set the following values in default.py
dbg = True # Default
Whenever you debug your own code you should also debug in the cache. Otherwise you should remember to DISABLE it.
downloadVideo(self, params = {})
Takes dictionary list with video name and url.
Returns None
params = {} params["video_url"] = "http://server.com/video.mp4" params["Title"] = "my video" self.downloader.downloadVideo(params)