From 0ea24845eb41719ae0040f5c7e6b31b091113026 Mon Sep 17 00:00:00 2001 From: Justin Maggard Date: Thu, 13 Mar 2014 10:48:41 -0700 Subject: [PATCH] clients: add Asus O!Play support and quirks Asus O!Play reboots with titles longer than 23 characters with some file types when there are subtitles present. So we truncate video file titles with external subtitles. It also supports subtitles in LG fashion, so add that too. --- clients.c | 7 +++++++ clients.h | 1 + upnpsoap.c | 7 +++++++ 3 files changed, 15 insertions(+) diff --git a/clients.c b/clients.c index 85c3246..176f2d3 100644 --- a/clients.c +++ b/clients.c @@ -199,6 +199,13 @@ struct client_type_s client_types[] = EFriendlyName }, + { EAsusOPlay, + FLAG_DLNA | FLAG_MIME_AVI_AVI | FLAG_CAPTION_RES, + "Asus OPlay Mini/Mini+", + "O!Play", + EUserAgent + }, + { EStandardDLNA150, FLAG_DLNA | FLAG_MIME_AVI_AVI, "Generic DLNA 1.5", diff --git a/clients.h b/clients.h index 6849122..9f3e406 100644 --- a/clients.h +++ b/clients.h @@ -73,6 +73,7 @@ enum client_types { ESonyBravia, ESonyInternetTV, EToshibaTV, + EAsusOPlay, EStandardDLNA150, EStandardUPnP }; diff --git a/upnpsoap.c b/upnpsoap.c index 3868f27..e81bb18 100644 --- a/upnpsoap.c +++ b/upnpsoap.c @@ -795,6 +795,12 @@ callback(void *args, int argc, char **argv, char **azColName) else alt_title = NULL; } + /* Asus OPlay reboots with titles longer than 23 characters with some file types. */ + else if( passed_args->client == EAsusOPlay && (passed_args->flags & FLAG_HAS_CAPTIONS) ) + { + if( strlen(title) > 23 ) + title[23] = '\0'; + } } else if( *mime == 'a' ) { @@ -967,6 +973,7 @@ callback(void *args, int argc, char **argv, char **azColName) break; case ESamsungSeriesCDE: case ELGDevice: + case EAsusOPlay: default: if( passed_args->flags & FLAG_HAS_CAPTIONS ) {