Open superolmo opened 1 year ago
@mtwebster I reopened a new PR with the same content as in PR #273 to clean up my commit history
I noticed I can get a free trial: https://xtreamnet-iptv.com/product-detail/xtream-iptv-12h-trial
Do you know which type of device I should select? It gives me a choice of M3U among others.
The interface is not intuitive. I would guess M3U first, second could be Activate Codes. I have asked users that opened issues reports related to Xtream API to test the PR, but so far no answers.
@superolmo Thought I'd mention this reasonably current library I came across in case you've not already seen it. Looks nicely structured and may offer some insight into the xstream codes api. (I found it when trying to understand what the xstream codes api was - now I know a little bit more but not enough to help just yet). https://github.com/tellytv/go.xtream-codes.git
Thanks @mozotech. Unfortunately, each provider slightly modified the API to suit their needs. That is why you have some implementations that works for some providers but not others. Then you have the problem that the providers themselves completely skip fields. Nevertheless, looking at someone else implementation might trigger some new ideas.
Ok.. I got it working at first - some observations/issues:
The root cause of the crashes are not this PR, though it seems to be exposing the issue.
In Gtk programs, all gui-related Gtk calls must be done in the main thread.
In hypnotix.py, any functions decorated with @async_function are running on a separate thread, and there's a lot of gui interaction occurring, any of which could trigger the error. The fact that there are so many xtream channels is triggering this more.
Did you get any crashes like this during testing?
I'll see if I can de-tangle this later when I get a chance.
Ok I made a PR on this PR which avoids any gtk calls inside of worker threads. I think the main issue was due to changing the cursor type during reloading - hopefully I didn't break anything, I'm not super familiar with this app.
My adjusted observations after fixing all that:
I managed to get a 12-hour test account also so I could try having multiple xtream accounts, but I have the same issue as reloading - failed authentication.
The first account loads fine, then the 2nd one fails. Trying to reload, they both end up failing.
Ok the issue was that Xtream.state was class-wide, not instance, so authentication was never being attempted past the initial one.
I added another commit to my PR to make multiple accounts work properly. https://github.com/superolmo/hypnotix/pull/4
Awesome @mtwebster ! Let me tested on my hand and push to this PR.
I can't use my account any more, but I think the only remaining issue was refreshing when leaving preferences if any were changed (like parental control).
@superolmo I can confirm that this PR fixes issues I was having with the current version. The fix for me was missing headers when authenticating, which I had fixed locally before finding this PR.
why you dont merge this pr? i tested it, it fix/enhance a lot of things even if it's not perfect, i would like to have these fix in release and stop applying your changes manually each time there is a release...
@1b0u I am not allowed to merge this PR. It requires someone who has the access rights to do so.
@mtwebster please merge this :)