簡體   English   中英

如何在Kodi皮膚中顯示列表項標簽

[英]How to display list item tags in a kodi skin

我正在嘗試自定義默認的Kodi皮膚“河口”。 我的計划是在電影標題旁邊顯示電影的標簽。

皮膚在DialogVideoInfo.xml模板文件中使用$INFO[ListItem.Tag] ,當打開視頻信息屏幕時,Kodi會很好地顯示標簽。

但是,當我在MyVideoNav.xml模板中使用$INFO[ListItem.Tag]變量時,什么也不會顯示。 這是我更改默認MyVideoNav.xml模板的方法

...
<control type="textbox">
    <left>30</left>
    <top>240</top>
    <width>525</width>
    <bottom>100</bottom>
    <visible>!ListItem.IsCollection</visible>
    <label>Tags: "$INFO[ListItem.Tag]"[CR][CR]$INFO[ListItem.Tagline,[I],[/I][CR][CR]]$INFO[ListItem.Plot][CR][CR]</label>
    <autoscroll delay="10000" time="3000" repeat="10000">Skin.HasSetting(autoscroll)</autoscroll>
</control>
...

無論電影是否已分配給標簽,我看到的始終是Tags: ""

編輯您可以在這里找到整個MyVideoNav.xml: https ://pastebin.com/dHqyQpHx。 在第52行中,您會找到我的零錢。

您應該使用<label>$INFO[ListItem.Tagline]</label>您首先需要在DialogVideoInfo.xmlTagline創建列表項

DialogVideoInfo.xml行之后的DialogVideoInfo.xml添加幾行(用於項目布局):-

  <control type="label">
        <left>25</left>
        <width>214</width>
        <height>67</height>
        <top>245</top>
        <align>center</align>
        <aligny>center</aligny>
        <font>font12</font>
        <textcolor>grey</textcolor>
        <label>$INFO[ListItem.Tagline]</label>
    </control>

而且在第360行之后:

<control type="label">
        <left>25</left>
        <width>214</width>
        <height>67</height>
        <top>245</top>
        <align>center</align>
        <aligny>center</aligny>
        <font>font12</font>
        <textcolor>grey</textcolor>
         <scroll>true</scroll>
        <label>$INFO[ListItem.Tagline]</label>
    </control> 

注意:自行調整寬度和高度。 現在,您可以在MyVideoNav.xml添加並使用<label>$INFO[ListItem.Tagline]</label>

希望這可以幫助..!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM