mirror of
https://github.com/Yuvi9587/Kemono-Downloader.git
synced 2025-12-17 15:36:51 +00:00
Commit
This commit is contained in:
parent
ea84750f05
commit
aa176afdb7
78
note.md
78
note.md
@ -1,30 +1,30 @@
|
|||||||
# 🛠️ KemonoDownloader Refactor Notes
|
# 🛠️ 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/
|
KemonoDownloader/
|
||||||
├── main.py # Entry point of the application
|
├── main.py # Where the app starts
|
||||||
├── requirements.txt # Python dependencies
|
├── requirements.txt # List of Python libraries used
|
||||||
├── assets/ # Static files like icons
|
├── assets/ # Icons and other static files
|
||||||
│ └── Kemono.ico
|
│ └── Kemono.ico
|
||||||
├── data/ # Persistent user data and config
|
├── data/ # Stuff that gets saved (user config, cookies, etc.)
|
||||||
│ ├── creators.json
|
│ ├── creators.json
|
||||||
│ ├── Known.txt
|
│ ├── Known.txt
|
||||||
│ └── cookies.txt
|
│ └── cookies.txt
|
||||||
├── logs/ # Logging output
|
├── logs/ # Error logs and other output
|
||||||
│ └── uncaught_exceptions.log
|
│ └── uncaught_exceptions.log
|
||||||
└── src/ # Main application source code
|
└── src/ # Main code lives here
|
||||||
├── __init__.py
|
├── __init__.py
|
||||||
├── ui/ # UI components
|
├── ui/ # UI-related code
|
||||||
│ ├── __init__.py
|
│ ├── __init__.py
|
||||||
│ ├── main_window.py
|
│ ├── main_window.py
|
||||||
│ └── dialogs/
|
│ └── dialogs/
|
||||||
@ -33,64 +33,64 @@ KemonoDownloader/
|
|||||||
│ ├── CookieHelpDialog.py
|
│ ├── CookieHelpDialog.py
|
||||||
│ ├── DownloadExtractedLinksDialog.py
|
│ ├── DownloadExtractedLinksDialog.py
|
||||||
│ ├── DownloadFinishedDialog.py
|
│ ├── DownloadFinishedDialog.py
|
||||||
│ └── ... (other dialogs)
|
│ └── ... (more dialogs)
|
||||||
├── core/ # Core logic and app engine
|
├── core/ # The brain of the app
|
||||||
│ ├── __init__.py
|
│ ├── __init__.py
|
||||||
│ ├── manager.py
|
│ ├── manager.py
|
||||||
│ ├── workers.py
|
│ ├── workers.py
|
||||||
│ └── api_client.py
|
│ └── api_client.py
|
||||||
├── services/ # Download services and tools
|
├── services/ # Downloading stuff happens here
|
||||||
│ ├── __init__.py
|
│ ├── __init__.py
|
||||||
│ ├── drive_downloader.py
|
│ ├── drive_downloader.py
|
||||||
│ └── multipart_downloader.py
|
│ └── multipart_downloader.py
|
||||||
├── utils/ # Utility/helper functions
|
├── utils/ # Helper functions
|
||||||
│ ├── __init__.py
|
│ ├── __init__.py
|
||||||
│ ├── file_utils.py
|
│ ├── file_utils.py
|
||||||
│ ├── network_utils.py
|
│ ├── network_utils.py
|
||||||
│ └── text_utils.py
|
│ └── text_utils.py
|
||||||
├── config/ # Configuration and constants
|
├── config/ # Constants and settings
|
||||||
│ ├── __init__.py
|
│ ├── __init__.py
|
||||||
│ └── constants.py
|
│ └── constants.py
|
||||||
└── i18n/ # Internationalization (translation)
|
└── i18n/ # Translations (if needed)
|
||||||
├── __init__.py
|
├── __init__.py
|
||||||
└── translator.py
|
└── translator.py
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## ✅ Goals of This Refactor
|
## ✅ Why Bother Refactoring?
|
||||||
|
|
||||||
- Improve **modularity** and make each component responsible for a specific domain.
|
- Everything’s now broken into smaller parts, so it’s easier to work with.
|
||||||
- Enable easier **testing**, debugging, and maintenance.
|
- Easier to test, fix, and add stuff.
|
||||||
- Prepare the codebase for future **feature expansion**.
|
- Prepping the project to grow without becoming a mess again.
|
||||||
- Make UI and business logic **loosely coupled**.
|
- 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.
|
- Some features don’t work yet or haven’t been tested since the changes.
|
||||||
- Further work is required to:
|
- Still need to:
|
||||||
- Hook up UI components with new logic paths.
|
- Reconnect the UI to the updated logic.
|
||||||
- Validate and migrate old script logic into proper services/core modules.
|
- Move over some of the old script code into proper modules.
|
||||||
- Ensure settings and cookies persist correctly through the new configuration and data layers.
|
- Make sure settings and cookies work properly in the new setup.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 📌 Next Steps
|
## 📌 To-Do List
|
||||||
|
|
||||||
- Review and test all dialogs and UI flows.
|
- Test all the dialogs and UI stuff.
|
||||||
- Validate downloader services and API integrations.
|
- Make sure the download services and API calls are working.
|
||||||
- Reconnect UI with backend logic through the `core/manager.py`.
|
- Reconnect the UI with the new logic in `core/manager.py`.
|
||||||
- Add unit tests and logging as needed.
|
- 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.
|
- Feel free to open an issue if you're using this.
|
||||||
- Or **let me know directly** — feedback is super helpful during this refactor!
|
- 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.
|
||||||
@ -5292,9 +5292,6 @@ class DownloaderApp (QWidget ):
|
|||||||
|
|
||||||
main_download_dir =self .dir_input .text ().strip ()
|
main_download_dir =self .dir_input .text ().strip ()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
should_create_artist_folder =False
|
should_create_artist_folder =False
|
||||||
if item_type =='creator_popup_selection'and item_scope ==EmptyPopupDialog .SCOPE_CREATORS :
|
if item_type =='creator_popup_selection'and item_scope ==EmptyPopupDialog .SCOPE_CREATORS :
|
||||||
should_create_artist_folder =True
|
should_create_artist_folder =True
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user