Fix: Critical issues with placeholder replacement, caption input, metadata, and thumbnails
Thaimozhi
34f17fb
- Fix placeholder replacement: Use simple string.replace() instead of broken regex escaping
- Was using r'\{season\}' which never matched {season}
- Caused S{}season output instead of proper season number
- Fix caption input handler: Add filters.text & ~filters.command to exclude /settings, /trim, /mediainfo
- Prevents commands from being captured as caption input
- Resolves FFmpeg errors with corrupted filenames
- Fix metadata handling: Only add metadata if values exist (null check)
- Prevents FFmpeg errors from empty metadata strings
- Fix thumbnail processing: Add None check to handle cases with no thumbnail
- Prevents processing errors when thumbnail is not available
- Handles both custom and auto-generated thumbnails properly
This fixes:
- Settings button capturing /settings as caption
- Trim/mediainfo corrupting filenames in metadata processing
- Season/episode placeholders not being replaced
Feat: Fix caption filename and improve MediaInfo structure
Thaimozhi
d88b16c
- Fix caption {filename} variable to use final renamed name (new_filename)
- Add {original_filename} variable to show original uploaded filename
- Improve MediaInfo Telegraph structure with better formatting and organization
- Separate video, audio, and subtitle streams with better display
- Add documentation for audio reorder and metadata settings in caption help text
- Audio reorder format: track indices like '1,0,2' to reorder tracks
- Metadata: Set values in /metadata command, toggle in settings
Fix: Add MessageNotModified error handling to commands and settings
Thaimozhi
c017d68
- Wrap show_main_menu edit_text call to handle duplicate message edits
- Add expandable blockquote syntax documentation to caption settings
- Wrap mediainfo command edit calls to prevent crash on duplicate edits
- Wrap trim/split operations with MESSAGE_NOT_MODIFIED error handlers
- Prevents HF Spaces container crashes during /trim, /mediainfo, settings usage
Fix: Wrap timeout handlers to catch MessageNotModified errors
Thaimozhi
4160fde
- Import MessageNotModified exception in settings.py, trim_split.py, file_rename.py
- Wrap all ListenerTimeout edit_text calls in try-except blocks
- Prevents bot crash when Telegram rejects duplicate message edits during timeout
- Resolves HF Spaces container timeout issue from MESSAGE_NOT_MODIFIED errors