FRAMEWORK Version 1:
I try to fill the first page with DIRECTORY items, after the plug-in is selected.
[codebox]
for item in FrontPage:
TVID, URL, THUMB, TITLE = item
# ‘TVID’ will be used to reference the station when selected on FrontPage
# DirectoryItem( key, title, subtitle=None, summary=None, thumb=None, art=None, **kwargs)
Log('ITEM-List: %s %s %s %s ’ % (TVID, URL, THUMB, TITLE))
dir.Append(Function(DirectoryItem(key = TVID, title = “COMPIZmediacenter”,
subtitle=TITLE, summary = None, thumb = THUMB, art=“art-default.png”), url = URL))
return dir
[/codebox]
All Items get added nicely … however when it returns (RETURN DIR) to PLEX I get the following error ?
[codebox]
Traceback (most recent call last):
File “…Versions/1/Python/PMS/Plugin.py”, line 341, in __run
resultStr = result.Content()
File “…Versions/1/Python/PMS/Objects.py”, line 109, in Content
return XML.StringFromElement(self.ToElement())
File “…Versions/1/Python/PMS/Objects.py”, line 177, in ToElement
root.append(item.ToElement())
File “…Versions/1/Python/PMS/Objects.py”, line 273, in ToElement
self.key = “%s/:/function/%s/%s” % (Plugin.Prefixes()[0], self.__obj.key.name, “%s%s” % (encodedArgs, self.__ext))
AttributeError: ‘str’ object has no attribute ‘name’
[/codebox]
Apparently I fill the directoryItem with some “wrong” stuff? What could it be?
When you do:
Function(DirectoryItem(key = TVID,
That first argument has to be a function. Have a look at The Sixty One or another v1 plug-in to see how it's used.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.