Replace magic values with named constants and unify yt-dlp H.264 format selection - #1
Draft
ShitijHalder with Copilot wants to merge 2 commits into
Draft
Replace magic values with named constants and unify yt-dlp H.264 format selection#1ShitijHalder with Copilot wants to merge 2 commits into
ShitijHalder with Copilot wants to merge 2 commits into
Conversation
Co-authored-by: ShitijHalder <89300443+ShitijHalder@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add named constant for minimum GitHub token length
Replace magic values with named constants and unify yt-dlp H.264 format selection
Aug 22, 2026
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.
This PR removes several unexplained literals in GitHub integration/retry paths and standardizes yt-dlp format selection so preview and main download flows use the same H.264-first strategy. It also aligns one type annotation with broader Python compatibility guidance.
gh.py: replace magic numbers with named constantsMIN_GITHUB_TOKEN_LENGTH = 30(with rationale comment)GITHUB_COMMIT_RETRY_DELAY_FACTOR = 0.6VIDEOS_JSON_RETRY_DELAY_FACTOR = 0.4ENTRY_VERIFICATION_DELAY_FACTOR = 2.0gh.py: typing compatibility cleanup_load_videos_json_and_shareturn annotation fromtuple[...]toTuple[...]usingtyping.Tuple.tg.py: consolidate and standardize yt-dlp format selectorYT_DLP_H264_PREFERRED_FORMATvcodec!=av01) instead ofvcodec!*=av01.tg.py: align preview download behavior with main flow/get_video_previewdownload command to use the same shared H.264-preferring selector, preventing preview/main codec-selection drift.Original prompt