The branch, dharma has been updated
via d8a6b8c42c266803b39b70f63711fd34fb1295ed (commit)
via 4d2698ee6d43e7aea6edf9ea7cc27812fc16e3b9 (commit)
via 824dd260c8b22565b191a9d90717e5e6aa5f1d2a (commit)
via 756a6ebe2936d2a71d3f5741b36aadcb6b06ef87 (commit)
via 2babca711cb4fb224c6931c5e4fd3bd4eee5eb7b (commit)
from 7075ee3d5510aa9c040ba6a6f9364bfacab8604e (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=d8a6b8c42c266803b39b70f63711fd34fb1295ed
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=4d2698ee6d43e7aea6edf9ea7cc27812fc16e3b9
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=824dd260c8b22565b191a9d90717e5e6aa5f1d2a
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=756a6ebe2936d2a71d3f5741b36aadcb6b06ef87
commit 756a6ebe2936d2a71d3f5741b36aadcb6b06ef87
Author: spiff <[email protected]>
Date: Wed Sep 14 11:17:09 2011 +0200
[plugin.video.gametest.dk] updated to version 1.1.0
diff --git a/.gitignore b/.gitignore
index bd51982..2a29e83 100644
--- a/.gitignore
+++ b/.gitignore
@@ -65,3 +65,5 @@ plugin.video.tagesschau/.gitignore
plugin.video.pinkbike/.git
plugin.video.onside.tv/.git
plugin.video.onside.tv/.idea
+plugin.video.gametest.dk/.git
+plugin.video.gametest.dk/.idea
diff --git a/plugin.video.gametest.dk/addon.py
b/plugin.video.gametest.dk/addon.py
index cacb32b..edcb9a9 100644
--- a/plugin.video.gametest.dk/addon.py
+++ b/plugin.video.gametest.dk/addon.py
@@ -1,113 +1,130 @@
import re
import os
import sys
+import urllib2
+import cgi as urlparse
import xbmcgui
+import xbmcaddon
import xbmcplugin
-import danishaddons
-import danishaddons.web
-import danishaddons.info
-
BASE_URL = 'http://www.gametest.dk/'
FLV_URL = BASE_URL + 'gametesttest/reviews/%s/%s.flv'
REVIEWS_URL = BASE_URL + 'index.php?anmeldelser=alle'
PAGE_URL = BASE_URL + 'index.php?page=%s'
CATEGORIES = [
- {'title' : 30010, 'params' : 'reviews'},
- {'title' : 30011, 'params' : 'retro'},
- {'title' : 30012, 'params' : 'stunts'},
+ {'title' : 30010, 'params' : 'reviews=1'},
+ {'title' : 30011, 'params' : 'retro=1'},
+ {'title' : 30012, 'params' : 'stunts=1'},
]
-def showOverview():
- html = danishaddons.web.downloadAndCacheUrl(BASE_URL,
os.path.join(danishaddons.ADDON_DATA_PATH, 'overview.html'), 24 * 60)
-
- m = re.search('Sendt den ([^<]+).*?<ul>(.*?)</ul>', html, re.DOTALL)
- date = m.group(1)
- title = danishaddons.msg(30000) % date
- games = m.group(2).replace('<li>', '').replace('</li>', '\n')
-
- path = danishaddons.ADDON.getAddonInfo('path')
- icon = os.path.join(path, 'icon.png')
- item = xbmcgui.ListItem(title, iconImage = icon)
- item.setInfo('video', {
- 'title' : title,
- 'plot' : str(danishaddons.msg(30001)) + games,
- 'date' : date.replace('-', '.')
- })
- url = FLV_URL % ('file', 'Programmet')
- xbmcplugin.addDirectoryItem(danishaddons.ADDON_HANDLE, url, item)
-
- for idx, c in enumerate(CATEGORIES):
- item = xbmcgui.ListItem(danishaddons.msg(c['title']), iconImage = icon)
- url = danishaddons.ADDON_PATH + '?' + c['params']
- xbmcplugin.addDirectoryItem(danishaddons.ADDON_HANDLE, url, item, True)
-
- xbmcplugin.setContent(danishaddons.ADDON_HANDLE, 'episodes')
- xbmcplugin.endOfDirectory(danishaddons.ADDON_HANDLE)
-
-def showReviews():
- html = danishaddons.web.downloadAndCacheUrl(REVIEWS_URL,
os.path.join(danishaddons.ADDON_DATA_PATH, 'reviews.html'), 24 * 60)
-
- for m in re.finditer("index.php\?play=(.*?)&type=anmeldelse'><img src='
(.*?)'.*?anmeldelse'>(.*?)</a>.*?af: (.*?)</a>(.*?)time'>(.*?)</p>", html,
re.DOTALL):
- slug = m.group(1)
- icon = m.group(2)
- title = m.group(3)
- author = m.group(4)
- rating = m.group(5).count('good.png')
- date = m.group(6)
-
- item = xbmcgui.ListItem(title, iconImage = BASE_URL + icon)
- item.setInfo('video', {
- 'title' : title,
- 'date' : date.replace('-', '.'),
- 'year' : int(date[6:]),
- 'credits' : author,
- 'plot' : title,
- 'rating' : rating
- })
- url = FLV_URL % ('file', slug)
- xbmcplugin.addDirectoryItem(danishaddons.ADDON_HANDLE, url, item)
-
- xbmcplugin.setContent(danishaddons.ADDON_HANDLE, 'episodes')
- xbmcplugin.addSortMethod(danishaddons.ADDON_HANDLE,
xbmcplugin.SORT_METHOD_DATE)
- xbmcplugin.endOfDirectory(danishaddons.ADDON_HANDLE)
+class Gametest(object):
+ def showOverview(self):
+ html = self.downloadUrl(BASE_URL)
-def showPage(page):
- html = danishaddons.web.downloadAndCacheUrl(PAGE_URL % page,
os.path.join(danishaddons.ADDON_DATA_PATH, '%s.html' % page), 24 * 60)
+ # Latest show
+ m = re.search('Sendt den ([^<]+).*?<ul>(.*?)</ul>', html, re.DOTALL)
+ date = m.group(1)
+ title = ADDON.getLocalizedString(30000) % date
+ games = m.group(2).replace('<li>', '').replace('</li>', '\n')
- for m in re.finditer("index.php\?play=(.*?)&type=.*?src=[ \"](.*?)[
\"](.*?<b>(.*?)</b>.*?af:.*?>(.*?)</a>)?", html, re.DOTALL):
- slug = m.group(1)
- icon = m.group(2)
- title = m.group(4)
- author = m.group(5)
-
- item = xbmcgui.ListItem(title, iconImage = BASE_URL + icon)
+ path = ADDON.getAddonInfo('path')
+ icon = os.path.join(path, 'icon.png')
+ item = xbmcgui.ListItem(title, iconImage = icon)
+ item.setProperty('Fanart_Image', FANART)
item.setInfo('video', {
'title' : title,
- 'credits' : author,
- 'plot' : title
+ 'plot' : str(ADDON.getLocalizedString(30001)) + games,
+ 'date' : date.replace('-', '.')
})
-
- url = FLV_URL % ('stunts', slug)
- xbmcplugin.addDirectoryItem(danishaddons.ADDON_HANDLE, url, item)
-
- xbmcplugin.setContent(danishaddons.ADDON_HANDLE, 'episodes')
- xbmcplugin.addSortMethod(danishaddons.ADDON_HANDLE,
xbmcplugin.SORT_METHOD_LABEL)
- xbmcplugin.endOfDirectory(danishaddons.ADDON_HANDLE)
-
+ url = FLV_URL % ('file', 'Programmet')
+ xbmcplugin.addDirectoryItem(HANDLE, url, item)
+
+ # Categories
+ for idx, c in enumerate(CATEGORIES):
+ item = xbmcgui.ListItem(ADDON.getLocalizedString(c['title']),
iconImage = icon)
+ item.setProperty('Fanart_Image', FANART)
+ url = PATH + '?' + c['params']
+ xbmcplugin.addDirectoryItem(HANDLE, url, item, True)
+
+ xbmcplugin.setContent(HANDLE, 'episodes')
+ xbmcplugin.endOfDirectory(HANDLE)
+
+ def showReviews(self):
+ html = self.downloadUrl(REVIEWS_URL)
+
+ for m in re.finditer("index.php\?play=(.*?)&type=anmeldelse'><img
src=' (.*?)'.*?anmeldelse'>(.*?)</a>.*?af: (.*?)</a>(.*?)time'>(.*?)</p>",
html, re.DOTALL):
+ slug = m.group(1)
+ icon = m.group(2)
+ title = m.group(3)
+ author = m.group(4)
+ rating = m.group(5).count('good.png')
+ date = m.group(6)
+
+ item = xbmcgui.ListItem(title, iconImage = BASE_URL + icon)
+ item.setProperty('Fanart_Image', FANART)
+ item.setInfo('video', {
+ 'title' : title,
+ 'date' : date.replace('-', '.'),
+ 'year' : int(date[6:]),
+ 'credits' : author,
+ 'plot' : title,
+ 'rating' : rating
+ })
+ url = FLV_URL % ('file', slug)
+ xbmcplugin.addDirectoryItem(HANDLE, url, item)
+
+ xbmcplugin.setContent(HANDLE, 'episodes')
+ xbmcplugin.addSortMethod(HANDLE, xbmcplugin.SORT_METHOD_DATE)
+ xbmcplugin.endOfDirectory(HANDLE)
+
+ def showPage(self, page):
+ html = self.downloadUrl(PAGE_URL % page)
+
+ for m in re.finditer("index.php\?play=(.*?)&type=.*?src=[ \"](.*?)[
\"](.*?<b>(.*?)</b>.*?af:.*?>(.*?)</a>)?", html, re.DOTALL):
+ slug = m.group(1)
+ icon = m.group(2)
+ title = m.group(4)
+ author = m.group(5)
+
+ item = xbmcgui.ListItem(title, iconImage = BASE_URL + icon)
+ item.setProperty('Fanart_Image', FANART)
+ item.setInfo('video', {
+ 'title' : title,
+ 'credits' : author,
+ 'plot' : title
+ })
+
+ url = FLV_URL % ('stunts', slug)
+ xbmcplugin.addDirectoryItem(HANDLE, url, item)
+
+ xbmcplugin.setContent(HANDLE, 'episodes')
+ xbmcplugin.addSortMethod(HANDLE, xbmcplugin.SORT_METHOD_LABEL)
+ xbmcplugin.endOfDirectory(HANDLE)
+
+ def downloadUrl(self, url):
+ u = urllib2.urlopen(url)
+ data = u.read()
+ u.close()
+ return data
if __name__ == '__main__':
- danishaddons.init(sys.argv)
-
- if danishaddons.ADDON_PARAMS.has_key('reviews'):
- showReviews()
- elif danishaddons.ADDON_PARAMS.has_key('retro'):
- showPage('retro')
- elif danishaddons.ADDON_PARAMS.has_key('stunts'):
- showPage('stunts')
+ ADDON = xbmcaddon.Addon(id = 'plugin.video.gametest.dk')
+ PATH = sys.argv[0]
+ HANDLE = int(sys.argv[1])
+ PARAMS = urlparse.parse_qs(sys.argv[2][1:])
+
+ FANART = os.path.join(ADDON.getAddonInfo('path'), 'fanart.jpg')
+
+ gt = Gametest()
+ if PARAMS.has_key('reviews'):
+ gt.showReviews()
+ elif PARAMS.has_key('retro'):
+ gt.showPage('retro')
+ elif PARAMS.has_key('stunts'):
+ gt.showPage('stunts')
else:
- showOverview()
+ gt.showOverview()
diff --git a/plugin.video.gametest.dk/addon.xml
b/plugin.video.gametest.dk/addon.xml
index a862d61..970e0d0 100644
--- a/plugin.video.gametest.dk/addon.xml
+++ b/plugin.video.gametest.dk/addon.xml
@@ -1,12 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="plugin.video.gametest.dk"
- version="1.0.3"
+ version="1.1.0"
name="Gametest"
provider-name="twinther [[email protected]]">
<requires>
<import addon="xbmc.python" version="1.0"/>
- <import addon="script.module.danishaddons" version="1.1.0"/>
</requires>
<extension point="xbmc.python.pluginsource" library="addon.py">
<provides>video</provides>
diff --git a/plugin.video.gametest.dk/changelog.txt
b/plugin.video.gametest.dk/changelog.txt
index e18fd8b..162964e 100644
--- a/plugin.video.gametest.dk/changelog.txt
+++ b/plugin.video.gametest.dk/changelog.txt
@@ -1,3 +1,6 @@
+[B]Version 1.1.0 - 2011-09-13[/B]
+- Removed dependency on script.module.danishaddons
+
[B]Version 1.0.3[/B]
- Fixed icon
diff --git a/plugin.video.gametest.dk/test.py b/plugin.video.gametest.dk/test.py
index 27537f0..4ea648f 100644
--- a/plugin.video.gametest.dk/test.py
+++ b/plugin.video.gametest.dk/test.py
@@ -1,4 +1,3 @@
-import os
import re
import sys
import unittest
@@ -14,14 +13,15 @@ import addon
class TestGametestDk(unittest.TestCase):
def setUp(self):
- danishaddons.init([os.getcwd(), '12345', ''])
+ danishaddons.init(['.', '12345', ''])
xbmcplugin.items = list()
def testShowOverview(self):
+ xbmcaddon.strings[30000] = 'Date: %s'
addon.showOverview()
self.assertNotEquals(0, len(xbmcplugin.items), msg = 'Expected at
least one ListItem')
if __name__ == '__main__':
unittest.main()
-
\ No newline at end of file
+
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=2babca711cb4fb224c6931c5e4fd3bd4eee5eb7b
commit 2babca711cb4fb224c6931c5e4fd3bd4eee5eb7b
Author: spiff <[email protected]>
Date: Wed Sep 14 11:13:24 2011 +0200
[plugin.video.onside.tv] initial version (1.1.0). thanks to twinther and
ariba
diff --git a/.gitignore b/.gitignore
index 69470b4..bd51982 100644
--- a/.gitignore
+++ b/.gitignore
@@ -63,3 +63,5 @@ plugin.video.giantbomb/.gitignore
plugin.video.tagesschau/.git
plugin.video.tagesschau/.gitignore
plugin.video.pinkbike/.git
+plugin.video.onside.tv/.git
+plugin.video.onside.tv/.idea
-----------------------------------------------------------------------
Summary of changes:
.gitignore | 4 +
.../LICENSE.txt | 0
plugin.video.animevice/addon.xml | 19 ++
plugin.video.animevice/default.py | 175 ++++++++++++++++++
plugin.video.animevice/fanart.jpg | Bin 0 -> 275402 bytes
plugin.video.animevice/icon.png | Bin 0 -> 31828 bytes
.../resources/settings.xml | 0
.../LICENSE.txt | 0
plugin.video.comicvine/addon.xml | 19 ++
plugin.video.comicvine/default.py | 175 ++++++++++++++++++
plugin.video.comicvine/fanart.jpg | Bin 0 -> 623186 bytes
plugin.video.comicvine/icon.png | Bin 0 -> 40087 bytes
.../resources/settings.xml | 0
plugin.video.gametest.dk/addon.py | 193 +++++++++++---------
plugin.video.gametest.dk/addon.xml | 3 +-
plugin.video.gametest.dk/changelog.txt | 3 +
plugin.video.gametest.dk/test.py | 6 +-
.../LICENSE.txt | 0
plugin.video.onside.tv/addon.py | 74 ++++++++
plugin.video.onside.tv/addon.xml | 21 ++
plugin.video.onside.tv/changelog.txt | 3 +
plugin.video.onside.tv/icon.png | Bin 0 -> 19550 bytes
.../LICENSE.txt | 0
plugin.video.screened/addon.xml | 19 ++
plugin.video.screened/default.py | 175 ++++++++++++++++++
plugin.video.screened/fanart.jpg | Bin 0 -> 993356 bytes
plugin.video.screened/icon.png | Bin 0 -> 19031 bytes
.../resources/settings.xml | 0
28 files changed, 796 insertions(+), 93 deletions(-)
copy {plugin.audio.modland => plugin.video.animevice}/LICENSE.txt (100%)
create mode 100644 plugin.video.animevice/addon.xml
create mode 100644 plugin.video.animevice/default.py
create mode 100644 plugin.video.animevice/fanart.jpg
create mode 100644 plugin.video.animevice/icon.png
copy {plugin.video.giantbomb => plugin.video.animevice}/resources/settings.xml
(100%)
copy {plugin.audio.modland => plugin.video.comicvine}/LICENSE.txt (100%)
create mode 100644 plugin.video.comicvine/addon.xml
create mode 100644 plugin.video.comicvine/default.py
create mode 100644 plugin.video.comicvine/fanart.jpg
create mode 100644 plugin.video.comicvine/icon.png
copy {plugin.video.giantbomb => plugin.video.comicvine}/resources/settings.xml
(100%)
copy {plugin.audio.abradio.cz => plugin.video.onside.tv}/LICENSE.txt (100%)
create mode 100644 plugin.video.onside.tv/addon.py
create mode 100644 plugin.video.onside.tv/addon.xml
create mode 100644 plugin.video.onside.tv/changelog.txt
create mode 100644 plugin.video.onside.tv/icon.png
copy {plugin.audio.modland => plugin.video.screened}/LICENSE.txt (100%)
create mode 100644 plugin.video.screened/addon.xml
create mode 100644 plugin.video.screened/default.py
create mode 100644 plugin.video.screened/fanart.jpg
create mode 100644 plugin.video.screened/icon.png
copy {plugin.video.giantbomb => plugin.video.screened}/resources/settings.xml
(100%)
hooks/post-receive
--
Plugins
------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the
BlackBerry® mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry® DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons