A cross-platform Flutter application for renaming TV show video and subtitle files to Plex-compliant format.
- Batch rename media files to Plex naming convention
- Support custom file pattern matching using Regular Expressions
- Episode offset support (e.g., episode N → N + 12)
- Custom naming format with named groups
- Preview functionality before executing rename
- Support for video and subtitle modes
- Auto-save preferences
- Multi-language support (Traditional Chinese, Simplified Chinese, English)
- Windows
- macOS
- Linux
lib/
├── main.dart # Application entry point
├── config/ # Application configuration
│ └── dependencies.dart # Dependency injection (Riverpod providers)
├── domain/ # Domain Layer - Business logic core
│ ├── models/ # Domain models
│ │ ├── rename_config/
│ │ │ └── rename_config.dart
│ │ └── file_rename_operation/
│ │ └── file_rename_operation.dart
│ ├── services/ # Domain services
│ │ └── plex_naming_util.dart
│ └── use_cases/ # Use cases
│ └── rename/
│ ├── preview_renames_use_case.dart
│ └── execute_rename_use_case.dart
├── data/ # Data Layer
│ ├── repositories/ # Repositories
│ │ └── preferences_repository.dart
│ └── services/ # Data services
│ └── file_renamer_service.dart
├── routing/ # Routing configuration
│ └── router.dart
└── ui/ # UI Layer
├── rename/ # Rename feature UI
│ ├── rename_view.dart
│ ├── view_models/
│ │ └── rename_viewmodel.dart
│ └── widgets/ # UI widgets
│ ├── mode_selector_widget.dart
│ ├── directory_selector_widget.dart
│ ├── file_pattern_field_widget.dart
│ ├── show_name_field_widget.dart
│ ├── title_format_field_widget.dart
│ ├── subtitle_fields_widget.dart
│ ├── season_offset_fields_widget.dart
│ ├── action_buttons_widget.dart
│ ├── error_message_widget.dart
│ └── preview_table_widget.dart
└── core/ # Core UI components
├── themes/
│ └── theme.dart
└── localization/
└── strings.i18n.dart # Generated by slang
This project follows MVVM (Model-View-ViewModel) architecture with Clean Architecture principles:
- Domain Layer: Business logic, domain models, and use cases
- Data Layer: Repositories and data services
- UI Layer: Views, ViewModels, and widgets
- Config Layer: Dependency injection configuration
- Flutter SDK (>=3.0.0)
- Dart SDK
- Navigate to the project directory:
cd media_renamer- Install dependencies:
flutter pub get- Generate slang localization files:
dart run slang- Generate freezed and json_serializable code:
flutter pub run build_runner build --delete-conflicting-outputs- Run the app:
flutter run -d windows # or macos, linuxSupported languages:
- Traditional Chinese (繁體中文)
- Simplified Chinese (简体中文)
- English
Localization files are located in assets/translations/ and generated code is in lib/ui/core/localization/.
- Flutter - UI framework
- hooks_riverpod - State management
- flutter_hooks - React-like hooks for Flutter
- freezed - Code generation for immutable classes
- slang - Localization
- go_router - Routing
- shared_preferences - Local storage
- Third-party packages: Use
package:imports - Internal files: Use relative path imports
Example:
// Third-party
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
// Internal - relative path
import '../../core/localization/strings.i18n.dart';
import '../view_models/rename_viewmodel.dart';This project is for personal use only.