Posts: 2,288
Joined: Nov 2005
Reputation:
5
I am doing a bit of an audit on my scripts collection, and during the process I noticed that some scripts make subdirectories within the scripts directory for things like caching and whatnot. These directories will never contain anything which is actually executable, but with the current method used to allow sub directories within the My Programs and Scripts sections, ALL directories are displayed even if they are completely non-functional. This results in a cluttered Scripts list with no way to suppress it. I figure a simple check of a directory to see if it contains any executable elements before it is added to the current directory listing would make this issue go away, as well as stop the occasional confused person asking about the emtpy folders they see in My Programs.
just my $.02
Posts: 284
Joined: Nov 2006
Reputation:
0
It's a good idea, but you have the same problem if you have a directory that have a directory that have a directory that have nothing. A solution would be a recursive algorithm, but it would consume a little bit of CPU. Maybe deleting empty folders would a solution, but maybe the scripts don't work correctly... In any case, it's a good idea. I would add one point: if a directory only have one executable file (program or script), show the executable file instead of the directory (it's mine or this it's yet implement?)
Posts: 26,215
Joined: Oct 2003
Reputation:
187
CPU isn't the issue - it would have to read every directory on disk which would slow things down.
And yes, it already replaces folders with their executeable "default.ext".
Which scripts are these that are creating bogus folders - the scripts should only create stuff in their own folder IMO.
Posts: 2,288
Joined: Nov 2005
Reputation:
5
it would seem one or more create "HTTPCache". I will try and figure out which one does this.
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
and the biggest problem is that doing something like that invalidates
genre/script/
kind of folder layouts. which was the reason we did the original change in my programs (to allow genres/categorizing games).
unless we go recursive and that is really out of the picture.