From af69c4eacf05d8547929dfe53bb94f0bb25b0fb5 Mon Sep 17 00:00:00 2001 From: Liviu-Mihail Concioiu Date: Sat, 17 Feb 2024 14:29:06 +0100 Subject: [PATCH] Improves detection for TV Bro and tv devices ref #7039 --- DeviceDetector.php | 2 +- Tests/fixtures/tv-3.yml | 20 ++++++++++++++++++++ regexes/client/hints/browsers.yml | 1 + 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/DeviceDetector.php b/DeviceDetector.php index 787d86bcd5..2faf4a8040 100644 --- a/DeviceDetector.php +++ b/DeviceDetector.php @@ -1053,7 +1053,7 @@ protected function parseDevice(): void */ if (\in_array($clientName, [ 'Kylo', 'Espial TV Browser', 'LUJO TV Browser', 'LogicUI TV Browser', 'Open TV Browser', 'Seraphic Sraf', - 'Opera Devices', 'Crow Browser', 'Vewd Browser', 'TiviMate', 'Quick Search TV', + 'Opera Devices', 'Crow Browser', 'Vewd Browser', 'TiviMate', 'Quick Search TV', 'TV Bro', ]) ) { $this->device = AbstractDeviceParser::DEVICE_TYPE_TV; diff --git a/Tests/fixtures/tv-3.yml b/Tests/fixtures/tv-3.yml index cf855df790..e5fb129547 100644 --- a/Tests/fixtures/tv-3.yml +++ b/Tests/fixtures/tv-3.yml @@ -2609,3 +2609,23 @@ model: X92 os_family: Android browser_family: Android Browser +- + user_agent: Mozilla/5.0 (Linux; Android 9; Hyundai 2K TV Build/PTO7.210317.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/107.0.5304.91 Mobile Safari/537.36 + os: + name: Android + version: "9" + platform: "" + client: + type: browser + name: TV Bro + version: "" + engine: Blink + engine_version: 107.0.5304.91 + device: + type: tv + brand: Hyundai + model: 2K TV + os_family: Android + browser_family: Chrome + headers: + http-x-requested-with: com.phlox.tvwebbrowser diff --git a/regexes/client/hints/browsers.yml b/regexes/client/hints/browsers.yml index ed62e218df..cd506d829e 100644 --- a/regexes/client/hints/browsers.yml +++ b/regexes/client/hints/browsers.yml @@ -250,3 +250,4 @@ 'vpn.video.downloader': 'VD Browser' 'com.aospstudio.tvsearch': 'Quick Search TV' 'com.go.browser': 'GO Browser' +'com.phlox.tvwebbrowser': 'TV Bro'