diff --git a/note.md b/note.md index 7bde29d..708559a 100644 --- a/note.md +++ b/note.md @@ -1,30 +1,30 @@ # πŸ› οΈ KemonoDownloader Refactor Notes -## Overview +## What's Going On -The project was previously a large monolithic App Script, which made it difficult to maintain and scale. This version introduces a cleaner and more modular file structure to improve readability, separation of concerns, and future extensibility. +This project used to be one giant messy App Script. It worked, but it was hard to maintain or expand. So I cleaned it up and split everything into smaller, more manageable files to make it easier to read, update, and add new stuff later. -**⚠️ Note:** Due to the ongoing refactor, some features may not work as expected. The code has been reorganized into a more maintainable layout, but certain logic or dependencies might still require updates to fully function in this new structure. +**⚠️ Heads up:** Since I'm still in the middle of refactoring things, some features might be broken or not working right now. The layout is better, but I still need to update some parts of the logic and dependencies. --- -## πŸ“ Project Structure +## πŸ“ Folder Layout -```plaintext +``` KemonoDownloader/ -β”œβ”€β”€ main.py # Entry point of the application -β”œβ”€β”€ requirements.txt # Python dependencies -β”œβ”€β”€ assets/ # Static files like icons +β”œβ”€β”€ main.py # Where the app starts +β”œβ”€β”€ requirements.txt # List of Python libraries used +β”œβ”€β”€ assets/ # Icons and other static files β”‚ └── Kemono.ico -β”œβ”€β”€ data/ # Persistent user data and config +β”œβ”€β”€ data/ # Stuff that gets saved (user config, cookies, etc.) β”‚ β”œβ”€β”€ creators.json β”‚ β”œβ”€β”€ Known.txt β”‚ └── cookies.txt -β”œβ”€β”€ logs/ # Logging output +β”œβ”€β”€ logs/ # Error logs and other output β”‚ └── uncaught_exceptions.log -└── src/ # Main application source code +└── src/ # Main code lives here β”œβ”€β”€ __init__.py - β”œβ”€β”€ ui/ # UI components + β”œβ”€β”€ ui/ # UI-related code β”‚ β”œβ”€β”€ __init__.py β”‚ β”œβ”€β”€ main_window.py β”‚ └── dialogs/ @@ -33,64 +33,64 @@ KemonoDownloader/ β”‚ β”œβ”€β”€ CookieHelpDialog.py β”‚ β”œβ”€β”€ DownloadExtractedLinksDialog.py β”‚ β”œβ”€β”€ DownloadFinishedDialog.py - β”‚ └── ... (other dialogs) - β”œβ”€β”€ core/ # Core logic and app engine + β”‚ └── ... (more dialogs) + β”œβ”€β”€ core/ # The brain of the app β”‚ β”œβ”€β”€ __init__.py β”‚ β”œβ”€β”€ manager.py β”‚ β”œβ”€β”€ workers.py β”‚ └── api_client.py - β”œβ”€β”€ services/ # Download services and tools + β”œβ”€β”€ services/ # Downloading stuff happens here β”‚ β”œβ”€β”€ __init__.py β”‚ β”œβ”€β”€ drive_downloader.py β”‚ └── multipart_downloader.py - β”œβ”€β”€ utils/ # Utility/helper functions + β”œβ”€β”€ utils/ # Helper functions β”‚ β”œβ”€β”€ __init__.py β”‚ β”œβ”€β”€ file_utils.py β”‚ β”œβ”€β”€ network_utils.py β”‚ └── text_utils.py - β”œβ”€β”€ config/ # Configuration and constants + β”œβ”€β”€ config/ # Constants and settings β”‚ β”œβ”€β”€ __init__.py β”‚ └── constants.py - └── i18n/ # Internationalization (translation) + └── i18n/ # Translations (if needed) β”œβ”€β”€ __init__.py └── translator.py ``` --- -## βœ… Goals of This Refactor +## βœ… Why Bother Refactoring? -- Improve **modularity** and make each component responsible for a specific domain. -- Enable easier **testing**, debugging, and maintenance. -- Prepare the codebase for future **feature expansion**. -- Make UI and business logic **loosely coupled**. +- Everything’s now broken into smaller parts, so it’s easier to work with. +- Easier to test, fix, and add stuff. +- Prepping the project to grow without becoming a mess again. +- Separated the UI from the app logic so they don’t get tangled. --- -## 🚧 Known Issues +## 🚧 What’s Still Broken -- Some features are currently broken or untested in this structure. -- Further work is required to: - - Hook up UI components with new logic paths. - - Validate and migrate old script logic into proper services/core modules. - - Ensure settings and cookies persist correctly through the new configuration and data layers. +- Some features don’t work yet or haven’t been tested since the changes. +- Still need to: + - Reconnect the UI to the updated logic. + - Move over some of the old script code into proper modules. + - Make sure settings and cookies work properly in the new setup. --- -## πŸ“Œ Next Steps +## πŸ“Œ To-Do List -- Review and test all dialogs and UI flows. -- Validate downloader services and API integrations. -- Reconnect UI with backend logic through the `core/manager.py`. -- Add unit tests and logging as needed. +- Test all the dialogs and UI stuff. +- Make sure the download services and API calls are working. +- Reconnect the UI with the new logic in `core/manager.py`. +- Add more logging and maybe some unit tests too. --- -## πŸ“£ Found a Bug or Issue? +## 🐞 Found a Bug? -If you find something broken or not working as expected: +If something's busted: -- **Open an issue** on the repository so it can be tracked. -- Or **let me know directly** β€” feedback is super helpful during this refactor! +- Feel free to open an issue if you're using this. +- Or just message me. Feedback helps a lot while I’m still figuring things out. -Thanks for your patience and support during this restructuring! +Thanks for checking it out! Still a work in progress, but getting there. \ No newline at end of file diff --git a/src/ui/main_window.py b/src/ui/main_window.py index 59badf1..e26dc66 100644 --- a/src/ui/main_window.py +++ b/src/ui/main_window.py @@ -5292,9 +5292,6 @@ class DownloaderApp (QWidget ): main_download_dir =self .dir_input .text ().strip () - - - should_create_artist_folder =False if item_type =='creator_popup_selection'and item_scope ==EmptyPopupDialog .SCOPE_CREATORS : should_create_artist_folder =True