Skip to content

Commit

Permalink
feat(device) detect new brand Tele2 models: Mini, Midi
Browse files Browse the repository at this point in the history
feat(device) detect brand Alcatel model: One Touch Pixi 4 5.0"
feat(device) detect brand Zidoo model: X8

issue matomo-org#6355
  • Loading branch information
sanchezzzhak committed Aug 26, 2020
1 parent 0821a70 commit d0de8a2
Show file tree
Hide file tree
Showing 3 changed files with 136 additions and 3 deletions.
1 change: 1 addition & 0 deletions Parser/Device/DeviceParserAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,7 @@ abstract class DeviceParserAbstract extends ParserAbstract
'2T' => 'Tinai',
'TG' => 'Telego',
'TL' => 'Telefunken',
'2L' => 'Tele2',
'T2' => 'Telenor',
'TM' => 'T-Mobile',
'TN' => 'Thomson',
Expand Down
120 changes: 120 additions & 0 deletions Tests/fixtures/smartphone-16.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6999,3 +6999,123 @@
model: Tab 411 3G
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 5.1; Tele2_Mini) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.93 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: "5.1"
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 79.0.3945.93
engine: Blink
engine_version: ""
device:
type: smartphone
brand: 2L
model: Mini
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 6.0.1; Tele2 Midi 1.1 Build/MOB31K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/51.0.2704.106 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: 6.0.1
platform: ""
client:
type: browser
name: Chrome Webview
short_name: CV
version: 51.0.2704.106
engine: Blink
engine_version: ""
device:
type: smartphone
brand: 2L
model: Midi 1.1
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 6.0.1; Tele2 Mini 1.1 Build/MOB31K; ru-ru) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Mobile Safari/537.36 Puffin/7.8.1.40497AP
os:
name: Android
short_name: AND
version: 6.0.1
platform: ""
client:
type: browser
name: Puffin
short_name: PU
version: 7.8.1.40497
engine: WebKit
engine_version: "537.36"
device:
type: smartphone
brand: 2L
model: Mini 1.1
os_family: Android
browser_family: Unknown
-
user_agent: Mozilla/5.0 (Linux; Android 6.0 Tele2_Mini_1_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.93 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: "6.0"
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 79.0.3945.93
engine: Blink
engine_version: ""
device:
type: smartphone
brand: 2L
model: Mini 1.1
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 6.0.1; ZIDOO_X8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.96 Safari/537.36
os:
name: Android
short_name: AND
version: 6.0.1
platform: ""
client:
type: browser
name: Chrome
short_name: CH
version: 78.0.3904.96
engine: Blink
engine_version: ""
device:
type: tv
brand: ZI
model: X8
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 6.0; 5041D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.93 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: "6.0"
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 79.0.3945.93
engine: Blink
engine_version: ""
device:
type: smartphone
brand: AL
model: One Touch Pixi 4 5.0"
os_family: Android
browser_family: Chrome
18 changes: 15 additions & 3 deletions regexes/device/mobiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ Arian Space:

# Alcatel
Alcatel:
regex: 'Alcatel|Alc(?!or )[a-z0-9]+|One[ _]?Touch|idol3|(?:4003[AJ]|4009[ADEFIKMSX]|4013[DEJKMX]|4014[ADEKMX]|4015[ADNTX]|4016[ADX]|4017[ADEFSX]|4018[ADEFMX]|4024[EDX]|4027[ADNX]|4028[AEJS]|4032[ADEX]|4034[ADEFGX]|4035[ADXY]|4045[ADEX]|4047[ADFGNX]|4049[DEGMX]|4060[SW]|A466BG|A621BL|4114E|5001[ADJTU](?:_EEA|_RU)?|5009[AD]|5010[DEGSUX]|5011A|5012[DFG]|5015[ADEX]|5016[AXJ]|5017[ABDEOX]|5019D|5022[EDX]|5023[EF]|5024[ADJ](?:_RU|_EEA)?|5025[DEG]|5026[ADJ]|5027B|5028A|5032W|5033[AX]|5033[DJ](?:[ _]RU)?|5034D(_RU)?|5038[ADEX]|5041C|5042[ADEFGWX]|5044[ADGIKOPSTY]|5045[ADFGIJTXY]|5046[ADGIJSTUY]|5047[DIUY]|5048A|5049[EGSWZ]|5050[ASXY]|5051[ADEJMTWX]|5052[AD](_RU)?|5053A|5054[ADNSTWX]|5056[ADEGIJMNTUWX]|5057M|5058[AIY](_RU)?|5059[ADXYZ](_RU)?|5065[ADNWX]|5070D|5080[ADFQUX]|5085[ABCDGHIJNOQY]|5086[ADY]|5090[AIY]|5095[IKY]|5098[OS]|5099[ADYUI](_RU)?|5116J|5145A|6016[ADEX]|6036[AXY]|6037[BKY]|6039[AHJKY]|6043[AD]|6044D|6045[BFIKOY]|6050[AFY]|6055[ABDHIKPUYZ]|6058[ADX]|6060S|6062W|6070K|7040[ADEFKRT]|7041[DX]|7043[AEKY]|7044[AX]|7045Y|7048[ASWX]|7055A|7070X|8030Y|8050[DEGX]|8063|9001[DIX]|9002X|9003[AX]|9024O|9005X|9026X|9007[ATX]|9008[ADIJNTUX]|9010X|9022X|9027[FTWX]|9203A|A570BL|I213|I216X|A50[13]DL|A574BL|A57[17]VL|A464BG|5028Y[_ ]EEA|5048Y[_ ]EEA)[);/ ]|TIMXL'
regex: 'Alcatel|Alc(?!or )[a-z0-9]+|One[ _]?Touch|idol3|(?:4003[AJ]|4009[ADEFIKMSX]|4013[DEJKMX]|4014[ADEKMX]|4015[ADNTX]|4016[ADX]|4017[ADEFSX]|4018[ADEFMX]|4024[EDX]|4027[ADNX]|4028[AEJS]|4032[ADEX]|4034[ADEFGX]|4035[ADXY]|4045[ADEX]|4047[ADFGNX]|4049[DEGMX]|4060[SW]|A466BG|A621BL|4114E|5001[ADJTU](?:_EEA|_RU)?|5009[AD]|5010[DEGSUX]|5011A|5012[DFG]|5015[ADEX]|5016[AXJ]|5017[ABDEOX]|5019D|5022[EDX]|5023[EF]|5024[ADJ](?:_RU|_EEA)?|5025[DEG]|5026[ADJ]|5027B|5028A|5032W|5033[AX]|5033[DJ](?:[ _]RU)?|5034D(_RU)?|5038[ADEX]|5041[CD]|5042[ADEFGWX]|5044[ADGIKOPSTY]|5045[ADFGIJTXY]|5046[ADGIJSTUY]|5047[DIUY]|5048A|5049[EGSWZ]|5050[ASXY]|5051[ADEJMTWX]|5052[AD](_RU)?|5053A|5054[ADNSTWX]|5056[ADEGIJMNTUWX]|5057M|5058[AIY](_RU)?|5059[ADXYZ](_RU)?|5065[ADNWX]|5070D|5080[ADFQUX]|5085[ABCDGHIJNOQY]|5086[ADY]|5090[AIY]|5095[IKY]|5098[OS]|5099[ADYUI](_RU)?|5116J|5145A|6016[ADEX]|6036[AXY]|6037[BKY]|6039[AHJKY]|6043[AD]|6044D|6045[BFIKOY]|6050[AFY]|6055[ABDHIKPUYZ]|6058[ADX]|6060S|6062W|6070K|7040[ADEFKRT]|7041[DX]|7043[AEKY]|7044[AX]|7045Y|7048[ASWX]|7055A|7070X|8030Y|8050[DEGX]|8063|9001[DIX]|9002X|9003[AX]|9024O|9005X|9026X|9007[ATX]|9008[ADIJNTUX]|9010X|9022X|9027[FTWX]|9203A|A570BL|I213|I216X|A50[13]DL|A574BL|A57[17]VL|A464BG|5028Y[_ ]EEA|5048Y[_ ]EEA)[);/ ]|TIMXL'
device: 'smartphone'
models:
- regex: '(?:5022[EDX]|5070D)[);/ ]'
Expand Down Expand Up @@ -1227,6 +1227,8 @@ Alcatel:
model: 'One Touch Pixi 4 Plus Power'
- regex: '5010[DEGSUX][);/ ]'
model: 'One Touch Pixi 4 5" 3G'
- regex: '5041D[);/ ]'
model: 'One Touch Pixi 4 5.0"'
- regex: '5012[DFG][);/ ]'
model: 'One Touch Pixi 4 5.5" 3G'
- regex: '(?:5045[ADFGIJTXY]|5145A)[);/ ]'
Expand Down Expand Up @@ -15393,7 +15395,7 @@ Soyes:

# Zidoo
Zidoo:
regex: 'ZIDOO[ _](H6 Pro|X6 Pro|X9S|Z10|X5)[);/ ]'
regex: 'ZIDOO[ _](H6 Pro|X6 Pro|X9S|Z10|X[58])[);/ ]'
device: 'tv'
model: '$1'

Expand Down Expand Up @@ -16051,4 +16053,14 @@ BB Mobile:
Billion:
regex: 'Capture\+[);/ ]'
device: 'smartphone'
model: 'Capture Plus'
model: 'Capture Plus'

# Tele2 (mobile operator)
Tele2:
regex: 'Tele2[ _](?:Mi[dn]i[ _]1[\._]1|Mini)[);/ ]'
device: 'smartphone'
models:
- regex: 'Tele2[ _]Mini[ _]1[_\.]1[);/ ]'
model: 'Mini 1.1'
- regex: 'Tele2[ _](Midi[ _]1\.1|Mini)[);/ ]'
model: '$1'

0 comments on commit d0de8a2

Please sign in to comment.