static void *htsp_server, *htsp_server_2;
-#define HTSP_PROTO_VERSION 33
+#define HTSP_PROTO_VERSION 34
#define HTSP_ASYNC_OFF 0x00
#define HTSP_ASYNC_ON 0x01
*
*/
static const char *
-htsp_image(htsp_connection_t *htsp, const char *image, char *buf, size_t buflen)
+htsp_image(htsp_connection_t *htsp, const char *image,
+ char *buf, size_t buflen, int version)
{
const char *ret = image;
const int id = imagecache_get_id(image);
/* Handle older clients */
if (id) {
- if (htsp->htsp_version < 8) {
+ if (htsp->htsp_version < version) {
struct sockaddr_storage addr;
socklen_t addrlen;
char abuf[50];
htsmsg_add_str(out, "channelName", channel_get_name(ch, channel_blank_name));
if ((icon = channel_get_icon(ch)))
- htsmsg_add_str(out, "channelIcon", htsp_image(htsp, icon, buf, sizeof(buf)));
+ htsmsg_add_str(out, "channelIcon", htsp_image(htsp, icon, buf, sizeof(buf), 8));
now = ch->ch_epg_now;
next = ch->ch_epg_next;
htsmsg_add_str(out, "tagName", ct->ct_name);
icon = channel_tag_get_icon(ct);
if (!strempty(icon))
- htsmsg_add_str(out, "tagIcon", htsp_image(htsp, icon, buf, sizeof(buf)));
+ htsmsg_add_str(out, "tagIcon", htsp_image(htsp, icon, buf, sizeof(buf), 34));
htsmsg_add_u32(out, "tagTitledIcon", ct->ct_titled_icon);
if(members != NULL) {
*/
const char *image = dvr_entry_get_image(de);
if(!strempty(image))
- htsmsg_add_str(out, "image", htsp_image(htsp, image, buf, sizeof(buf)));
+ htsmsg_add_str(out, "image", htsp_image(htsp, image, buf, sizeof(buf), 34));
/* htsmsg camelcase to be compatible with other names */
image = de->de_fanart_image;
if(!strempty(image))
- htsmsg_add_str(out, "fanartImage", htsp_image(htsp, image, buf, sizeof(buf)));
+ htsmsg_add_str(out, "fanartImage", htsp_image(htsp, image, buf, sizeof(buf), 34));
if (de->de_copyright_year)
htsmsg_add_u32(out, "copyrightYear", de->de_copyright_year);
epg_broadcast_get_epnum(e, &epnum);
htsp_serialize_epnum(out, &epnum, NULL);
if (!strempty(e->image))
- htsmsg_add_str(out, "image", htsp_image(htsp, e->image, buf, sizeof(buf)));
+ htsmsg_add_str(out, "image", htsp_image(htsp, e->image, buf, sizeof(buf), 34));
if (e->channel) {
LIST_FOREACH(de, &e->channel->ch_dvrs, de_channel_link) {