Skip to content

Commit

Permalink
Adds detection for System76 brand and improves detection for Apple an…
Browse files Browse the repository at this point in the history
…d Meta devices (#7641)

* Improves detection for Apple Watch
* Adds detection for Meta Quest 2 and Quest Pro
* Adds detection for System76
* Adds detection for Meta Portal Go
  • Loading branch information
liviuconcioiu committed Mar 25, 2024
1 parent 19baec0 commit 8ee1bdc
Show file tree
Hide file tree
Showing 6 changed files with 121 additions and 2 deletions.
1 change: 1 addition & 0 deletions Parser/Device/AbstractDeviceParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -1526,6 +1526,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'SYC' => 'Syco',
'SM' => 'Symphony',
'4S' => 'Syrox',
'SYS' => 'System76',
'TM' => 'T-Mobile',
'T96' => 'T96',
'TAD' => 'TADAAM',
Expand Down
36 changes: 36 additions & 0 deletions Tests/fixtures/desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9711,3 +9711,39 @@
model: Chromebook Flip C101PA
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Wayland; Linux x86_64; System76 Galago Pro (galp2)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.175 Safari/537.36 Ubuntu/22.04 (5.0.2497.48-1) Vivaldi/5.0.2497.48
os:
name: Ubuntu
version: "22.04"
platform: x64
client:
type: browser
name: Vivaldi
version: "5.0.2497.48"
engine: Blink
engine_version: "96.0.4664.175"
device:
type: desktop
brand: System76
model: Galago Pro
os_family: GNU/Linux
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Wayland; Linux x86_64; System76) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.133 Safari/537.36 Ubuntu/22.04 (5.2.2623.34-1) Vivaldi/5.2.2623.39
os:
name: Ubuntu
version: "22.04"
platform: x64
client:
type: browser
name: Vivaldi
version: "5.2.2623.39"
engine: Blink
engine_version: "100.0.4896.133"
device:
type: desktop
brand: System76
model: ""
os_family: GNU/Linux
browser_family: Chrome
18 changes: 18 additions & 0 deletions Tests/fixtures/smart_display.yml
Original file line number Diff line number Diff line change
Expand Up @@ -429,3 +429,21 @@
model: XD-SDD05-2101
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 10; PortalGo) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.9999.0 Safari/537.36
os:
name: Android
version: "10"
platform: ""
client:
type: browser
name: Chrome
version: "102.0.9999.0"
engine: Blink
engine_version: "102.0.9999.0"
device:
type: smart display
brand: Meta
model: Portal Go
os_family: Android
browser_family: Chrome
13 changes: 13 additions & 0 deletions Tests/fixtures/unknown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3436,3 +3436,16 @@
model: ""
os_family: Windows
browser_family: Chrome
-
user_agent: ESPN Watch Extension/6396 CFNetwork/1333.0.4 Darwin/21.5.0
os:
name: iOS
version: "15.5"
platform: ""
client: null
device:
type: ""
brand: Apple
model: ""
os_family: iOS
browser_family: Unknown
36 changes: 36 additions & 0 deletions Tests/fixtures/wearable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2297,3 +2297,39 @@
model: ""
os_family: Android
browser_family: Firefox
-
user_agent: Mozilla/5.0 (X11; Linux x86_64; Quest 3) AppleWebKit/537.36 (KHTML, like Gecko) OculusBrowser/32.1.0.37.133.575621010 Chrome/122.0.6261.64 VR Safari/537.36
os:
name: Android
version: ""
platform: x64
client:
type: browser
name: Oculus Browser
version: "32.1.0.37.133.575621010"
engine: Blink
engine_version: "122.0.6261.64"
device:
type: wearable
brand: Meta
model: Quest 3
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (X11; Linux x86_64; Quest Pro) AppleWebKit/537.36 (KHTML, like Gecko) OculusBrowser/32.1.0.37.133.575621010 Chrome/122.0.6261.64 VR Safari/537.36
os:
name: Android
version: ""
platform: x64
client:
type: browser
name: Oculus Browser
version: "32.1.0.37.133.575621010"
engine: Blink
engine_version: "122.0.6261.64"
device:
type: wearable
brand: Meta
model: Quest Pro
os_family: Android
browser_family: Chrome
19 changes: 17 additions & 2 deletions regexes/device/mobiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,7 @@ Apple:
- regex: 'Watch7,[24]'
device: 'wearable'
model: 'Watch Series 9 45mm'
- regex: 'Watch|for Apple Watch'
- regex: 'Apple Watch'
device: 'wearable'
model: 'Watch'

Expand Down Expand Up @@ -6373,13 +6373,20 @@ Cube:

# Meta (https://about.facebook.com/), former Oculus (https://www.oculus.com/)
Meta:
regex: '(?:Pacific|(?<!like )Quest).+OculusBrowser|Standalone HMD'
regex: '(?:Pacific|(?<!like )Quest).+OculusBrowser|Standalone HMD|PortalGo'
device: 'wearable'
models:
- regex: 'Pacific'
model: 'Go'
- regex: 'PortalGo'
model: 'Portal Go'
device: 'smart display'
- regex: 'Quest 3'
model: 'Quest 3'
- regex: '(?:Quest 2|Standalone HMD)'
model: 'Quest 2'
- regex: 'Quest Pro'
model: 'Quest Pro'
- regex: 'Quest'
model: 'Quest'

Expand Down Expand Up @@ -23546,6 +23553,14 @@ Syrox:
device: 'tablet'
model: '$1'

# System76 (https://system76.com/)
System76:
regex: 'System76'
device: 'desktop'
models:
- regex: 'System76 Galago Pro(?:[);/ ]|$)'
model: 'Galago Pro'

# Qtek
Qtek:
regex: 'Qtek[ _]?([a-z0-9]+)'
Expand Down

0 comments on commit 8ee1bdc

Please sign in to comment.