feat(chat-media): extract chat history timestamps and sender metadata with automated FFmpeg conversion - #3
Open
satsinush wants to merge 6 commits into
Open
Conversation
…h sender logging - Add `get_chat_media_datetime()` to match media IDs with `chat_history.json` for exact UTC timestamps, sender details, and chat titles. - Fall back gracefully to file system timestamps (`st_ctime`/`st_mtime`) and date matching when JSON records are absent. - Pass `-y` and `-nostdin` to FFmpeg calls (`convert_to_mp3`, video operations) to run non-interactively without stdin prompt pauses.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR enhances chat media processing by pulling exact timestamps, sender info, and conversation titles directly from
chat_history.json, while ensuring batch media conversions run seamlessly without manual prompts.Key Changes
1. Chat Media History & Timestamp Resolution (Primary)
get_chat_media_datetime()to resolve timestamps using a 3-tier priority:chat_history.jsonLookup: Matches media IDs (mid) to retrieve exact creation time, sender ("You" vs contact), and chat title.st_ctime/st_mtimeto preserve precise creation time of saved files when JSON metadata isn't available.YYYY-MM-DD).process_chat_media()to output sender details (e.g.(From: You, Chat: Best Friends)).2. Non-Interactive FFmpeg Processing
-yand-nostdinflags acrossconvert_to_mp3(),merge_video_clips(), and overlay functions.Verification
py_compile.chat_history.jsonrecords and verified non-interactive voice message conversion.