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

No function of the added header for ISA properties with pvr.iptvsimple version v21.8.6 in Kodi Omega (Android, Windows) #887

Closed
werimail opened this issue Aug 30, 2024 · 20 comments · Fixed by #889

Comments

@werimail
Copy link

werimail commented Aug 30, 2024

@CastagnaIT @phunkyfish
Issue #871 (Fixed by #882) does not work with the provided pvr.iptvsimple version v21.8.6 in Kodi Omega (Backport #883 )
The streams:
https://jmp2.uk/plu-64b67f0424ade50008a3be17-alt.m3u8
and
http://88.212.15.27/live/test_ctsport_25p/playlist.m3u8
can no longer be played.

With downgrade to the pvr.iptvsimple version v21.8.5 from here: https://jenkins.kodi.tv/blue/organizations/jenkins/kodi-pvr%2Fpvr.iptvsimple/detail/PR-883/3/artifacts/
playback is possible again.

Kodi-Log:
kodi_debug_isa_prop.log

Greetings werimail

@werimail werimail changed the title No function of the added header for ISA properties with pvr.iptvsimple version v21.8.6 No function of the added header for ISA properties with pvr.iptvsimple version v21.8.6 in Kodi Omega Aug 30, 2024
@CastagnaIT
Copy link
Contributor

the problem its not the addon it works correctly

you are using a bad user agent
2024-08-30 15:35:20.234 T:3832 debug <general>: AddOnLog: inputstream.adaptive: Property found "inputstream.adaptive.stream_headers" value: user-agent=Mozilla%2f5.0

@werimail
Copy link
Author

werimail commented Aug 30, 2024

the problem its not the addon it works correctly

you are using a bad user agent 2024-08-30 15:35:20.234 T:3832 debug <general>: AddOnLog: inputstream.adaptive: Property found "inputstream.adaptive.stream_headers" value: user-agent=Mozilla%2f5.0

Hi @CastagnaIT I've already noticed that with the new version of the IPTV Simple Client (21.8.6) the user agent is displayed "incorrectly" in the log file. This representation is also the same with the “old” version (21.8.5 incl. PR#833). However, the streams work there.
kodi_debug_isa_prop_21_8_8_PR833.log

Greetings werimail

@CastagnaIT
Copy link
Contributor

i tested last version with your playlist and playback works correctly

user agent value is not shown incorrectly, means that you have set a bad value somewhere
if not on the addon setting, you have hardcoded the bad value in the playlist files

@werimail
Copy link
Author

werimail commented Aug 31, 2024

Hi @CastagnaIT I just tested again in a different Android environment: I get an internal error with pvr version 21.8.6 (2024-08-31 21:06:34.976 T:11139 info <general>: CAddonMgr::FindAddons: pvr.iptvsimple v21.8.6 installed). In this version the inputstream.adaptive.manifest_headers variable is missing (except for those defined in the playlist) There only exists 2024-08-31 21:07:15.920 T:11303 debug <general>: AddOnLog: inputstream.adaptive: Property found "inputstream.adaptive.stream_headers" value: user-agent=Mozilla%2f5.0
kodi_debug_pvr_int_err.log

After I install version 21.8.5 with your PR from here over it it works for me. In this version, both required inputstream.adaptive.manifest_headers and inputstream.adaptive.stream_headers variables are also present:

2024-08-31 21:23:18.334 T:15245   debug <general>: AddOnLog: inputstream.adaptive: Property found 
"inputstream.adaptive.stream_headers" value: user-agent=Mozilla%2f5.0
2024-08-31 21:23:18.335 T:15245   debug <general>: AddOnLog: inputstream.adaptive: Property found 
"inputstream.adaptive.manifest_headers" value: user-agent=Mozilla%2f5.0

kodi_debug_pvr_work.log

So there must be some difference between the PR version and the final released version. In my opinion, your fix is ​​missing in the final version. Maybe it's just the environment. I'm currently on Android. Maybe the current version of the pvr addon is "broken" only in Android if it works for you.

