From 3669d0c64d7f6ee94782442c8cceb2837382b37e Mon Sep 17 00:00:00 2001 From: Liviu-Mihail Concioiu Date: Fri, 27 Dec 2024 10:47:29 +0100 Subject: [PATCH] =?UTF-8?q?Adds=20detection=20for=20allente,=20alpsmart,?= =?UTF-8?q?=20CommScope,=20Formovie,=20Gr=C3=BCnberg,=20multibox=20brands,?= =?UTF-8?q?=20improves=20detection=20for=20BenQ,=20Haier,=20Kodak,=20ok.,?= =?UTF-8?q?=20Philips,=20Stilevs,=20=20(#7961)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Adds detection for Grünberg brand * Adds detection for alpsmart brand * Adds detection for CommScope brand * Improves detection for BenQ devices * Adds detection for allente brand * Adds detection for multibox brand * Adds detection for Formovie brand * Improves detection for Stilevs brand * Rename Ok to ok. * Improves detection for ok. devices * Improves detection for Haier devices * Improves detection for Philips devices ref #7882 --- DeviceDetector.php | 2 +- Parser/Device/AbstractDeviceParser.php | 8 +- Tests/fixtures/peripheral.yml | 36 ++++ Tests/fixtures/tv-1.yml | 2 +- Tests/fixtures/tv-4.yml | 270 +++++++++++++++++++++++++ Tests/fixtures/tv.yml | 2 +- regexes/device/mobiles.yml | 81 +++++++- regexes/device/televisions.yml | 4 +- 8 files changed, 389 insertions(+), 16 deletions(-) diff --git a/DeviceDetector.php b/DeviceDetector.php index acb8099543..309a8b20ea 100644 --- a/DeviceDetector.php +++ b/DeviceDetector.php @@ -1070,7 +1070,7 @@ protected function parseDevice(): void /** * All devices that contain Andr0id in string are assumed to be a tv */ - if ($this->matchUserAgent('Andr0id|(?:Android(?: UHD)?|Google) TV|\(lite\) TV|BRAVIA| TV$')) { + if ($this->matchUserAgent('Andr0id|(?:Android(?: UHD)?|(?device = AbstractDeviceParser::DEVICE_TYPE_TV; } diff --git a/Parser/Device/AbstractDeviceParser.php b/Parser/Device/AbstractDeviceParser.php index 53c6cdfeb4..aacec26c53 100644 --- a/Parser/Device/AbstractDeviceParser.php +++ b/Parser/Device/AbstractDeviceParser.php @@ -142,9 +142,11 @@ abstract class AbstractDeviceParser extends AbstractParser 'ALS' => 'All Star', 'AA' => 'AllCall', '3A' => 'AllDocube', + 'ALL' => 'allente', 'A2' => 'Allview', 'ALI' => 'ALLINmobile', 'A7' => 'Allwinner', + 'ALP' => 'alpsmart', 'A1' => 'Altech UEC', '66' => 'Altice', 'ALM' => 'Altimo', @@ -375,6 +377,7 @@ abstract class AbstractDeviceParser extends AbstractParser 'CY' => 'Coby Kyros', 'XC' => 'Cobalt', 'C6' => 'Comio', + 'COM' => 'CommScope', 'CL' => 'Compal', 'CQ' => 'Compaq', 'C7' => 'ComTrade Tesla', @@ -644,6 +647,7 @@ abstract class AbstractDeviceParser extends AbstractParser '44' => 'Four Mobile', 'F0' => 'Fonos', 'F2' => 'FORME', + 'FRM' => 'Formovie', 'F5' => 'Formuler', 'FR' => 'Forstar', 'RF' => 'Fortis', @@ -737,6 +741,7 @@ abstract class AbstractDeviceParser extends AbstractParser 'GR1' => 'GroBerwert', 'GF' => 'Gretel', '82' => 'Gresso', + 'GRB' => 'Grünberg', 'GU' => 'Grundig', 'GV' => 'Gtel', 'CUO' => 'Guophone', @@ -1187,6 +1192,7 @@ abstract class AbstractDeviceParser extends AbstractParser '72' => 'M-Tech', '9H' => 'M-Horse', 'MKP' => 'M-KOPA', + 'MLB' => 'multibox', '1R' => 'Multilaser', 'MPS' => 'MultiPOS', '1M' => 'MYFON', @@ -1297,7 +1303,7 @@ abstract class AbstractDeviceParser extends AbstractParser 'OQ' => 'Meta', 'O1' => 'Odys', 'ODP' => 'Odotpad', - 'O9' => 'Ok', + 'O9' => 'ok.', 'OKA' => 'Okapi', 'OA' => 'Okapia', 'OKI' => 'Oking', diff --git a/Tests/fixtures/peripheral.yml b/Tests/fixtures/peripheral.yml index d7fc78c53a..76c91964ec 100644 --- a/Tests/fixtures/peripheral.yml +++ b/Tests/fixtures/peripheral.yml @@ -1630,3 +1630,39 @@ model: MoGo Pro os_family: Android browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 11; Xming Google TV Build/RTM7.230903.079; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/129.0.6668.102 Mobile Safari/537.36 + os: + name: Android TV + version: "11" + platform: "" + client: + type: browser + name: Chrome Webview + version: 129.0.6668.102 + engine: Blink + engine_version: 129.0.6668.102 + device: + type: peripheral + brand: Formovie + model: Xming + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 11; SCN550 Build/RTM6.230109.257; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/129.0.6668.102 Mobile Safari/537.36 + os: + name: Android + version: "11" + platform: "" + client: + type: browser + name: Chrome Webview + version: 129.0.6668.102 + engine: Blink + engine_version: 129.0.6668.102 + device: + type: peripheral + brand: Philips + model: Screeneo U5 + os_family: Android + browser_family: Chrome diff --git a/Tests/fixtures/tv-1.yml b/Tests/fixtures/tv-1.yml index b1a84d3c55..80a785d6cd 100644 --- a/Tests/fixtures/tv-1.yml +++ b/Tests/fixtures/tv-1.yml @@ -1911,7 +1911,7 @@ engine_version: 75.0.3770.143 device: type: tv - brand: Ok + brand: ok. model: 4K (2020) os_family: Android browser_family: Chrome diff --git a/Tests/fixtures/tv-4.yml b/Tests/fixtures/tv-4.yml index becf26fea3..9ca643dcbe 100644 --- a/Tests/fixtures/tv-4.yml +++ b/Tests/fixtures/tv-4.yml @@ -6996,3 +6996,273 @@ model: 24HEY1 os_family: Android browser_family: Unknown +- + user_agent: Mozilla/5.0 (Linux; Android 13; GR32200 Build/TP1A.220905.004.A2; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/101.0.4951.61 Safari/537.36 + os: + name: Android + version: "13" + platform: "" + client: + type: browser + name: Chrome Webview + version: 101.0.4951.61 + engine: Blink + engine_version: 101.0.4951.61 + device: + type: tv + brand: Grünberg + model: GR32200 + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 13; GR43200 Build/TP1A.220905.004.A2; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/101.0.4951.61 Safari/537.36 + os: + name: Android + version: "13" + platform: "" + client: + type: browser + name: Chrome Webview + version: 101.0.4951.61 + engine: Blink + engine_version: 101.0.4951.61 + device: + type: tv + brand: Grünberg + model: GR43200 + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 12; AS512 Build/SP1A.211105.004; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/91.0.4472.114 Mobile Safari/537.36 + os: + name: Android + version: "12" + platform: "" + client: + type: browser + name: Chrome Webview + version: 91.0.4472.114 + engine: Blink + engine_version: 91.0.4472.114 + device: + type: tv + brand: alpsmart + model: AS512 + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 12; AS514 Build/SP1A.211105.004; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/91.0.4472.114 Mobile Safari/537.36 + os: + name: Android + version: "12" + platform: "" + client: + type: browser + name: Chrome Webview + version: 91.0.4472.114 + engine: Blink + engine_version: 91.0.4472.114 + device: + type: tv + brand: alpsmart + model: AS514 + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 12; AS515 Build/SP1A.211105.004; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/91.0.4472.114 Mobile Safari/537.36 + os: + name: Android + version: "12" + platform: "" + client: + type: browser + name: Chrome Webview + version: 91.0.4472.114 + engine: Blink + engine_version: 91.0.4472.114 + device: + type: tv + brand: alpsmart + model: AS515 + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 12; AS516 Build/SP1A.211105.004; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/91.0.4472.114 Mobile Safari/537.36 + os: + name: Android + version: "12" + platform: "" + client: + type: browser + name: Chrome Webview + version: 91.0.4472.114 + engine: Blink + engine_version: 91.0.4472.114 + device: + type: tv + brand: alpsmart + model: AS516 + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 11; VIP7802 Build/RTT4.230821.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/130.0.6723.58 Mobile Safari/537.36 + os: + name: Android + version: "11" + platform: "" + client: + type: browser + name: Chrome Webview + version: 130.0.6723.58 + engine: Blink + engine_version: 130.0.6723.58 + device: + type: tv + brand: CommScope + model: VIP7802 + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 11; QS02 Build/RT; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/129.0.6668.100 Mobile Safari/537.36 + os: + name: Android + version: "11" + platform: "" + client: + type: browser + name: Chrome Webview + version: 129.0.6668.100 + engine: Blink + engine_version: 129.0.6668.100 + device: + type: tv + brand: BenQ + model: QS02 + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 10; Allente 1 Build/QTG1.200820.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/129.0.6668.102 Mobile Safari/537.36 + os: + name: Android + version: "10" + platform: "" + client: + type: browser + name: Chrome Webview + version: 129.0.6668.102 + engine: Blink + engine_version: 129.0.6668.102 + device: + type: tv + brand: allente + model: Allente 1 + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 10; Fundroid MB18 Build/QP1A.191105.004; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.186 Safari/537.36 + os: + name: Android + version: "10" + platform: "" + client: + type: browser + name: Chrome Webview + version: 74.0.3729.186 + engine: Blink + engine_version: 74.0.3729.186 + device: + type: tv + brand: multibox + model: Fundroid MB18 + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 10; Fundroid MB216 Build/QP1A.191105.004; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.186 Safari/537.36 + os: + name: Android + version: "10" + platform: "" + client: + type: browser + name: Chrome Webview + version: 74.0.3729.186 + engine: Blink + engine_version: 74.0.3729.186 + device: + type: tv + brand: multibox + model: Fundroid MB216 + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 11; STILEVS SMART TV Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.120 Safari/537.36 + os: + name: Android TV + version: "11" + platform: "" + client: + type: browser + name: Chrome Webview + version: 83.0.4103.120 + engine: Blink + engine_version: 83.0.4103.120 + device: + type: tv + brand: Stilevs + model: Smart TV + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 11; OK Google TV Build/RTM7.230903.015; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/129.0.6668.100 Mobile Safari/537.36 + os: + name: Android TV + version: "11" + platform: "" + client: + type: browser + name: Chrome Webview + version: 129.0.6668.100 + engine: Blink + engine_version: 129.0.6668.100 + device: + type: tv + brand: ok. + model: Smart TV + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 11; Haier MatrixTV AEL Build/RTM6.230109.197; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/129.0.6668.100 Mobile Safari/537.36 + os: + name: Android + version: "11" + platform: "" + client: + type: browser + name: Chrome Webview + version: 129.0.6668.100 + engine: Blink + engine_version: 129.0.6668.100 + device: + type: tv + brand: Haier + model: Smart TV + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 9; PATH_7XPRO Build/PI; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/129.0.6668.100 Mobile Safari/537.36 + os: + name: Android + version: "9" + platform: "" + client: + type: browser + name: Chrome Webview + version: 129.0.6668.100 + engine: Blink + engine_version: 129.0.6668.100 + device: + type: tv + brand: Kodak + model: 7XPRO + os_family: Android + browser_family: Chrome diff --git a/Tests/fixtures/tv.yml b/Tests/fixtures/tv.yml index fd63b74bda..72e71200eb 100644 --- a/Tests/fixtures/tv.yml +++ b/Tests/fixtures/tv.yml @@ -8141,7 +8141,7 @@ engine_version: 53.0.2785.143 device: type: tv - brand: Ok + brand: ok. model: Smart TV (2017) os_family: GNU/Linux browser_family: Opera diff --git a/regexes/device/mobiles.yml b/regexes/device/mobiles.yml index 9933b55597..a9cbee33d5 100644 --- a/regexes/device/mobiles.yml +++ b/regexes/device/mobiles.yml @@ -3127,6 +3127,12 @@ Allwinner: device: 'car browser' model: 'QUAD-CORE R16' +# alpsmart (https://www.alpsmart.net/) +alpsmart: + regex: '(AS51[2456])(?:[);/ ]|$)' + device: 'tv' + model: '$1' + # altron altron: regex: '(AL-555|GI-626|OB[_-](?:421|588|728|627))(?:[);/ ]|$)' @@ -5427,7 +5433,7 @@ BenQ-Siemens: # BenQ BenQ: - regex: 'BENQ(?:[ -])?([a-z0-9]+)|(?:F52_09|F5_15|T47_09)(?:[);/ ]|$)' + regex: 'BENQ(?:[ -])?([a-z0-9]+)|(?:F52_09|F5_15|T47_09|QS02)(?:[);/ ]|$)' device: 'feature phone' models: - regex: '(F(?:52|5)|T47)_(?:15|09)(?:[);/ ]|$)' @@ -5435,6 +5441,10 @@ BenQ: - regex: 'BENQ(?:[ -])?([a-z0-9]+)' model: '$1' + - regex: 'QS02' + device: 'tv' + model: 'QS02' # SDMC + # Blaupunkt (blaupunkt.com) Blaupunkt: regex: 'Blaupunkt|(?:Soundphone S2|Atlantis[_ ](?:1001A|1010A|A10[._]G40[23])|SLplus02|Discovery[_ ](?:A10_302|10[28]C|111C|1000C|1001A?)|Endeavour[_ ](?:785|101[GLM]|1000|1001|101[03]|1100)|Polaris[_ ]80[38](?:_BE)?|BP_(?:6010|6110)|B-STREAM|SL05|SM 02 2019|SF04 4G|A-STREAM|55UW5000T)(?:[);/ ]|$)' @@ -6250,6 +6260,12 @@ Comio: - regex: 'Comio[ _-]?([^;/)]+)(?: Build|[);])' model: '$1' +# CommScope (https://www.commscope.com/) +CommScope: + regex: 'VIP7802(?:[);/ ]|$)' + device: 'tv' + model: 'VIP7802' + # Compal Compal: regex: 'Compal-[a-z0-9]+' @@ -6818,6 +6834,12 @@ AllDocube: - regex: 'Power M3(?:[);/ ]|$)' model: 'Power M3' +# allente (https://www.allente.se/) +allente: + regex: 'Allente 1(?:[);/ ]|$)' + device: 'tv' + model: 'Allente 1' # KAON MEDIA or KaonMedia + # Xsmart (xsmart.com.pk) Xsmart: regex: '(?:Xsmart (?:Nova 7|Mate 10)|CORE_X)(?:[);/ ]|$)' @@ -9998,6 +10020,12 @@ Graetz: device: 'tv' model: '' +# Grünberg +Grünberg: + regex: '(GR(?:32200|43200))(?:[);/ ]|$)' + device: 'tv' + model: '$1' + # Grundig Grundig: regex: 'GR?-TB[0-9]+[a-z]*|(?