How criticalsession/magic-episode-sort-v2 works
Main Components
a. User Interface Layer (WPF Application)
• XAML-based UI components (MainWindow, Preferences, EditSources, etc.)
• MVVM pattern implementation
b. Core Business Logic Layer ("TheMagic" directory)
• File Processing Components
• Series Management
• Settings Management
• External API Integration
c. Data Persistence Layer
• SQLite Database (MESDB.db)
• Settings Storage
Key Relationships to Illustrate
[UI Layer (WPF)] ↔ [Business Logic Layer] ↔ [Data Layer]
UI Layer Components:
MainWindow → EditSources
• → Preferences
• → EditCustomSeriesTitles
• → EditSkipDirectories
• → SortFailed
• → About
Business Logic Components:
SeriesTitleExtractor ↔ TVMazeAPI
EpisodeMover ↔ Directree/Targetree
SettingsManager ↔ Models
Data Layer Components:
MESDBHandler ← Models
Settings Storage ← SettingsManager
Important Elements
• Blue: UI Components
• Green: Business Logic
• Yellow: Data Storage
• Purple: External Services (TVMaze API)
b. Component Relationships:
Specific Implementation Details
• File processing flow (VideoFile → SeriesTitleExtractor → EpisodeMover)
• Settings management (SettingsManager interaction with Models)
• External API integration (TVMazeAPI)
• Database operations (MESDBHandler)
Key Architectural Patterns
• MVVM Pattern (WPF implementation)
• Repository Pattern (for database access)
• Service Layer Pattern (TVMazeAPI integration)
Technical Stack Indicators
Technology badges or labels:
• .NET (WPF)
• SQLite
• TVMaze API
• Windows Installer