Kodi Community Forum

Full Version: ListItem.DiscNumber - How do you check if missing ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am modifying the aeon nox skin to add the disc number to the track number if it is set for a song.


ListItem.DiskNumber does display the correctly when the disc number is tagged, and blank when it is not.

I need to test if the disk number is set in variables.xml and have tried ListItem.IsEmpty(ListItem.DiscNumber), but that always returns false.

Please could you let me know should I check if the disk number exists?

I am using Eden Beta 1 release and Aeon Nox 2.0 directly from git repository.

Best Regards,
Paul
ListItem.IsEmpty(ListItem.DiscNumber) won't work,
IsEmpty(ListItem.DiscNumber) should :-)
Thanks Ronie for your reply and help,

I have changed my code to IsEmpty(ListItem.DiscNumber)

When I test it, that seems to always return true

Could this be a bug?
it works ok for me. i've tested it using this code:
Code:
<variable name="SomeLabel">
    <value condition="Container.Content(Songs) + IsEmpty(ListItem.DiscNumber)">foo</value>
    <value condition="Container.Content(Songs) + !IsEmpty(ListItem.DiscNumber)">bar</value>
</variable>

hope this helps Smile