mirror of
https://github.com/shadoll/moma.git
synced 2026-08-28 19:43:28 +00:00
feat: Add conversion and deletion confirmation screens, enhance media panel properties
- Implemented ConvertConfirmScreen for confirming AVI to MKV conversions with audio and subtitle options. - Added DeleteConfirmScreen for confirming file deletions with detailed file information. - Enhanced MediaPanelView to include additional MediaInfo properties such as video, audio, and subtitle tracks. - Updated MediaPanelProperties to extract and display raw MediaInfo track data. - Introduced HelpScreen for user guidance on application features and navigation. - Created OpenScreen for directory path input with validation. - Developed RenameConfirmScreen for renaming files with user confirmation and editing capabilities. - Added SettingsScreen for configuring application settings, including cache TTL and HEVC encoding options. - Updated imports and module exports in views to accommodate new screens.
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
from textual.screen import Screen
|
||||
from textual.widgets import Static, Button
|
||||
from textual.containers import Vertical
|
||||
|
||||
|
||||
class HelpScreen(Screen):
|
||||
def compose(self):
|
||||
try:
|
||||
from importlib.metadata import version
|
||||
app_version = version("renamer")
|
||||
except Exception:
|
||||
app_version = "unknown"
|
||||
|
||||
help_text = f"""
|
||||
Media File Renamer v{app_version}
|
||||
|
||||
A powerful tool for analyzing and renaming media files with intelligent metadata extraction.
|
||||
|
||||
NAVIGATION:
|
||||
• Use arrow keys to navigate the file tree
|
||||
• Right arrow: Expand directory
|
||||
• Left arrow: Collapse directory
|
||||
• Enter/Space: Select file
|
||||
|
||||
ACTIONS:
|
||||
• o: Open directory - Change the scan directory
|
||||
• s: Scan - Refresh the current directory
|
||||
• f: Refresh - Reload metadata for selected file
|
||||
• r: Rename - Rename selected file with proposed name
|
||||
• c: Convert - Convert AVI file to MKV container with metadata
|
||||
• d: Delete - Delete selected file (with confirmation)
|
||||
• p: Expand/Collapse - Toggle expansion of selected directory
|
||||
• m: Toggle Mode - Switch between technical and catalog display modes
|
||||
• ctrl+s: Settings - Open settings window
|
||||
• ctrl+p: Command Palette - Access cache commands and more
|
||||
• h: Help - Show this help screen
|
||||
• q: Quit - Exit the application
|
||||
|
||||
FEATURES:
|
||||
• Automatic metadata extraction from filenames
|
||||
• MediaInfo integration for technical details
|
||||
• Intelligent title, year, and format detection
|
||||
• Support for special editions and collections
|
||||
• Real-time file analysis and renaming suggestions
|
||||
|
||||
FILE ANALYSIS:
|
||||
The app extracts various metadata including:
|
||||
• Movie/series titles and years
|
||||
• Video resolution and frame rates
|
||||
• Audio languages and formats
|
||||
• Special edition information
|
||||
• Collection order numbers
|
||||
• HDR and source information
|
||||
|
||||
Press any key to close this help screen.
|
||||
""".strip()
|
||||
|
||||
with Vertical():
|
||||
yield Static(help_text, id="help_content")
|
||||
yield Button("Close", id="close")
|
||||
|
||||
def on_button_pressed(self, event):
|
||||
if event.button.id == "close":
|
||||
self.app.pop_screen()
|
||||
|
||||
def on_key(self, event):
|
||||
# Close on any key press
|
||||
self.app.pop_screen()
|
||||
Reference in New Issue
Block a user