Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
htsp: fix the channelIcon for current clients
  • Loading branch information
perexg committed Oct 2, 2014
1 parent 4f7e928 commit 38b2e31
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/htsp_server.c
Expand Up @@ -71,7 +71,7 @@

static void *htsp_server, *htsp_server_2;

#define HTSP_PROTO_VERSION 14
#define HTSP_PROTO_VERSION 15

#define HTSP_ASYNC_OFF 0x00
#define HTSP_ASYNC_ON 0x01
Expand Down Expand Up @@ -586,6 +586,14 @@ htsp_build_channel(channel_t *ch, const char *method, htsp_connection_t *htsp)
snprintf(url+p, sizeof(url)-p, "/%s", icon);
htsmsg_add_str(out, "channelIcon", url);
} else {
if (htsp->htsp_version < 15) {
/* older clients expects '/imagecache/' */
static char buf[64];
if (strncmp(icon, "imagecache/", 11) == 0) {
snprintf(buf, sizeof(buf), "/%s", icon);
icon = buf;
}
}
htsmsg_add_str(out, "channelIcon", icon);
}
}
Expand Down

3 comments on commit 38b2e31

@ksooo
Copy link
Contributor

@ksooo ksooo commented on 38b2e31 Oct 2, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the incompatible api change introduced by Adam actually intended our is it just a bug? if the latter is the case no http version bump would be necessary. @adamsutton?

@perexg
Copy link
Contributor Author

@perexg perexg commented on 38b2e31 Oct 2, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ksooo : The clients should take the channelIcon as regular URLs... so the check in clients is wrong.. the relative url without starting '/' is OK...

I bumbed the version to keep the compatibility until clients are not updated...

@ksooo
Copy link
Contributor

@ksooo ksooo commented on 38b2e31 Oct 2, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK.

BTW: Do you have plans to check into peoples timeshifting problems? Many complaints here in forums, I submitted a ticket, ... At the moment nobody actually knows whether the problem lies in XBMC, PVR addon or tvh. I tried to find out myself but was failing badly.

Please sign in to comment.