Skip to content

Commit

Permalink
Pr device2 (#5594)
Browse files Browse the repository at this point in the history
* new brand Homtom

*  Homtom detected models HT3 HT17 HT20 etc

* adds models SENSEIT R390, R450, L301, A200, A109, E510, E500, E400

* add detect model `Xperia C5 Ultra`  user-agent ( Linux; Android 5.0; E5506 Build/29.0 )

* fix Xperia C5 Ultra brand Sony;
add models Sony Xperia M5 -  E5603, E5606, E5653
add model Sony Xperia M5 Dual - E5633, E5643, E5663

* fix Senseit regex regular

* fix Xperia C5 Ultra regex regular
  • Loading branch information
sanchezzzhak authored and sgiehl committed Mar 9, 2017
1 parent d5ce669 commit 5c6b042
Show file tree
Hide file tree
Showing 3 changed files with 135 additions and 2 deletions.
1 change: 1 addition & 0 deletions Parser/Device/DeviceParserAbstract.php
Expand Up @@ -300,6 +300,7 @@ abstract class DeviceParserAbstract extends ParserAbstract
'SH' => 'Sharp',
'SI' => 'Siemens',
'SN' => 'Sendo',
'S6' => 'Senseit',
'SK' => 'Skyworth',
'SC' => 'Smartfren',
'SO' => 'Sony',
Expand Down
122 changes: 122 additions & 0 deletions Tests/fixtures/smartphone-4.yml
Expand Up @@ -8455,3 +8455,125 @@
model: ZMAX Pro
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 5.0; SENSEIT E500 Build/LRX21M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.83 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: "5.0"
platform:
client:
type: browser
name: Chrome Mobile
short_name: CM
version: "47.0.2526.83"
engine: Blink
engine_version:
device:
type: smartphone
brand: S6
model: E500
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 4.2.2; SENSEIT R390 Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.76 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: "4.2.2"
platform:
client:
type: browser
name: Chrome Mobile
short_name: CM
version: "46.0.2490.76"
engine: Blink
engine_version:
device:
type: smartphone
brand: S6
model: R390
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 6.0; SENSEIT A109 Build/MRA58K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: "6.0"
platform:
client:
type: browser
name: Chrome Mobile
short_name: CM
version: "56.0.2924.87"
engine: Blink
engine_version:
device:
type: smartphone
brand: S6
model: A109
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 6.0; SENSEIT L301 Build/MRA58K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: "6.0"
platform:
client:
type: browser
name: Chrome Mobile
short_name: CM
version: "56.0.2924.87"
engine: Blink
engine_version:
device:
type: smartphone
brand: S6
model: L301
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 5.0; E5506 Build/29.0.A.0.161) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.93 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: "5.0"
platform:
client:
type: browser
name: Chrome Mobile
short_name: CM
version: "43.0.2357.93"
engine: Blink
engine_version:
device:
type: smartphone
brand: SO
model: Xperia C5 Ultra
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 5.1; E5633 Build/30.1.B.1.55) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.89 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: "5.1"
platform:
client:
type: browser
name: Chrome Mobile
short_name: CM
version: "50.0.2661.89"
engine: Blink
engine_version:
device:
type: smartphone
brand: SO
model: Xperia M5 Dual
os_family: Android
browser_family: Chrome


14 changes: 12 additions & 2 deletions regexes/device/mobiles.yml
Expand Up @@ -1267,9 +1267,15 @@ Rikomagic:
device: 'tv'
model: 'MK$1'

# Senseit
Senseit:
regex: 'SENSEIT[ _]?([^;/)]+) Build'
device: 'smartphone'
model: '$1'

# Sony & Sony Ericsson (combined as they are mixed up)
Sony:
regex: 'Sony(?: ?Ericsson)?|SGP|Xperia|C1[569]0[45]|C2[01]0[45]|C2305|C530[236]|C550[23]|C6[56]0[236]|C6616|C68(?:0[26]|[34]3)|C69(?:0[236]|16|43)|D200[45]|D21(?:0[45]|14)|D22(?:0[236]|12|43)|D230[2356]|D240[36]|D25(?:02|33)|D510[236]|D530[36]|D5322|D5503|D58[03]3|D65(?:0[23]|43)|D66[035]3|E210[45]|E2115|E2[03]03|E2306|E2312|E2353|E58[02]3|E5603|E6553|E66[358]3|E68[58]3|F3111|F331[13]|F3213|F5[13]21|F833[12]|(?:WT|LT|SO|ST|SK|MK)[0-9]+[a-z]*[0-9]*(?: Build|\))|X?L39H|XM50[ht]|W960|portalmmm/2\.0 K|S3[69]h|X10[ia]v?|E1[05][ai]v?|MT[0-9]{2}[a-z]? Build|SO-0(?:[345]D|[234]E|[12]C|[1235]F|[12]G)|R800[aix]|LiveWithWalkman'
regex: 'Sony(?: ?Ericsson)?|SGP|Xperia|C1[569]0[45]|C2[01]0[45]|C2305|C530[236]|C550[23]|C6[56]0[236]|C6616|C68(?:0[26]|[34]3)|C69(?:0[236]|16|43)|D200[45]|D21(?:0[45]|14)|D22(?:0[236]|12|43)|D230[2356]|D240[36]|D25(?:02|33)|D510[236]|D530[36]|D5322|D5503|D58[03]3|D65(?:0[23]|43)|D66[035]3|E210[45]|E2115|E5506|E2[03]03|E2306|E2312|E2353|E58[02]3|E56[46305][36]|E6553|E66[358]3|E68[58]3|F3111|F331[13]|F3213|F5[13]21|F833[12]|(?:WT|LT|SO|ST|SK|MK)[0-9]+[a-z]*[0-9]*(?: Build|\))|X?L39H|XM50[ht]|W960|portalmmm/2\.0 K|S3[69]h|X10[ia]v?|E1[05][ai]v?|MT[0-9]{2}[a-z]? Build|SO-0(?:[345]D|[234]E|[12]C|[1235]F|[12]G)|R800[aix]|LiveWithWalkman'
device: 'smartphone'
models:
# SONY ERICSSON: explicit smartphone models
Expand Down Expand Up @@ -1477,8 +1483,10 @@ Sony:
model: 'Xperia M4 Aqua'
- regex: '(?:Sony(?:Ericsson)?)?E2312'
model: 'Xperia M4 Aqua Dual'
- regex: '(?:Sony(?:Ericsson)?)?E5603'
- regex: '(?:Sony(?:Ericsson)?)?E56[05][36]'
model: 'Xperia M5'
- regex: '(?:Sony(?:Ericsson)?)?E56[436]3'
model: 'Xperia M5 Dual'
- regex: '(?:Sony(?:Ericsson)?)?D2502'
model: 'Xperia C3 Dual'
- regex: '(?:Sony(?:Ericsson)?)?D2533'
Expand Down Expand Up @@ -1529,6 +1537,8 @@ Sony:
model: 'Xperia X'
- regex: '(?:Sony(?:Ericsson)?)?F5321'
model: 'Xperia X Compact'
- regex: '(?:Sony(?:Ericsson)?)?E5506'
model: 'Xperia C5 Ultra'

# SONY: explicit tablet models
- regex: 'SGP(?:311|312|321)[);/ ]|SO-03E'
Expand Down

0 comments on commit 5c6b042

Please sign in to comment.