Open fenduru opened 10 years ago
This would definitely improve the code structure. I like this!
Wow, I totally agree with you on this !
I considered this when I reorganized all the files.
However one reason i didnt go for it was because of the way CherryPy handles static files. You define the folder holding the static files. So you would need to specify all the css folders all the js folders and so on in the code. Which i found was ineffective.
@mbw2001 You are right, i forgot. You need to declare the static files-folder in cherryPy config. Maybe we can construct the static-files object for cherryPy dynamicly based on the loaded modules?
Currently, "modules" aren't really modular, since they have files all over the place. For instance, the couchpotato module has a file in
And is also hardcoded into dash.html, dash.js, Htpc.py, and settings.html
Having files and references scattered like this makes it hard to improve existing modules or write new ones. I think reorganizing the module setup would greatly improve the community around this application. 3rd party modules could be installed simply by copying a folder, and removed just as easily.
I envision a file structure looking something like:
Then something like:
Then we wouldn't have to worry about hardcoding anything, we could just iterate over the list of loaded modules.
If this issue is accepted and someone wants to brainstorm the details with me I'd be able to implement this.