enen92 / screensaver.kaster

A chromecast-like screensaver for Kodi
GNU General Public License v2.0
25 stars 13 forks source link

Solution to recursive folder bugs #19

Open bdshields opened 4 years ago

bdshields commented 4 years ago

Hi, I think I've found the issue with recursive folder searching.

I've created "new_path" instead of using "path"

    def __get_images_recursively(self, path):
        folders, files = xbmcvfs.listdir(xbmc.translatePath(path))
        for _file in files:
            self.__append_image(os.path.join(xbmc.translatePath(path), _file))
        if folders:
            for folder in folders:
                new_path = os.path.join(path,folder)
                self.__get_images_recursively(new_path)