$this->data->device->manufacturer = 'Samsung'; switch ($modelName) { case 'SmartTV2012': $this->data->device->series = 'Smart TV 2012'; break; case 'SmartTV2013': $this->data->device->series = 'Smart TV 2013'; break; case 'SmartTV2014': $this->data->device->series = 'Smart TV 2014'; break; case 'SmartTV2015': $this->data->device->series = 'Smart TV 2015'; break; case 'SmartTV2016': $this->data->device->series = 'Smart TV 2016'; break; case 'SmartTV2017': $this->data->device->series = 'Smart TV 2017'; break; case 'OTV-SMT-E5015': $this->data->device->model = 'Olleh SkyLife Smart Settopbox'; unset($this->data->device->series); break; } break; case 'Panasonic': $this->data->device->manufacturer = 'Panasonic'; switch ($modelName) { case 'VIERA 2011': $this->data->device->series = 'Viera 2011'; break; case 'VIERA 2012': $this->data->device->series = 'Viera 2012'; break; case 'VIERA 2013': $this->data->device->series = 'Viera 2013'; break; case 'VIERA 2014': $this->data->device->series = 'Viera 2014'; break; case 'VIERA 2015': case 'Viera2015.mid': $this->data->device->series = 'Viera 2015'; break; case 'VIERA 2016': $this->data->device->series = 'Viera 2016'; break; case 'VIERA 2017': $this->data->device->series = 'Viera 2017'; break; case 'SmartTV2018mid': $this->data->device->series = 'Viera 2018'; break; default: $this->data->device->model = $modelName; if (substr($modelName, 0, 4) == 'DIGA') { $this->data->device->series = 'Diga'; $this->data->device->model = null; } break; } break; case 'TV2N': $this->data->device->manufacturer = 'TV2N'; switch ($modelName) { case 'videoweb': $this->data->device->model = 'Videoweb'; break; } break; default: if ($vendorName != '' && !in_array($vendorName, [ 'OEM', 'vendorName' ])) { $this->data->device->manufacturer = $vendorName; } if ($modelName != '' && !in_array($modelName, [ 'dvb', 'modelName', 'undefined-model-name', 'N/A' ])) { $this->data->device->model = $modelName; } break; } switch ($modelName) { case 'hdr1000s': $this->data->device->manufacturer = 'Humax'; $this->data->device->model = 'HDR-1000S'; $this->data->device->identified |= Constants\Id::MATCH_UA; $this->data->device->generic = false; break; case 'hdr4000t': $this->data->device->manufacturer = 'Humax'; $this->data->device->model = 'HDR-4000T'; $this->data->device->identified |= Constants\Id::MATCH_UA; $this->data->device->generic = false; break; case 'hgs1000s': $this->data->device->manufacturer = 'Humax'; $this->data->device->model = 'HGS-1000S'; $this->data->device->identified |= Constants\Id::MATCH_UA; $this->data->device->generic = false; break; case 'hms1000s': case 'hms1000sph2': $this->data->device->manufacturer = 'Humax'; $this->data->device->model = 'HMS-1000S'; $this->data->device->identified |= Constants\Id::MATCH_UA; $this->data->device->generic = false; break; } } } if (preg_match('/HbbTV\/[0-9.]+;CE-HTML\/[0-9.]+;([^\s;]+)\s[^\s;]+;/u', $ua, $match)) { $this->data->device->manufacturer = Data\Manufacturers::identify(Constants\DeviceType::TELEVISION, $match[1]); if (!isset($this->data->device->series)) { $this->data->device->series = 'Smart TV'; } } if (preg_match('/HbbTV\/[0-9.]+;CE-HTML\/[0-9.]+;Vendor\/([^\s;]+);/u', $ua, $match)) { $this->data->device->manufacturer = Data\Manufacturers::identify(Constants\DeviceType::TELEVISION, $match[1]); if (!isset($this->data->device->series)) { $this->data->device->series = 'Smart TV'; } } } /* Try to reformat some of the detected generic models */ private function improveModelsOnDeviceTypeTelevision() { if ($this->data->device->type != Constants\DeviceType::TELEVISION) { return; } if (isset($this->data->device->model) && isset($this->data->device->manufacturer)) { if ($this->data->device->manufacturer == 'Dune HD') { if (preg_match('/tv([0-9]+[a-z]?)/u', $this->data->device->model, $match)) { $this->data->device->model = 'TV-' . strtoupper($match[1]); } if ($this->data->device->model == 'connect') { $this->data->device->model = 'Connect'; } } if ($this->data->device->manufacturer == 'Humax') { $this->data->device->series = "Digital Receiver"; } if ($this->data->device->manufacturer == 'Inverto') { if (preg_match('/IDL[ -]?([0-9]+.*)/u', $this->data->device->model, $match)) { $this->data->device->model = 'IDL ' . $match[1]; } if (preg_match('/MBN([0-9]+)/u', $this->data->device->model, $match)) { $this->data->device->model = 'MBN ' . $match[1]; } } if ($this->data->device->manufacturer == 'HyperPanel') { $this->data->device->model = strtok(strtoupper($this->data->device->model), ' '); } if ($this->data->device->manufacturer == 'LG') { if (preg_match('/(?:ATSC|DVB)-(.*)/u', $this->data->device->model, $match)) { $this->data->device->model = $match[1]; $this->data->device->generic = false; } if (preg_match('/[0-9][0-9]([A-Z][A-Z][0-9][0-9][0-9][0-9A-Z])/u', $this->data->device->model, $match)) { $this->data->device->model = $match[1]; $this->data->device->generic = false; } if (preg_match('/Media\/(.*)/u', $this->data->device->model, $match)) { $this->data->device->model = $match[1]; $this->data->device->generic = false; } } if ($this->data->device->manufacturer == 'Loewe') { $this->data->device->series = 'Smart TV'; if (preg_match('/((?:ID|SL)[0-9]+)/u', $this->data->device->model, $match)) { $this->data->device->model = 'Connect '. $match[1]; $this->data->device->generic = false; } } if ($this->data->device->manufacturer == 'Philips') { if (preg_match('/[0-9][0-9]([A-Z][A-Z][A-Z][0-9][0-9][0-9][0-9])/u', $this->data->device->model, $match)) { $this->data->device->model = $match[1]; $this->data->device->generic = false; } if (preg_match('/(MT[0-9]+)/u', $this->data->device->model, $match)) { $this->data->device->model = $match[1]; $this->data->device->series = "Digital Receiver"; $this->data->device->generic = false; } if (preg_match('/(BDP[0-9]+)/u', $this->data->device->model, $match)) { $this->data->device->model = $match[1]; $this->data->device->series = "Blu-ray Player"; $this->data->device->generic = false; } } if ($this->data->device->manufacturer == 'Toshiba') { if (preg_match('/DTV_(.*)/u', $this->data->device->model, $match)) { $this->data->device->model = 'Regza ' . $match[1]; $this->data->device->generic = false; } if (preg_match('/[0-9][0-9]([A-Z][A-Z][0-9][0-9][0-9])/u', $this->data->device->model, $match)) { $this->data->device->model = 'Regza ' . $match[1]; $this->data->device->generic = false; } if (preg_match('/[0-9][0-9](ZL[0-9])/u', $this->data->device->model, $match)) { $this->data->device->model = $match[1] . ' Cevo'; $this->data->device->generic = false; } if (preg_match('/(BDX[0-9]+)/u', $this->data->device->model, $match)) { $this->data->device->model = $match[1]; $this->data->device->series = "Blu-ray Player"; $this->data->device->generic = false; } } if ($this->data->device->manufacturer == 'Selevision') { $this->data->device->model = str_replace('Selevision ', '', $this->data->device->model); } if ($this->data->device->manufacturer == 'Sharp') { if (preg_match('/[0-9][0-9]([A-Z]+[0-9]+[A-Z]+)/u', $this->data->device->model, $match)) { $this->data->device->model = $match[1]; $this->data->device->generic = false; } } if ($this->data->device->manufacturer == 'Sony') { if (preg_match('/(BDP[0-9]+G)/u', $this->data->device->model, $match)) { $this->data->device->model = $match[1]; $this->data->device->series = "Blu-ray Player"; $this->data->device->generic = false; } if (preg_match('/KDL?-?[0-9]*([A-Z]+[0-9]+)[A-Z]*/u', $this->data->device->model, $match)) { $this->data->device->model = 'Bravia ' . $match[1]; $this->data->device->series = 'Smart TV'; $this->data->device->generic = false; } } if ($this->data->device->manufacturer == 'Pioneer') { if (preg_match('/(BDP-[0-9]+)/u', $this->data->device->model, $match)) { $this->data->device->model = $match[1]; $this->data->device->series = "Blu-ray Player"; $this->data->device->generic = false; } } } } }