Skip to content

Commit

Permalink
Adds detection for Epson EF-100 (#7964)
Browse files Browse the repository at this point in the history
* Adds detection for Epson EF-100
* Improve peripheral detection

ref #7963
  • Loading branch information
liviuconcioiu authored Dec 27, 2024
1 parent cc8fa0c commit 23a1a4e
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 21 deletions.
7 changes: 6 additions & 1 deletion DeviceDetector.php
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,12 @@ protected function parseDevice(): void
/**
* All devices that contain Andr0id in string are assumed to be a tv
*/
if ($this->matchUserAgent('Andr0id|(?:Android(?: UHD)?|(?<!Xming )Google) TV|\(lite\) TV|BRAVIA| TV$')) {
$hasDeviceTvType = false === \in_array($this->device, [
AbstractDeviceParser::DEVICE_TYPE_TV,
AbstractDeviceParser::DEVICE_TYPE_PERIPHERAL,
]) && $this->matchUserAgent('Andr0id|(?:Android(?: UHD)?|Google) TV|\(lite\) TV|BRAVIA| TV$');

if ($hasDeviceTvType) {
$this->device = AbstractDeviceParser::DEVICE_TYPE_TV;
}

Expand Down
36 changes: 36 additions & 0 deletions Tests/fixtures/peripheral.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1666,3 +1666,39 @@
model: Screeneo U5
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 10; STI6110 Build/QT; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/124.0.6367.123 YaBrowser/24.10.0.358 (lite) TV Safari/537.36
os:
name: Android
version: "10"
platform: ""
client:
type: browser
name: Yandex Browser Lite
version: 24.10.0.358
engine: Blink
engine_version: 124.0.6367.123
device:
type: peripheral
brand: Epson
model: EF-100
os_family: Android
browser_family: Unknown
-
user_agent: Mozilla/5.0 (Linux; Android 10; XK03H Build/QX; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/126.0.6478.133 YaBrowser/24.1.2.221 (lite) TV Safari/537.36
os:
name: Android
version: "10"
platform: ""
client:
type: browser
name: Yandex Browser Lite
version: 24.1.2.221
engine: Blink
engine_version: 126.0.6478.133
device:
type: peripheral
brand: XGIMI
model: Horizon Pro
os_family: Android
browser_family: Unknown
18 changes: 0 additions & 18 deletions Tests/fixtures/tv-3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9165,24 +9165,6 @@
model: 43LE7052D
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 10; XK03H Build/QX; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/126.0.6478.133 YaBrowser/24.1.2.221 (lite) TV Safari/537.36
os:
name: Android
version: "10"
platform: ""
client:
type: browser
name: Yandex Browser Lite
version: 24.1.2.221
engine: Blink
engine_version: 126.0.6478.133
device:
type: tv
brand: XGIMI
model: Horizon Pro
os_family: Android
browser_family: Unknown
-
user_agent: Mozilla/5.0 (Linux; Android 10; SEI600GO) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.88 Mobile Safari/537.36
os:
Expand Down
8 changes: 6 additions & 2 deletions regexes/device/mobiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38158,9 +38158,13 @@ Novex:

# Epson (epson.com)
Epson:
regex: 'Projector(?:[);/ ]|$)'
regex: '(?:Projector|STI6110)(?:[);/ ]|$)'
device: 'peripheral'
model: 'HA14A LCD Projector' # sti6200-d101
models:
- regex: 'Projector'
model: 'HA14A LCD Projector' # sti6200-d101
- regex: 'STI6110'
model: 'EF-100' # Askey

# Awow or AWOW (awowtech.com)
Awow:
Expand Down

0 comments on commit 23a1a4e

Please sign in to comment.