Skip to content

Add orderedPreplayParameters to Uplynk#110

Merged
Danesz merged 17 commits intomainfrom
feature/ordered-parameters
Apr 3, 2026
Merged

Add orderedPreplayParameters to Uplynk#110
Danesz merged 17 commits intomainfrom
feature/ordered-parameters

Conversation

@ceyhun-o
Copy link
Copy Markdown
Contributor

@ceyhun-o ceyhun-o commented Feb 6, 2026

This PR solves two problems:

  • Unordered preplay params
  • Missing percent encoding

Unordered preplay params

Problem
Generating a URL with the exact same parameters multiple times might result in different URLs

Cause
Preplay parameters were stored in a Dictionary (aka unordered key-value mapping with unique keys). Since a Dictionary does not have an order. It is impossible to guarantee stable URL generation.

Solution
Store parameters in an array which is ordered. And use the order from the array to generate the URLs

Missing percent encoding

Problem
Characters ?, + and , in the querystring are not percent encoded.

Cause
queryStrings were generated using manual string manipulation.

Solution
To generate query strings we use a combination of


This PR replaces #109.

To do:

  • Add tests for new cases.

@ceyhun-o ceyhun-o added bug Something isn't working enhancement New feature or request labels Feb 6, 2026
@ceyhun-o ceyhun-o changed the title Add orderedPreplayParameters parameters to Uplynk Add orderedPreplayParameters to Uplynk Feb 6, 2026
@Dev1an Dev1an self-assigned this Mar 31, 2026
@Dev1an
Copy link
Copy Markdown
Member

Dev1an commented Mar 31, 2026

Could you review this @therama @Danesz ?

@Dev1an Dev1an requested a review from MattiasBuelens April 1, 2026 11:55
@Dev1an Dev1an requested a review from MattiasBuelens April 1, 2026 12:10
@Dev1an
Copy link
Copy Markdown
Member

Dev1an commented Apr 1, 2026

Summary of this PR.

Two problems:

  • Unordered preplay params
  • Missing percent encoding

Unordered preplay params

Problem
Generating a URL with the exact same parameters multiple times might result in different URLs

Cause
Preplay parameters were stored in a Dictionary (aka unordered key-value mapping with unique keys). Since a Dictionary does not have an order. It is impossible to guarantee stable URL generation.

Solution
Store parameters in an array which is ordered. And use the order from the array to generate the URLs

Missing percent encoding

Problem
Characters ?, + and , in the querystring are not percent encoded.

Cause
queryStrings were generated using manual string manipulation.

Solution
To generate query strings we use a combination of

@MattiasBuelens
Copy link
Copy Markdown
Contributor

Thanks, I've updated the PR description. 🙂

@Danesz Danesz merged commit 508b24c into main Apr 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants