Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash when no channels are returned from pluto API #60

Merged
merged 1 commit into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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