Skip to content

Commit

Permalink
fix except parse json
Browse files Browse the repository at this point in the history
File
"/usr/lib/enigma2/python/Plugins/Extensions/IPtvDream/api/playlist.py",
line 56, in setChannelsList
    self._downloadTvgMap()
  File
"/usr/lib/enigma2/python/Plugins/Extensions/IPtvDream/api/m3u.py", line
96, in _downloadTvgMap
    self.tvg_map =
json_loads(self.readHttp(self.site + "/channels"))['data']
  File
"/usr/lib/python3.9/json/__init__.py", line 346, in loads
  File
"/usr/lib/python3.9/json/decoder.py", line 337, in decode
  File
"/usr/lib/python3.9/json/decoder.py", line 355, in
raw_decode
json.decoder.JSONDecodeError: Expecting value: line 1 column
1 (char 0)
  • Loading branch information
Dima73 committed Apr 28, 2024
1 parent 55b2689 commit 5c101ef
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/api/m3u.py
Expand Up @@ -97,10 +97,9 @@ def _downloadTvgMap(self):
except IOError as e:
self.trace("error!", e)
self.tvg_map = {}
#if not "technic.cf" in self.site:
# raise APIException(e)
#else:
# self.tvg_map = {}
except Exception as e:
self.trace("Failed to parse json: %s" % str(e))
self.tvg_map = {}

def makeChannel(self, num, name, url, tvg, logo, rec):
"""
Expand Down

0 comments on commit 5c101ef

Please sign in to comment.