From 4aaef6be0ae325876eb0bff9227ee9c54fe2c723 Mon Sep 17 00:00:00 2001 From: Liviu-Mihail Concioiu Date: Wed, 13 Jul 2022 16:21:19 +0200 Subject: [PATCH] Adds detection for Digit4G brand and devices --- Parser/Device/AbstractDeviceParser.php | 1 + Tests/fixtures/smartphone-7.yml | 36 ++++++++++++++++++++++++++ regexes/device/mobiles.yml | 8 ++++++ 3 files changed, 45 insertions(+) diff --git a/Parser/Device/AbstractDeviceParser.php b/Parser/Device/AbstractDeviceParser.php index 5b264017c8..9ebb54b439 100644 --- a/Parser/Device/AbstractDeviceParser.php +++ b/Parser/Device/AbstractDeviceParser.php @@ -334,6 +334,7 @@ abstract class AbstractDeviceParser extends AbstractParser 'D3' => 'Digicel', 'DH' => 'Digihome', 'DD' => 'Digiland', + 'DIG' => 'Digit4G', 'DIC' => 'DIGICOM', 'Q0' => 'DIGIFORS', 'DQ' => 'DISH', diff --git a/Tests/fixtures/smartphone-7.yml b/Tests/fixtures/smartphone-7.yml index ca42718ef8..55757c413a 100644 --- a/Tests/fixtures/smartphone-7.yml +++ b/Tests/fixtures/smartphone-7.yml @@ -9135,3 +9135,39 @@ model: HEYou 70 os_family: Android browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; U; Android 8.1.0; Digit4G Energy Build/O11019; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36 OPR/62.5.2254.61243 + os: + name: Android + version: 8.1.0 + platform: "" + client: + type: browser + name: Opera Mobile + version: 62.5.2254.61243 + engine: Blink + engine_version: 61.0.3163.98 + device: + type: smartphone + brand: Digit4G + model: Energy + os_family: Android + browser_family: Opera +- + user_agent: Mozilla/5.0 (Linux; U; Android 4.4.4; Digit4G-Pro Build/KTU84P) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 UCBrowser/12.12.9.1226 U3/0.8.0 Mobile Safari/534.30 + os: + name: Android + version: 4.4.4 + platform: "" + client: + type: browser + name: UC Browser + version: 12.12.9.1226 + engine: WebKit + engine_version: "534.30" + device: + type: smartphone + brand: Digit4G + model: Pro + os_family: Android + browser_family: Unknown diff --git a/regexes/device/mobiles.yml b/regexes/device/mobiles.yml index b6a9cab63f..c78f4c9ccd 100644 --- a/regexes/device/mobiles.yml +++ b/regexes/device/mobiles.yml @@ -5894,6 +5894,14 @@ Digiland: - regex: '(Compumax Blue)' # Compumax model: '$1' +# Digit4G (https://digit4g.com/p) +Digit4G: + regex: 'Digit4G' + device: 'smartphone' + models: + - regex: 'Digit4G[ -](Energy|Pro)' + model: '$1' + # Compumax or COMPUMAX COMPUTER S.A.S (www.compumax.com.co) COMPUMAX: regex: 'BlueS10(?:[);/ ]|$)'