Skip to content

Commit

Permalink
Merge pull request #60 from ksooo/fix-no-channels-crash
Browse files Browse the repository at this point in the history
Fix crash when no channels are returned from pluto API
  • Loading branch information
ksooo authored Mar 22, 2024
2 parents ba7b34f + b12dbd2 commit 888d89c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pvr.plutotv/addon.xml.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="pvr.plutotv"
version="21.0.1"
version="21.0.2"
name="Pluto.tv PVR Client"
provider-name="Team Kodi, flubshi">
<requires>@ADDON_DEPENDS@
Expand Down
3 changes: 3 additions & 0 deletions pvr.plutotv/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
v21.0.2
- Fix crash when no channels are returned from pluto API

v21.0.1
- TM free logo

Expand Down
2 changes: 1 addition & 1 deletion src/PlutotvData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ bool PlutotvData::LoadChannelsData()
kodi::Log(ADDON_LOG_DEBUG, "[load data] GET CHANNELS");

std::string jsonChannels = HttpGet("https://api.pluto.tv/v2/channels.json");
if (jsonChannels.empty())
if (jsonChannels.empty() || jsonChannels == "[]")
{
kodi::Log(ADDON_LOG_ERROR, "[channels] ERROR - empty response");
return false;
Expand Down

0 comments on commit 888d89c

Please sign in to comment.