Skip to content

Commit

Permalink
feat(device) detect brand Chuwi models: HiBook Pro, Hi10 Plus, Hi8 Ai…
Browse files Browse the repository at this point in the history
…r, Hi8 Pro

issue matomo-org#6355
  • Loading branch information
sanchezzzhak committed Oct 16, 2020
1 parent 1fc3bba commit 52b2158
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 3 deletions.
81 changes: 80 additions & 1 deletion Tests/fixtures/smartphone-18.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3300,4 +3300,83 @@
model: HiBox Hero
os_family: Android
browser_family: Chrome

-
user_agent: Mozilla/5.0 (Linux; Android 5.1; HiBook pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.93 Safari/537.36
os:
name: Android
short_name: AND
version: "5.1"
platform: ""
client:
type: browser
name: Chrome
short_name: CH
version: 79.0.3945.93
engine: Blink
engine_version: ""
device:
type: tablet
brand: 1C
model: HiBook Pro
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 5.1; Hi10 plus) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.93 Safari/537.36
os:
name: Android
short_name: AND
version: "5.1"
platform: ""
client:
type: browser
name: Chrome
short_name: CH
version: 79.0.3945.93
engine: Blink
engine_version: ""
device:
type: tablet
brand: 1C
model: Hi10 Plus
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 5.1; Hi8 Air) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.116 Safari/537.36
os:
name: Android
short_name: AND
version: "5.1"
platform: ""
client:
type: browser
name: Chrome
short_name: CH
version: 77.0.3865.116
engine: Blink
engine_version: ""
device:
type: tablet
brand: 1C
model: Hi8 Air
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 5.1; Hi8 pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.93 Safari/537.36
os:
name: Android
short_name: AND
version: "5.1"
platform: ""
client:
type: browser
name: Chrome
short_name: CH
version: 79.0.3945.93
engine: Blink
engine_version: ""
device:
type: tablet
brand: 1C
model: Hi8 Pro
os_family: Android
browser_family: Chrome
10 changes: 8 additions & 2 deletions regexes/device/mobiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15787,12 +15787,12 @@ Unihertz:

# Chuwi
Chuwi:
regex: '(?:CW-(Hi8-super|Hi12|V99|V17HD3G|VX8-3G|V88-QUAD|V9-DUAL|V88S|Vi[78]|[HV]i10 (pro|plus))|Hi10 Pro|HiBox-hero)[;)/ ]'
regex: '(?:CW-(Hi8-super|Hi12|V99|V17HD3G|VX8-3G|V88-QUAD|V9-DUAL|V88S|Vi[78]|[HV]i10 (pro|plus))|Hi10 (?:Pro|plus)|HiBox-hero|HiBook pro|Hi8 (?:Air|Pro))[;)/ ]'
device: 'tablet'
models:
- regex: '(CW-Hi8-super)[;)/ ]'
model: 'Hi8'
- regex: 'CW-(Vi10) plus[;)/ ]'
- regex: '(?:CW-)?(Vi10|Hi10) plus[;)/ ]'
model: '$1 Plus'
- regex: 'CW-(V88)-QUAD[;)/ ]'
model: '$1 Quad'
Expand All @@ -15802,6 +15802,12 @@ Chuwi:
model: '$1 $2'
- regex: '(?:CW-)?(Hi10) pro[;)/ ]'
model: '$1 Pro'
- regex: 'HiBook pro[;)/ ]'
model: 'HiBook Pro'
- regex: 'Hi8 Air[;)/ ]'
model: 'Hi8 Air'
- regex: 'Hi8 pro[;)/ ]'
model: 'Hi8 Pro'

- regex: 'HiBox-hero[;)/ ]'
model: 'HiBox Hero'
Expand Down

0 comments on commit 52b2158

Please sign in to comment.