001-1.1.6-0005-upnpsoap-Fix-external-subtitles-on-Samsung-Series-J.patch 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. From 4ec6cd005358f3474ce9caec4f0954b4756570ed Mon Sep 17 00:00:00 2001
  2. From: Justin Maggard <jmaggard@netgear.com>
  3. Date: Thu, 7 Jan 2016 00:31:56 -0800
  4. Subject: [PATCH] upnpsoap: Fix external subtitles on Samsung Series J.
  5. Add FLAG_CAPTION_RES to the modern Samsung profile. Older Samsung
  6. devices used a custom method for describing subtitles, but apparently
  7. Series J no longer supports it. The good thing is, they now support
  8. the more standard method (and probably have been for a while, since it
  9. works on my old Series D BDP).
  10. So let's just expose both methods to the client, since everything should
  11. be able to handle it.
  12. Fixes: SF bug #113 (Subtitles support for new 2015 Samsung J series TV)
  13. ---
  14. clients.c | 5 +++--
  15. upnpsoap.c | 2 +-
  16. 2 files changed, 4 insertions(+), 3 deletions(-)
  17. diff --git a/clients.c b/clients.c
  18. index a8609d2..39ca362 100644
  19. --- a/clients.c
  20. +++ b/clients.c
  21. @@ -65,9 +65,10 @@ struct client_type_s client_types[] =
  22. /* User-Agent: DLNADOC/1.50 SEC_HHP_[TV]UE40D7000/1.0 */
  23. /* User-Agent: DLNADOC/1.50 SEC_HHP_ Family TV/1.0 */
  24. + /* USER-AGENT: DLNADOC/1.50 SEC_HHP_[TV] UE65JU7000/1.0 UPnP/1.0 */
  25. { ESamsungSeriesCDE,
  26. - FLAG_SAMSUNG | FLAG_DLNA | FLAG_NO_RESIZE | FLAG_SAMSUNG_DCM10,
  27. - "Samsung Series [CDEF]",
  28. + FLAG_SAMSUNG | FLAG_DLNA | FLAG_NO_RESIZE | FLAG_SAMSUNG_DCM10 | FLAG_CAPTION_RES,
  29. + "Samsung Series [CDEFJ]",
  30. "SEC_HHP_",
  31. EUserAgent
  32. },
  33. diff --git a/upnpsoap.c b/upnpsoap.c
  34. index 8066318..96ad2d5 100644
  35. --- a/upnpsoap.c
  36. +++ b/upnpsoap.c
  37. @@ -1064,7 +1064,7 @@ callback(void *args, int argc, char **argv, char **azColName)
  38. "http://%s:%d/Captions/%s.srt"
  39. "&lt;/res&gt;",
  40. lan_addr[passed_args->iface].str, runtime_vars.port, detailID);
  41. - else if( passed_args->filter & FILTER_SEC_CAPTION_INFO_EX )
  42. + if( passed_args->filter & FILTER_SEC_CAPTION_INFO_EX )
  43. ret = strcatf(str, "&lt;sec:CaptionInfoEx sec:type=\"srt\"&gt;"
  44. "http://%s:%d/Captions/%s.srt"
  45. "&lt;/sec:CaptionInfoEx&gt;",
  46. --
  47. 2.11.0