* Fix SRT caption support with the latest Samsung Series D firmware.
This commit is contained in:
parent
84d4a0f3f1
commit
345ecb9d22
@ -286,6 +286,7 @@ intervening space) by either an integer or the keyword "infinite". */
|
|||||||
}
|
}
|
||||||
else if(strncasecmp(line, "User-Agent", 10)==0)
|
else if(strncasecmp(line, "User-Agent", 10)==0)
|
||||||
{
|
{
|
||||||
|
char *s;
|
||||||
/* Skip client detection if we already detected it. */
|
/* Skip client detection if we already detected it. */
|
||||||
if( h->req_client )
|
if( h->req_client )
|
||||||
goto next_header;
|
goto next_header;
|
||||||
@ -304,13 +305,13 @@ intervening space) by either an integer or the keyword "infinite". */
|
|||||||
h->reqflags |= FLAG_DLNA;
|
h->reqflags |= FLAG_DLNA;
|
||||||
h->reqflags |= FLAG_MIME_AVI_DIVX;
|
h->reqflags |= FLAG_MIME_AVI_DIVX;
|
||||||
}
|
}
|
||||||
else if(strstrc(p, "SEC_HHP_", '\r'))
|
else if((s=strstrc(p, "SEC_HHP_", '\r')))
|
||||||
{
|
{
|
||||||
h->req_client = ESamsungSeriesC;
|
h->req_client = ESamsungSeriesC;
|
||||||
h->reqflags |= FLAG_SAMSUNG;
|
h->reqflags |= FLAG_SAMSUNG;
|
||||||
h->reqflags |= FLAG_DLNA;
|
h->reqflags |= FLAG_DLNA;
|
||||||
h->reqflags |= FLAG_NO_RESIZE;
|
h->reqflags |= FLAG_NO_RESIZE;
|
||||||
if(strstrc(p, "SEC_HHP_TV", '\r'))
|
if(strstrc(s+8, "TV", '\r'))
|
||||||
h->reqflags |= FLAG_SAMSUNG_TV;
|
h->reqflags |= FLAG_SAMSUNG_TV;
|
||||||
}
|
}
|
||||||
else if(strncmp(p, "SamsungWiselinkPro", 18)==0)
|
else if(strncmp(p, "SamsungWiselinkPro", 18)==0)
|
||||||
|
20
upnpsoap.c
20
upnpsoap.c
@ -929,6 +929,15 @@ callback(void *args, int argc, char **argv, char **azColName)
|
|||||||
lan_addr[passed_args->iface].str, runtime_vars.port, detailID);
|
lan_addr[passed_args->iface].str, runtime_vars.port, detailID);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case ESamsungSeriesC:
|
||||||
|
if( sql_get_int_field(db, "SELECT ID from CAPTIONS where ID = '%s'", detailID) > 0 )
|
||||||
|
{
|
||||||
|
ret = strcatf(str, "<sec:CaptionInfoEx sec:type=\"srt\">"
|
||||||
|
"http://%s:%d/Captions/%s.srt"
|
||||||
|
"</sec:CaptionInfoEx>",
|
||||||
|
lan_addr[passed_args->iface].str, runtime_vars.port, detailID);
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1119,16 +1128,21 @@ BrowseContentDirectory(struct upnphttp * h, const char * action)
|
|||||||
if( strncmp(ObjectID, MUSIC_PLIST_ID, strlen(MUSIC_PLIST_ID)) == 0 )
|
if( strncmp(ObjectID, MUSIC_PLIST_ID, strlen(MUSIC_PLIST_ID)) == 0 )
|
||||||
{
|
{
|
||||||
if( strcmp(ObjectID, MUSIC_PLIST_ID) == 0 )
|
if( strcmp(ObjectID, MUSIC_PLIST_ID) == 0 )
|
||||||
asprintf(&orderBy, "order by d.TITLE");
|
ret = asprintf(&orderBy, "order by d.TITLE");
|
||||||
else
|
else
|
||||||
asprintf(&orderBy, "order by length(OBJECT_ID), OBJECT_ID");
|
ret = asprintf(&orderBy, "order by length(OBJECT_ID), OBJECT_ID");
|
||||||
}
|
}
|
||||||
else if( args.client == ERokuSoundBridge )
|
else if( args.client == ERokuSoundBridge )
|
||||||
{
|
{
|
||||||
#ifdef __sparc__
|
#ifdef __sparc__
|
||||||
if( totalMatches < 10000 )
|
if( totalMatches < 10000 )
|
||||||
#endif
|
#endif
|
||||||
asprintf(&orderBy, "order by o.CLASS, d.DISC, d.TRACK, d.TITLE");
|
ret = asprintf(&orderBy, "order by o.CLASS, d.DISC, d.TRACK, d.TITLE");
|
||||||
|
}
|
||||||
|
if( ret == -1 )
|
||||||
|
{
|
||||||
|
orderBy = NULL;
|
||||||
|
ret = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* If it's a DLNA client, return an error for bad sort criteria */
|
/* If it's a DLNA client, return an error for bad sort criteria */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user