From 8f55f3f47b38b60aa82b3c3b09719a7f6b012df3 Mon Sep 17 00:00:00 2001 From: Tutik Alexsandr Date: Wed, 26 Aug 2020 23:48:48 +0300 Subject: [PATCH] feat(device) detect new brand Klipad model: KL-V905 feat(device) detect brand Leotec model: Argon A250B (LESPH5003B) feat(device) detect brand Teclast model: TPad 98 10.1" 4G ( 98(M3E3), 98(M1E8), 98(M1E7), 98(M1E5), 98(M1E4), 98(M1E9) ) issue #6355 --- Parser/Device/DeviceParserAbstract.php | 1 + Tests/fixtures/smartphone-16.yml | 161 +++++++++++++++++++++++++ regexes/device/mobiles.yml | 16 ++- 3 files changed, 175 insertions(+), 3 deletions(-) diff --git a/Parser/Device/DeviceParserAbstract.php b/Parser/Device/DeviceParserAbstract.php index 94c12f60fe..8b6f1e344c 100644 --- a/Parser/Device/DeviceParserAbstract.php +++ b/Parser/Device/DeviceParserAbstract.php @@ -339,6 +339,7 @@ abstract class DeviceParserAbstract extends ParserAbstract 'JF' => 'JFone', 'JK' => 'JKL', 'KL' => 'Kalley', + '0K' => 'Klipad', 'K4' => 'Kaan', 'K7' => 'Kaiomy', 'K6' => 'Kanji', diff --git a/Tests/fixtures/smartphone-16.yml b/Tests/fixtures/smartphone-16.yml index 58bafdeecf..ddf47054e5 100644 --- a/Tests/fixtures/smartphone-16.yml +++ b/Tests/fixtures/smartphone-16.yml @@ -7399,3 +7399,164 @@ model: DuraForce XD os_family: Android browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 4.4.2; KL-V905 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36 + os: + name: Android + short_name: AND + version: 4.4.2 + platform: "" + client: + type: browser + name: Chrome Webview + short_name: CV + version: 30.0.0.0 + engine: Blink + engine_version: "" + device: + type: smartphone + brand: 0K + model: KL-V905 + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 4.4.2; LESPH5003B Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36 + os: + name: Android + short_name: AND + version: 4.4.2 + platform: "" + client: + type: browser + name: Chrome Webview + short_name: CV + version: 30.0.0.0 + engine: Blink + engine_version: "" + device: + type: smartphone + brand: LT + model: Argon A250B + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 6.0; 98(M1E8)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.93 Safari/537.36 + os: + name: Android + short_name: AND + version: "6.0" + platform: "" + client: + type: browser + name: Chrome + short_name: CH + version: 79.0.3945.93 + engine: Blink + engine_version: "" + device: + type: tablet + brand: T7 + model: TPad 98 10.1" 4G + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 6.0; 98(M1E7)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.62 Safari/537.36 + os: + name: Android + short_name: AND + version: "6.0" + platform: "" + client: + type: browser + name: Chrome + short_name: CH + version: 78.0.3904.62 + engine: Blink + engine_version: "" + device: + type: tablet + brand: T7 + model: TPad 98 10.1" 4G + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 6.0; 98(M1E5)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.93 Safari/537.36 + os: + name: Android + short_name: AND + version: "6.0" + platform: "" + client: + type: browser + name: Chrome + short_name: CH + version: 79.0.3945.93 + engine: Blink + engine_version: "" + device: + type: tablet + brand: T7 + model: TPad 98 10.1" 4G + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 6.0; 98(M1E4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.93 Safari/537.36 + os: + name: Android + short_name: AND + version: "6.0" + platform: "" + client: + type: browser + name: Chrome + short_name: CH + version: 79.0.3945.93 + engine: Blink + engine_version: "" + device: + type: tablet + brand: T7 + model: TPad 98 10.1" 4G + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 6.0; 98(M1E9)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36 + os: + name: Android + short_name: AND + version: "6.0" + platform: "" + client: + type: browser + name: Chrome + short_name: CH + version: 76.0.3809.132 + engine: Blink + engine_version: "" + device: + type: tablet + brand: T7 + model: TPad 98 10.1" 4G + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 6.0; 98(M3E3)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.111 Safari/537.36 + os: + name: Android + short_name: AND + version: "6.0" + platform: "" + client: + type: browser + name: Chrome + short_name: CH + version: 76.0.3809.111 + engine: Blink + engine_version: "" + device: + type: tablet + brand: T7 + model: TPad 98 10.1" 4G + os_family: Android + browser_family: Chrome + diff --git a/regexes/device/mobiles.yml b/regexes/device/mobiles.yml index 283af8c3e6..3daa2b5df0 100644 --- a/regexes/device/mobiles.yml +++ b/regexes/device/mobiles.yml @@ -7429,11 +7429,13 @@ LeEco: # Leotec Leotec: - regex: 'LESPH501[14]|SUPERNOVA (Qi16|i3G96[X]?)' + regex: 'LESPH501[14]|LESPH5003B|SUPERNOVA (Qi16|i3G96[X]?)' device: 'smartphone' models: - regex: 'LESPH5011' model: 'Argon e250' + - regex: 'LESPH5003B' + model: 'Argon A250B' - regex: 'LESPH5014' model: 'Krypton K150' - regex: 'SUPERNOVA (Qi16|i3G96[X]?)' @@ -12243,7 +12245,7 @@ TCL: # Teclast Teclast: - regex: 'Teclast|X98 Air III|X98 Air II\(HG5N\)|Tbook|X80 Power\(B2N4\)|T30_(ROW|EEA)|T10\(E3C6\)|P10S\(N4H5\)' + regex: 'Teclast|X98 Air III|X98 Air II\(HG5N\)|Tbook|X80 Power\(B2N4\)|T30_(ROW|EEA)|T10\(E3C6\)|P10S\(N4H5\)|98\(M1E[45789]\)|98\(M3E3\)' device: 'tablet' models: - regex: 'Tbook[_ -]([^;/]+) Build' @@ -12254,6 +12256,8 @@ Teclast: model: 'T30 $1' - regex: 'P10S\(N4H5\)' model: 'P10S' + - regex: '98\(M1E[45789]\)|98\(M3E3\)' + model: 'TPad 98 10.1" 4G' - regex: 'X80 Power\(B2N4\)[);/ ]' model: 'X98 Power' - regex: 'X98 Air III[);/ ]' @@ -16094,4 +16098,10 @@ Tele2: Alfawise: regex: '(A95X_R1)[);/ ]' device: 'tv' - model: '$1' \ No newline at end of file + model: '$1' + +# Klipad +Klipad: + regex: '(KL-V905)[);/ ]' + device: 'smartphone' + model: '$1'