Merged
Conversation
Rename intialize_with_byterange to initialize_with_byterange across the module definition and all call sites.
Remove duplicated self.parse_int from MediaItem, PreloadHintItem, and RenditionReportItem in favor of a single definition in the M3u8 module alongside parse_float.
Extract quoted_format, unquoted_format, and boolean_format helpers from DateRangeItem into a shared module. Apply to ContentSteeringItem as the first consumer, replacing server_uri_format and pathway_id_format private methods.
Replace skipped_segments_format and recently_removed_dateranges_format with inline unquoted_format and quoted_format calls.
Replace language_format, value_format, uri_format, and data_id_format with inline quoted_format calls.
Replace uri_format, iv_format, key_format_format, and key_format_versions_format with inline format helper calls. Affects KeyItem and SessionKeyItem.
Replace can_skip_until_format, hold_back_format, and part_hold_back_format with inline unquoted_format calls.
Replace format methods in both classes with inline quoted_format and unquoted_format calls.
Replace ~10 format methods with inline format helper calls. Use boolean_format for autoselect, default, and forced. Remove duplicated to_yes_no private method.
Replace ~12 format methods with inline quoted_format and unquoted_format calls. Split attributes into stream_attributes and media_attributes to stay within ABC size limit.
Switch from private quoted_format/unquoted_format definitions to include AttributeFormatter. Inline single-use format methods into formatted_attributes and interstitial_formats.
Move audio_codec_code, video_codec, and all codec lookup methods into a new Codecs module with class methods. Replace inline conditionals with hash table lookups. PlaylistItem shrinks by ~70 lines.
Normalize level to float before hash lookup so that integer values (e.g. 4) match float keys (e.g. 4.0). Ruby's Hash uses eql? which distinguishes Integer from Float, unlike the == comparisons used before the Codecs extraction.
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.
No description provided.