Skip to content
Browse files

linked fetched is now shown in the plugin

  • Loading branch information...
1 parent bbf56bc commit 58b47ec20646d3e4ec6b73b800c18d8128d3562e @aniket134 committed May 27, 2010
View
23 Django3/default.py
@@ -1,4 +1,4 @@
-import xbmc, xbmcgui,xbmcplugin,sys,os
+import xbmc, xbmcgui,xbmcplugin,sys,os,urllib
# This is used to import plugin specific modules
sys.path.append(os.getcwd() + '/modules/')
@@ -11,7 +11,24 @@
sys.path.append(CP.PLUGIN_PATH)
import db_interaction as db
-print('-----------')
-print(sys.path)
+def addDir(name,url,mode,iconimage):
+ u=url
+ ok=True
+ liz=xbmcgui.ListItem(label=name, iconImage="DefaultFolder.png", thumbnailImage=iconimage)
+ liz.setInfo( type="Video", infoLabels={ "Title": name } )
+ ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=u,listitem=liz,isFolder=True)
+ xbmc.log("asdf"+sys.argv[0]+"--"+sys.argv[1]+"--"+sys.argv[2])
+ xbmc.log("zxcv:::"+u)
+ return ok
+
+def addLink(name,url,iconImage):
+ ok=True
+ liz=xbmcgui.ListItem(label=name,label2="",iconImage="DefaultVideo.png",thumbnailImage=iconImage)
+ liz.setInfo(type="Video",infoLabels={"Title":name})
+ ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=url,listitem=liz)
+ return ok
+
+
+addDir(db.get_link(), os.getcwd(),1,"")
xbmcplugin.endOfDirectory( handle=int( sys.argv[ 1 ] ), succeeded=True )
View
BIN Django3/xbmc_code/constants_plugin.pyo
Binary file not shown.
View
2 Django3/xbmc_code/db_interaction.py
@@ -13,6 +13,4 @@
def get_link():
title = video.objects.get(id=1).title
- print(title)
return title
-get_link()
View
BIN Django3/xbmc_code/db_interaction.pyo
Binary file not shown.
View
2 README
@@ -1,4 +1,6 @@
All the video plugins I've built and used as reference.
+
Django3 is the current stable version of a basic-XBMC-Django-MySQL video plugin.
+
Make sure that master branch is checked out:
git checkout master

0 comments on commit 58b47ec

Please sign in to comment.
Something went wrong with that request. Please try again.