/[projects]/misc/xbmc/plugin.video.todic/default.py
ViewVC logotype

Diff of /misc/xbmc/plugin.video.todic/default.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1921 by torben, Wed Jan 30 07:26:42 2013 UTC revision 2097 by torben, Sun Jan 5 22:00:42 2014 UTC
# Line 3  Line 3 
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
# Line 106  def rootMenu(): Line 106  def rootMenu():
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    
# Line 139  def buildList(url,title, endlist=True): Line 146  def buildList(url,title, endlist=True):
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
# Line 157  def buildList(url,title, endlist=True): Line 162  def buildList(url,title, endlist=True):
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    
# Line 227  def search(): Line 236  def search():
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    
# Line 293  except: Line 313  except:
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    
# Line 307  elif mode == 1: Line 327  elif mode == 1:
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:

Legend:
Removed from v.1921  
changed lines
  Added in v.2097

  ViewVC Help
Powered by ViewVC 1.1.20