EDIT: I was now able to reproduce the same error under Windows. It doesn't seem to be an Android-only problem.
kodi_debug_isa_prob_Win.log

Greetings werimail

@werimail werimail changed the title No function of the added header for ISA properties with pvr.iptvsimple version v21.8.6 in Kodi Omega No function of the added header for ISA properties with pvr.iptvsimple version v21.8.6 in Kodi Omega (Android) Aug 31, 2024
@werimail werimail changed the title No function of the added header for ISA properties with pvr.iptvsimple version v21.8.6 in Kodi Omega (Android) No function of the added header for ISA properties with pvr.iptvsimple version v21.8.6 in Kodi Omega (Android, Windows) Sep 2, 2024
@Uukrull
Copy link

Uukrull commented Sep 2, 2024

Looking at the source code the problem is that all the text in #KODIPROPS after a space is ignored so the header is truncated with the ReadMarkerValue function.

One solution I see is ignore the space condition if marker = KODIPROP_MARKER. Another one is convert the header with https://www.urlencoder.org so a header like Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) will be converted to Mozilla%2F5.0%20%28Windows%20NT%2010.0%3B%20Win64%3B%20x64%29%20AppleWebKit%2F537.36%20%28KHTML%2C%20like%20Gecko%29 with no spaces.

@CastagnaIT
Copy link
Contributor

CastagnaIT commented Sep 3, 2024

thanks i confirm, there is a bug
and affects all kodi props not only for ISA

looks like truncate the line at first space or " for a kind of particular use case, but since nothing documented i have no idea...

if (marker == M3U_GROUP_MARKER && line[markerStart] != '"')
{
//For this case we just want to return the full string without splitting it
//This is because groups use semi-colons and not spaces as a delimiter
return line.substr(markerStart, line.length());
}
char find = ' ';
if (line[markerStart] == '"')
{
find = '"';
markerStart++;
}
size_t markerEnd = line.find(find, markerStart);
if (markerEnd == std::string::npos)
{
markerEnd = line.length();
}
return line.substr(markerStart, markerEnd - markerStart);

for sure this is not needed to all kodi props,
i can try make a solution to see what say the maintainer

@CastagnaIT
Copy link
Contributor

CastagnaIT commented Sep 3, 2024

@werimail
Copy link
Author

werimail commented Sep 3, 2024

if you want test it builds k22: https://jenkins.kodi.tv/blue/organizations/jenkins/kodi-pvr%2Fpvr.iptvsimple/detail/PR-889/1/artifacts

Thanks @CastagnaIT , but a backport for Kodi 21 would be nice here too.

Greetings werimail

@werimail
Copy link
Author

werimail commented Sep 3, 2024

