Skip to content

Refactor code and apply minor fixes - #22

Merged
An0n-00 merged 3 commits into
mainfrom
dev
Apr 3, 2026
Merged

Refactor code and apply minor fixes#22
An0n-00 merged 3 commits into
mainfrom
dev

Conversation

@An0n-00

@An0n-00 An0n-00 commented Apr 3, 2026

Copy link
Copy Markdown
Member

This pull request introduces significant improvements to the StreamMafia provider, including support for decrypting encrypted API responses, updates to API endpoints and payload handling, and enhancements to diagnostics and audio track extraction. Additionally, it refines the StreamMafia types for better type safety and updates the stream patterns and quality labeling in related providers.

StreamMafia Provider Decryption and API Handling:

  • Implemented AES-256-GCM decryption for StreamMafia API responses by adding a new decryptStreamMafia function in decrypt.ts, and updated the provider to fetch and decrypt encrypted payloads before parsing the API response (src/providers/streammafia/decrypt.ts, src/providers/streammafia/streammafia.ts) [1] [2] [3].
  • Updated API endpoints, request headers, and result mapping to match the new StreamMafia API, including changes to BASE_URL, EMBED_URL, and payload structure (src/providers/streammafia/streammafia.ts) [1] [2] [3].

Diagnostics and Audio Track Handling:

  • Improved diagnostics by adding messages for inferred audio language, missing sources, and partial scrapes, and enhanced audio track extraction logic to use language fields from the selected payload instead of parsing from titles (src/providers/streammafia/streammafia.ts).

Type Definitions and Parsing Improvements:

  • Refactored and expanded ApiResponse and related types to match the new encrypted API structure, and added a new EncryptedPayload type (src/providers/streammafia/streammafia.types.ts).
  • Improved source type inference and quality normalization for media streams, adding support for more file extensions and refining quality labels (src/providers/streammafia/streammafia.ts) [1] [2].

Other Provider and Pattern Updates:

  • Updated the Uembed provider to use 'Auto' instead of 'Unknown' for unspecified quality labels (src/providers/uembed/uembed.ts) [1] [2].
  • Added a new domain to the streamPatterns list for stream matching (src/streamPatterns.ts).

@An0n-00 An0n-00 self-assigned this Apr 3, 2026
@An0n-00 An0n-00 added the enhancement New feature or request label Apr 3, 2026
@An0n-00
An0n-00 merged commit 0d316c0 into main Apr 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant