kiddac / XStreamity

Enigma2 plugin is for playing official Xtream Codes IPTV playlists.
41 stars 27 forks source link

TypeError: 'NoneType' object is not iterable #21

Closed marechenok closed 2 years ago

marechenok commented 2 years ago

When trying open Catchup category the app crashes with this log:

Full error trace:

Traceback (most recent call last):
 File "/usr/lib/enigma2/python/Components/ActionMap.py", line 49, in action
 File "/usr/lib/enigma2/python/Plugins/Extensions/XStreamity/menu.py", line 285, in __next__
   self.session.open(channels.XStreamity_Categories, "catchup")
 File "/usr/lib/enigma2/python/mytest.py", line 300, in open
   self.execBegin()
 File "/usr/lib/enigma2/python/mytest.py", line 221, in execBegin
   c.execBegin()
 File "/usr/lib/enigma2/python/Screens/Screen.py", line 77, in execBegin
 File "/usr/lib/enigma2/python/Plugins/Extensions/XStreamity/channels.py", line 461, in createSetup
   self.getCategories()
 File "/usr/lib/enigma2/python/Plugins/Extensions/XStreamity/channels.py", line 532, in getCategories
   archivelist = [x for x in self.liveStreamsData if x["tv_archive"] == 1 and x["tv_archive_duration"] != "0" and x["category_id"] not in glob.current_playlist["player_info"]["livehidden"]]
TypeError: 'NoneType' object is not iterable

https://github.com/kiddac/XStreamity/blob/02d29e061c85f66be5379a0ccfdf93f56d13dde1/XStreamity/usr/lib/enigma2/python/Plugins/Extensions/XStreamity/channels.py#L532

Meanwhile on the server where located XC api I see following request:

12:41:00 GET /player_api.php?username=user111&password=passs111&action=get_live_streams HTTP/1.1 "200" 30929 "-" "Twisted client"
12:41:15 GET /player_api.php?username=user111&password=passs111&action=get_live_streams HTTP/1.1 "499" 0 "-" "Enigma2 - XStreamity Plugin"

Where code 499 looks like client closed connection. I've changed channels.py to make few requests to this endpoint, but all of them coming with 499 code and don't load any data.

marechenok commented 2 years ago

Looks like to low timeout in function:

https://github.com/kiddac/XStreamity/blob/02d29e061c85f66be5379a0ccfdf93f56d13dde1/XStreamity/usr/lib/enigma2/python/Plugins/Extensions/XStreamity/channels.py#L1105

kiddac commented 2 years ago

I have updated the all the downloads now to use the server timeout value as set in main settings