Hi @CastagnaIT , I just tried the backport for Kodi 21 (#890). Unfortunately, this still leads to an internal error and the streams cannot be started despite the defined property.
kodi_debug_pvr_int_err_win.log

EDIT: A cross-check with the version from here showed that it works as desired. Apparently there is an error somewhere else...

Greetings werimail

@CastagnaIT
Copy link
Contributor

CastagnaIT commented Sep 3, 2024

i tried various ways but im not able to reproduce your problem
from your log line
2024-09-03 12:25:16.250 T:13492 debug <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - anonymous-namespace::FormatDateTimeNowOnly - "https://jmp2.uk/plu-64b67f0424ade50008a3be17-alt.m3u8|user-agent=Mozilla/5.0"
user-agent come from addon setting, so you need to check useragent string set on addon settings

@werimail
Copy link
Author

werimail commented Sep 3, 2024

i tried various ways but im not able to reproduce your problem from your log line 2024-09-03 12:25:16.250 T:13492 debug <general>: AddOnLog: pvr.iptvsimple: pvr.iptvsimple - anonymous-namespace::FormatDateTimeNowOnly - "https://jmp2.uk/plu-64b67f0424ade50008a3be17-alt.m3u8|user-agent=Mozilla/5.0" user-agent come from addon setting, so you need to check useragent string set on addon settings

In the PVR addon settings I entered the value “Mozilla/5.0” under “User Agent” and then restarted Kodi. I don't know if this is correct?
But I noticed again in the log file that the second required property (inputstream.adaptive.manifest_headers) does not appear, as if it was not called at all. With the first fixed version from you (here) it works straight away as soon as I install it. Then all the necessary properties are present??

Greetings werimail

@CastagnaIT
Copy link
Contributor

CastagnaIT commented Sep 3, 2024

In the PVR addon settings I entered the value “Mozilla/5.0” under “User Agent” and then restarted Kodi. I don't know if this is correct?

you have set a malformed useragent string...
open this on your browser https://whatmyuseragent.com/
and add a correct full string

@werimail
Copy link
Author

werimail commented Sep 3, 2024

In the PVR addon settings I entered the value “Mozilla/5.0” under “User Agent” and then restarted Kodi. I don't know if this is correct?

you have set a malformed useragent string... open this on your browser https://whatmyuseragent.com/ and add a correct full string

Ok @CastagnaIT I tried the following entry after calling up the page mentioned:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 Edg/128.0.0.0
Unfortunately still the same problem, what else am I doing wrong or which entry are you using so that it works for you???
kodi.log

@CastagnaIT
Copy link
Contributor

i found the other problem, i pushed a wrong commit to kodi 21 branch on the last version
i didn't realise because of the similar titles but the code is slight different
this k21 build should work
https://jenkins.kodi.tv/blue/organizations/jenkins/kodi-pvr%2Fpvr.iptvsimple/detail/PR-890/2/artifacts

@werimail
Copy link
Author

werimail commented Sep 3, 2024

i found the other problem, i pushed a wrong commit to kodi 21 branch on the last version i didn't realise because of the similar titles but the code is slight different this k21 build should work https://jenkins.kodi.tv/blue/organizations/jenkins/kodi-pvr%2Fpvr.iptvsimple/detail/PR-890/2/artifacts

Yippee......,that was exactly the problem, now it works for me too. Thank you again @CastagnaIT for your support!

Greetings werimail

@CastagnaIT
Copy link
Contributor

yeah finally

@werimail
Copy link
Author

werimail commented Sep 3, 2024

by the way: Now it works also with a malformed useragent string... e.g. “Mozilla/5.0”.

@werimail
Copy link
Author

werimail commented Sep 6, 2024

Hi @CastagnaIT, I noticed one thing. I use, among other things: Kodi (21) also on iOS, I noticed that the options for streaming under "Advanced" as well as user agent etc. are completely missing in the pvr.iptvsimple addon. Is there a specific reason for this?

Bildschirmfoto 2024-09-06 um 12 08 22 Bildschirmfoto 2024-09-06 um 12 09 20

Greetings werimail

@phunkyfish
Copy link
Member

Hi @CastagnaIT, I noticed one thing. I use, among other things: Kodi (21) also on iOS, I noticed that the options for streaming under "Advanced" as well as user agent etc. are completely missing in the pvr.iptvsimple addon. Is there a specific reason for this?

Bildschirmfoto 2024-09-06 um 12 08 22 Bildschirmfoto 2024-09-06 um 12 09 20
Greetings werimail

Try changing the settings level in the bottom left corner.

@werimail
Copy link
Author

werimail commented Sep 6, 2024

Hi @CastagnaIT, I noticed one thing. I use, among other things: Kodi (21) also on iOS, I noticed that the options for streaming under "Advanced" as well as user agent etc. are completely missing in the pvr.iptvsimple addon. Is there a specific reason for this?
Bildschirmfoto 2024-09-06 um 12 08 22 Bildschirmfoto 2024-09-06 um 12 09 20
Greetings werimail

Try changing the settings level in the bottom left corner.

Thanks @phunkyfish with the "expert" setting the options are visible

Bildschirmfoto 2024-09-06 um 14 13 23

Greetings werimail

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

Successfully merging a pull request may close this issue.

4 participants