2018-10-29, 10:20
I' m trying to list the contents of a local directory in a custom window, but I only get the folders of the main directory with $INFO[ListItem.Label].
I did at first, using the "Dialog.select" and I get the correct filenames there, but I want to use a custom window dialog. I'm using this tutorial as base:
https://kodi.wiki/view/HOW-TO:Script_addon
and the code for the xml window.
I get the list of files using
filelist=os.listdir("/media/data/Shows/Subtitles/")
If I just print a filelist item with print(filelist[0] for e.g, I get the correct file name without file path. But when the window loads I get only the main directory' s(media) subdirectories(data, data1, data2) as list items and not the filenames of "Subtitles" folder.
If I use "$INFO(ListItem.FileNameAndPath) then I get the path of those subdirectories(/media/data, media/data1, /media/data2).
How to display the list with the content of Subtitles folder on that custom window?
I did at first, using the "Dialog.select" and I get the correct filenames there, but I want to use a custom window dialog. I'm using this tutorial as base:
https://kodi.wiki/view/HOW-TO:Script_addon
and the code for the xml window.
I get the list of files using
filelist=os.listdir("/media/data/Shows/Subtitles/")
If I just print a filelist item with print(filelist[0] for e.g, I get the correct file name without file path. But when the window loads I get only the main directory' s(media) subdirectories(data, data1, data2) as list items and not the filenames of "Subtitles" folder.
If I use "$INFO(ListItem.FileNameAndPath) then I get the path of those subdirectories(/media/data, media/data1, /media/data2).
How to display the list with the content of Subtitles folder on that custom window?