Skip to content

Commit

Permalink
feat(device) detect new brand PC Smart: QuickTab Plus
Browse files Browse the repository at this point in the history
feat(device) detect brand NASCO: Snap Pro

ref matomo-org#7139
  • Loading branch information
sanchezzzhak committed Feb 14, 2023
1 parent c12bcb6 commit 49a636d
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 1 deletion.
1 change: 1 addition & 0 deletions Parser/Device/AbstractDeviceParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -1087,6 +1087,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'PAR' => 'Partner Mobile',
'PAP' => 'PAPYRE',
'PB' => 'PCBOX',
'PCS' => 'PC Smart',
'PC' => 'PCD',
'PD' => 'PCD Argentina',
'PE' => 'PEAQ',
Expand Down
18 changes: 18 additions & 0 deletions Tests/fixtures/smartphone-34.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7511,3 +7511,21 @@
model: M2s
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 7.0; SNAP_PRO) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Mobile Safari/537.36
os:
name: Android
version: "7.0"
platform: ""
client:
type: browser
name: Chrome Mobile
version: 76.0.3809.132
engine: Blink
engine_version: 76.0.3809.132
device:
type: tablet
brand: NASCO
model: Snap Pro
os_family: Android
browser_family: Chrome
18 changes: 18 additions & 0 deletions Tests/fixtures/tablet-9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3237,3 +3237,21 @@
model: RubensTab T11
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 9; QUICKTAB PLUS) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.119 Mobile Safari/537.36
os:
name: Android
version: "9"
platform: ""
client:
type: browser
name: Chrome Mobile
version: 80.0.3987.119
engine: Blink
engine_version: 80.0.3987.119
device:
type: smartphone
brand: PC Smart
model: QuickTab Plus
os_family: Android
browser_family: Chrome
10 changes: 9 additions & 1 deletion regexes/device/mobiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34266,11 +34266,13 @@ NINETEC:

# NASCO
NASCO:
regex: 'NASCO (?:TANGO 7)(?:[);/ ]|$)'
regex: '(?:NASCO (?:TANGO 7)|SNAP_PRO)(?:[);/ ]|$)'
device: 'tablet'
models:
- regex: 'TANGO 7'
model: 'Tango 7'
- regex: 'SNAP_PRO'
model: 'Snap Pro'

# Elecson
Elecson:
Expand Down Expand Up @@ -35003,6 +35005,12 @@ MIWANG:
device: 'smartphone'
model: '$1'

# PC Smart
PC Smart:
regex: 'QUICKTAB PLUS'
device: 'smartphone'
model: 'QuickTab Plus'

# Devices with undectable brand, but detectable model
Unknown:
regex: 'Plasma Mobile|WebTV/(\d+\.\d+)|TV Bro|(?:M10 Ultra|FO-R15|TVBOX|Smart[ _]?TV|SmartATV|M8S\+ 4K|PCBox|rk(?:3128|322x|3368)(?:[_-]box)?|H10 PLAY|Smart AIO TV|TVBOX_L|L-BOX|TVBOX-5G|mips.+(?:Opera TV|wireless|wired)|smartbox|TV BOX|I12Pro Max|(?:audi_)?ks1280x480|AT&T TV|RealtekATV|AOSP on r33a0|hx322x_box)(?:[);/ ]|$)'
Expand Down

0 comments on commit 49a636d

Please sign in to comment.