From 695ff5d26c7bf19833b79018e467ecc383ff5145 Mon Sep 17 00:00:00 2001 From: Liviu-Mihail Concioiu Date: Thu, 5 Dec 2024 03:25:54 +0100 Subject: [PATCH] Adds detection for astro brand ref #7885 --- Parser/Device/AbstractDeviceParser.php | 3 +- Tests/fixtures/smartphone-22.yml | 4 +-- Tests/fixtures/tv-5.yml | 45 ++++++++++++++++++++++++++ regexes/device/mobiles.yml | 10 ++++-- 4 files changed, 57 insertions(+), 5 deletions(-) diff --git a/Parser/Device/AbstractDeviceParser.php b/Parser/Device/AbstractDeviceParser.php index 0f441f0c1d..6aa33cabf3 100644 --- a/Parser/Device/AbstractDeviceParser.php +++ b/Parser/Device/AbstractDeviceParser.php @@ -189,7 +189,8 @@ abstract class AbstractDeviceParser extends AbstractParser '59' => 'ArtLine', '8A' => 'Asano', '90' => 'Asanzo', - '1U' => 'Astro', + '1U' => 'Astro (UA)', + 'AST' => 'astro (MY)', 'A4' => 'Ask', 'A8' => 'Assistant', 'ASS' => 'ASSE', diff --git a/Tests/fixtures/smartphone-22.yml b/Tests/fixtures/smartphone-22.yml index 670aefc686..6cec870b2a 100644 --- a/Tests/fixtures/smartphone-22.yml +++ b/Tests/fixtures/smartphone-22.yml @@ -9723,7 +9723,7 @@ engine_version: 79.0.3945.93 device: type: smartphone - brand: Astro + brand: Astro (UA) model: S451 os_family: Android browser_family: Chrome @@ -9741,7 +9741,7 @@ engine_version: 74.0.3729.157 device: type: smartphone - brand: Astro + brand: Astro (UA) model: S501 os_family: Android browser_family: Chrome diff --git a/Tests/fixtures/tv-5.yml b/Tests/fixtures/tv-5.yml index 7137a08ace..1225155e10 100644 --- a/Tests/fixtures/tv-5.yml +++ b/Tests/fixtures/tv-5.yml @@ -89,3 +89,48 @@ model: Smart TV (2020) os_family: GNU/Linux browser_family: Opera +- + user_agent: Mozilla/5.0 (Astro;AS620SM;2.2) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Safari/605.1.15 + os: [ ] + client: + type: browser + name: Safari + version: "13.0" + engine: WebKit + engine_version: 605.1.15 + device: + type: tv + brand: astro (MY) + model: AS620SM + os_family: Unknown + browser_family: Safari +- + user_agent: Mozilla/5.0 (Astro;AS630SM;2.2) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Safari/605.1.15 + os: [ ] + client: + type: browser + name: Safari + version: "13.0" + engine: WebKit + engine_version: 605.1.15 + device: + type: tv + brand: astro (MY) + model: AS630SM + os_family: Unknown + browser_family: Safari +- + user_agent: Mozilla/5.0 (Astro;KSTB6112;2.2) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Safari/605.1.15 + os: [ ] + client: + type: browser + name: Safari + version: "13.0" + engine: WebKit + engine_version: 605.1.15 + device: + type: tv + brand: astro (MY) + model: KSTB6112 + os_family: Unknown + browser_family: Safari diff --git a/regexes/device/mobiles.yml b/regexes/device/mobiles.yml index 6372c155ad..6a4fc111f3 100644 --- a/regexes/device/mobiles.yml +++ b/regexes/device/mobiles.yml @@ -17438,7 +17438,7 @@ Matrix: # Mobicel or Mobicell Mobicel: - regex: 'Mobicel[_ ](R[16]|METRO2)|ASTRO(?: Build|[;)]|$)|(?:Android 6(?:[\d.]*);(?: [\w-]+;)? SHIFT)|(?:Android 8(?:[\d.]*);(?: [\w-]+;)? (?:BEAM|ZOOM|RUBY)|FAME(?:_DS)?|CLIK|R7_[12]|(?