From d28bc4b25b199d894b0876021c49427503885fba Mon Sep 17 00:00:00 2001 From: Marten Richter Date: Fri, 31 Oct 2014 08:15:00 +0100 Subject: [PATCH] Versionscheck fuer subtitles --- vdr.cc | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/vdr.cc b/vdr.cc index fd5cdd5..ee19f82 100644 --- a/vdr.cc +++ b/vdr.cc @@ -661,16 +661,18 @@ int VDR::doLogin(unsigned int* v_server_min, unsigned int* v_server_max, unsigne *v_server_max=version_max; *v_client=VOMP_PROTOCOLL_VERSION; - unsigned int numlangcodes = vresp->extractULONG(); - subtitles = vresp->extractULONG(); - list.clear(); - for (int i=0; iextractLONG(); - newpref.subtitlepref = vresp->extractLONG(); - newpref.langcode = vresp->extractStdString(); - //logger->log("VDR", Log::DEBUG, "Langpref %s %d %d", newpref.langcode.c_str(), newpref.audiopref, newpref.subtitlepref); - list.push_back(newpref); + if (0x00000302 <= version_max) { + unsigned int numlangcodes = vresp->extractULONG(); + subtitles = vresp->extractULONG(); + list.clear(); + for (int i=0; iextractLONG(); + newpref.subtitlepref = vresp->extractLONG(); + newpref.langcode = vresp->extractStdString(); + //logger->log("VDR", Log::DEBUG, "Langpref %s %d %d", newpref.langcode.c_str(), newpref.audiopref, newpref.subtitlepref); + list.push_back(newpref); + } } -- 2.39.5