Plugin python directory services for XBMC (now in SVN)

  Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Nuka1195 Online
Skilled Python Coder
Posts: 3,914
Joined: Dec 2004
Reputation: 17
Post: #11
I used the wrong call to convert the python object to set text infolabels. That's why plot was failing.

Code:
argh it's late i'll post the diff in the morning

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
(This post was last modified: 2007-08-21 07:02 by Nuka1195.)
find quote
Nuka1195 Online
Skilled Python Coder
Posts: 3,914
Joined: Dec 2004
Reputation: 17
Post: #12
Can the label that says Videos, be an infolabel for the current source your in.

Could a plugin get a way to signify movies or tv shows? if so that would be helpful.

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
Nuka1195 Online
Skilled Python Coder
Posts: 3,914
Joined: Dec 2004
Reputation: 17
Post: #13
Diff for: fix for setInfo() infolabel's not accepting unicode.

deleted code already committed

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
(This post was last modified: 2007-08-21 22:07 by Nuka1195.)
find quote
stanley87 Offline
Skilled Python Coder
Posts: 555
Joined: Sep 2006
Reputation: 2
Location: Chch, New Zealand
Post: #14
Any plans for getting this in the MyPrograms menu?

I say this, as I was thinking about porting eg, RetroX over to use this.
Imagine all your roms being listed etc in XBMC, no script needed.

This is what gave me the idea : http://forums.xbox-scene.com/index.php?showtopic=617466

Oh, and is it python or XBMC that controls what happens when a list item is selected?

Thanks,
Stanley87
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,523
Joined: Oct 2003
Reputation: 138
Post: #15
XBMC controls what happens when the list item is selected. If it's a folder it opens, otherwise it plays the file.

And it's not currently enabled in My Programs, but I see no reason not to have it there if you want it there.

For ROM browsing type things, I guess what you effectively need to do is set some params in the CFileItem so that we know what ROM to start it with (and any other params to start).

Perhaps we can do this via options in the path URL?

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
(This post was last modified: 2007-08-22 02:46 by jmarshall.)
find quote
Nuka1195 Online
Skilled Python Coder
Posts: 3,914
Joined: Dec 2004
Reputation: 17
Post: #16
Quote:
Oh, and is it python or XBMC that controls what happens when a list item is selected?

Both, the plugin feeds XBMC urls that either link to an outside source or back to your plugin with diff args.

e.g. the first time AMT is selected it returns a list of categories with a url set back to the script and a genre arg in the url. when you select that it returns a list of trailer urls. This list XBMC just plays the urls.

That sounds confusing, it works quite well.

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
Nick8888 Offline
Fan
Posts: 716
Joined: Jan 2007
Reputation: 0
Post: #17
What is the current state of this? I got the new build earlier today but haven't had a chance to install it. Is the AMT script the only one which works with this ATM? Are any in progress? I'm really hoping bomb bloke perseveres with his n64 one and I can also see potential for an xbmcscripts one.

Great work everyone involved with this.
find quote
Unbehagen Offline
Skilled Python Coder
Posts: 342
Joined: Jul 2007
Reputation: 3
Location: Bremen, Germany
Post: #18
Here is a fixed version of the TVLinks plugin:
http://max-server.informatik.uni-bremen....VLinks.zip.
Could anyone try it? I have no box here, just the Windows environment (XBMC_PC).
I used the following two dirty hacks to solve the display problems:
Code:
def addLink(self,name,url):
        listitem=xbmcgui.ListItem( name )
        if len(name)<20:
                name=name+"                           "
        liz=xbmcgui.ListItem(name)
        ok=xbmcplugin.addDirectoryItem(handle=self.handle,url=url,listitem=liz)

    
    def addDir(self,name,url,code,letter=" "):

        u=sys.argv[0]+"?code="+str(code)+"&url="+urllib.quote(url)+"&letter="+letter+"/"
        if len(name)<20:
                name=name+"                           "
        liz=xbmcgui.ListItem(name)
        xbmcplugin.addDirectoryItem(handle=self.handle,url=u,listitem=liz,isFolder=​True)
There might be a bug within the plugin code: If a URL is very long and the label is very short, it overwrites the displayed label with parts of the URL. If you want to try it, remove the name=name+" " from the script and see what it displays. JMarshall, we had this problem earlier, and it worked before the listitem stuff has been added.
find quote
Nuka1195 Online
Skilled Python Coder
Posts: 3,914
Joined: Dec 2004
Reputation: 17
Post: #19
works fine here commenting out the name=name+" " hack.

The only thing I notice in this is they are no longer subcategoried by letter/number.

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
Unbehagen Offline
Skilled Python Coder
Posts: 342
Joined: Jul 2007
Reputation: 3
Location: Bremen, Germany
Post: #20
Nuka1195 Wrote:works fine here commenting out the name=name+" " hack.
This is strange... Doesn't it show somethng like 3&letter=Z when there should be Z as a label? Did anyone change anything in this code since yesterday?
[CODE]
The only thing I notice in this is they are no longer subcategoried by letter/number.[/quote]
Yes, it seems to be fast enough to display all results. I prefer it this way,so I can see all movies and series and decide which one I want to see. But you can change it back. Just check out the "old" folder in the xbmcscripts google svn repo and switch something like 5 revisions back. There should be a tvlinks zip file. Grab that version to have sorting.
find quote
Post Reply