我正在尝试使用python脚本的以下部分列出插件中的一些链接:
def compile_new_to_criminal(compile_ntc):
"""
@para: list containing dict of key/values pairs for playable podcasts
"""
items = []
items.append({
'label': 'Episode 59: In Plain Sight',
'thumbnail': 'https://thisiscriminal.com/wp-content/uploads/2017/01/disguise_episode-art-480x480.png',
'path': 'https://dts.podtrac.com/redirect.mp3/dovetail.prxu.org/criminal/cfea1c64-4cda-47f7-b0c1-f7c945d71714/Episode_59__In_Plain_Sight.mp3',
'info': 'Description TEXT HERE',
'is_playable': True},
{
'label': 'Episode 51: Money Tree',
'thumbnail': 'https://thisiscriminal.com/wp-content/uploads/2015/04/695bgk-02-480x480.png',
'path': 'https://dts.podtrac.com/redirect.mp3/dovetail.prxu.org/criminal/058d60c0-b85e-497a-8e8c-46ec039a2483/01_Episode_51__Money_Tree.mp3',
'info': 'Description TEXT HERE',
'is_playable': True},
)
return items
如果我标记出第二个链接,第一个链接可以正常工作,但是当我尝试像上面那样添加第二个链接时,则会出现以下输出错误:
File ".../addons/plugin.audio.thisiscriminal/resources/lib/thisiscriminal.py", line 158, in compile_new_to_criminal
'is_playable': True},
TypeError: append() takes exactly one argument (2 given)
-->End of Python script error report<--
是否有另一种方法列出上面没有附加功能的项目?我在网上看了一下,但似乎无法将这些示例等同于我的需求。任何帮助将不胜感激。