3 |
|
|
4 |
''' |
''' |
5 |
Todic plugin for XBMC |
Todic plugin for XBMC |
6 |
Version 0.0.7 |
Version 0.0.9 |
7 |
''' |
''' |
8 |
|
|
9 |
import sys |
import sys |
106 |
u = sys.argv[0] + "?mode=10&name=" |
u = sys.argv[0] + "?mode=10&name=" |
107 |
ok = xbmcplugin.addDirectoryItem(handle = int(sys.argv[1]), url = u, listitem = listitem, isFolder = True) |
ok = xbmcplugin.addDirectoryItem(handle = int(sys.argv[1]), url = u, listitem = listitem, isFolder = True) |
108 |
|
|
109 |
|
#add search series |
110 |
|
listitem = xbmcgui.ListItem(label = "Søg Serier ...", iconImage = 'DefaultFolder.png', thumbnailImage = 'DefaultFolder.png') |
111 |
|
listitem.setProperty('Fanart_Image', fanartImage) |
112 |
|
|
113 |
|
u = sys.argv[0] + "?mode=11&name=" |
114 |
|
ok = xbmcplugin.addDirectoryItem(handle = int(sys.argv[1]), url = u, listitem = listitem, isFolder = True) |
115 |
|
|
116 |
xbmcplugin.endOfDirectory(int(sys.argv[1])) |
xbmcplugin.endOfDirectory(int(sys.argv[1])) |
117 |
|
|
118 |
|
|
146 |
playcount = '0' |
playcount = '0' |
147 |
playcount = int(playcount) |
playcount = int(playcount) |
148 |
|
|
|
name = name.encode('latin-1') |
|
|
description = description.encode('latin-1') |
|
149 |
|
|
150 |
## print "name:" + name |
## print "name:" + name |
151 |
# print "url:" + url |
# print "url:" + url |
162 |
infoLabels['playcount'] = playcount |
infoLabels['playcount'] = playcount |
163 |
listitem.setInfo('video', infoLabels) |
listitem.setInfo('video', infoLabels) |
164 |
|
|
165 |
|
name = name.encode('UTF-8') |
166 |
|
description = description.encode('UTF-8') |
167 |
|
|
168 |
|
|
169 |
u = sys.argv[0] + "?mode=" + urllib.quote(mode) + "&name=" + urllib.quote(name) + "&url=" + urllib.quote(url) |
u = sys.argv[0] + "?mode=" + urllib.quote(mode) + "&name=" + urllib.quote(name) + "&url=" + urllib.quote(url) |
170 |
ok = xbmcplugin.addDirectoryItem(handle = int(sys.argv[1]), url = u, listitem = listitem, isFolder = folder, totalItems = l) |
ok = xbmcplugin.addDirectoryItem(handle = int(sys.argv[1]), url = u, listitem = listitem, isFolder = folder, totalItems = l) |
171 |
|
|
236 |
|
|
237 |
buildList(url, "søgning") |
buildList(url, "søgning") |
238 |
|
|
239 |
|
def searchSeries(): |
240 |
|
search = getUserInput("Todic Serie Søgning") |
241 |
|
|
242 |
|
if (search != None and search != ""): |
243 |
|
url = __backend__ + "&action=searchseries&search=" + urllib.quote_plus(search) |
244 |
|
|
245 |
|
#print "[TODIC] Search start: " + search |
246 |
|
#print "[TODIC] Search url: " + url |
247 |
|
|
248 |
|
buildList(url, "serie søgning") |
249 |
|
|
250 |
|
|
251 |
|
|
252 |
|
|
313 |
pass |
pass |
314 |
|
|
315 |
if url == 'refresh': |
if url == 'refresh': |
316 |
xbmc.output("[tvserver] Container.Refresh") |
#xbmc.output("[tvserver] Container.Refresh") #20130418 xbmc.output virker ikke med XBMC12 |
317 |
xbmc.executebuiltin("Container.Refresh") |
xbmc.executebuiltin("Container.Refresh") |
318 |
|
|
319 |
|
|
327 |
|
|
328 |
elif mode == 10: |
elif mode == 10: |
329 |
search() |
search() |
330 |
|
|
331 |
|
elif mode == 11: |
332 |
|
searchSeries() |
333 |
|
|
334 |
|
|
335 |
elif mode == 50: |
elif mode == 50: |