Closed Onemars closed 3 years ago
It means "Unauthorized". Seems this error message is consistent across all different versions/portals of Stalker. I might implement a proper error message sometime in the future.
Looks like this happens when you don't provide credentials and this application does not perform authorization against Stalker portal.
With latest commits it always attempts to authorize against Stalker portal, therefore producing more appropriate response message, even if username and password is empty. Test latest code and let me know what output you get.
If it still doesn't work - feel free to send me details to erikmnkl@gmail.com so I can debug it. Wireshark dump containing those URLs would be appreciated.
Edit channels.go file
go to line 45 and comment out return "", errors.New("Stalker portal returned invalid link to TV Channel: " + tmp.Js.Cmd)
and replace it with
return tmp.Js.Cmd, nil
thats how i fixed it
Thanks, I will try that and let you know
So you are telling me that this part:
strs := strings.Split(tmp.Js.Cmd, " ")
if len(strs) == 2 {
return strs[1], nil
}
return "", errors.New("Stalker portal returned invalid link to TV Channel: " + tmp.Js.Cmd)
should be this?
strs := strings.Split(tmp.Js.Cmd, " ")
if len(strs) == 2 {
return strs[1], nil
}
return tmp.Js.Cmd, nil
I am fairly sure there was a reason for this logic. Can you share the example of what response Stalker provides?
I am thinking whether this should be more appropriate then (return last "word"). 🤔
strs := strings.Split(tmp.Js.Cmd, " ")
return strs[len(strs)-1], nil
The error appears when streaming in hls
Below fix is submitted with the latest commits:
strs := strings.Split(tmp.Js.Cmd, " ")
return strs[len(strs)-1], nil
Please check and if it doesn't work - open a new issue. Thanks!
request_iptv.go:25: Failed to update channel: invalid character 'A' looking for beginning of value