Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Simple IPTV Client Overriding User-Agent in InputStream Adaptive common_headers #925

Open
lavish440 opened this issue Nov 19, 2024 · 4 comments

Comments

@lavish440
Copy link

The Simple IPTV Client is overriding the User-Agent specified in InputStream Adaptive’s common_headers property. This behavior prevents the custom User-Agent set in InputStream Adaptive from being sent for adaptive streams, and instead, the UA defined in Advanced Settings of the Simple IPTV Client is used.

Steps to Reproduce:

  1. Configure InputStream Adaptive to use a custom User-Agent (UA) by adding it to the common_headers property as outlined in InputStream Adaptive Documentation.
  2. Set up UA in SIPTV's advanced settings
  3. Play a stream
  4. Inspect the network traffic or check the Kodi log to verify which User-Agent is being sent.

Expected Behavior:

  • When a custom User-Agent is set in InputStream Adaptive’s common_headers property, the Simple IPTV Client should not override it and should send the specified UA for the streams.
  • Simple IPTV Client should only override the User-Agent when no UA is provided in InputStream Adaptive's properties, using its own config in that case.

Actual Behaviour:

The Simple IPTV Client is overriding the User-Agent specified in InputStream Adaptive's common_headers property, even when a custom UA is defined. This causes the Simple IPTV Client to send the User-Agent defined in its Advanced Settings, which can cause issues.

Additional Information:

  • Kodi Version: 22.r1532.g65703fe-1

  • ISA Version: 22.1.9

  • SIPTV Version: 22.4.1

  • The common_headers property in InputStream Adaptive was introduced in this PR.

  • After reviewing the code in the SIPTV source file, it is clear that the current implementation only handles manifest headers and stream headers.

@phunkyfish
Copy link
Member

phunkyfish commented Nov 19, 2024

This is not a bug, iptvsimple is upstream from IA and has no control over IA properties and what we they are.

Why set a user agent in advanced settings if IA wants to set one anyway?

If IA wants to handle things differently, their maintainer is more than welcome to open a PR. But to be honest just don’t set it in advanced settings in the first place.

@CastagnaIT FYI

@CastagnaIT
Copy link
Contributor

common_headers has been recently introduced to ISA so new feature
and this addon currently dont use it

the old properties to set headers will have always the priority over the new "common_headers"
are different uses, and this is expected behaviour

but its possible make a change to StreamUtils.cpp to use the new "common_headers"

@phunkyfish
Copy link
Member

common_headers has been recently introduced to ISA so new feature and this addon currently dont use it

the old properties to set headers will have always the priority over the new "common_headers" are different uses, and this is expected behaviour

but its possible make a change to StreamUtils.cpp to use the new "common_headers"

Cool, if you want to add support to iptvsimple for this, happy to review the PR.

@CastagnaIT
Copy link
Contributor

I will take a look next week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants