Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds detection for allente, alpsmart, CommScope, Formovie, Grünberg, multibox brands, improves detection for BenQ, Haier, Kodak, ok., Philips, Stilevs, #7961

Merged
merged 17 commits into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DeviceDetector.php
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,7 @@ protected function parseDevice(): void
/**
* All devices that contain Andr0id in string are assumed to be a tv
*/
if ($this->matchUserAgent('Andr0id|(?:Android(?: UHD)?|Google) TV|\(lite\) TV|BRAVIA| TV$')) {
if ($this->matchUserAgent('Andr0id|(?:Android(?: UHD)?|(?<!Xming )Google) TV|\(lite\) TV|BRAVIA| TV$')) {
$this->device = AbstractDeviceParser::DEVICE_TYPE_TV;
}

Expand Down
8 changes: 7 additions & 1 deletion Parser/Device/AbstractDeviceParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,11 @@ abstract class AbstractDeviceParser extends AbstractParser
'ALS' => 'All Star',
'AA' => 'AllCall',
'3A' => 'AllDocube',
'ALL' => 'allente',
'A2' => 'Allview',
'ALI' => 'ALLINmobile',
'A7' => 'Allwinner',
'ALP' => 'alpsmart',
'A1' => 'Altech UEC',
'66' => 'Altice',
'ALM' => 'Altimo',
Expand Down Expand Up @@ -375,6 +377,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'CY' => 'Coby Kyros',
'XC' => 'Cobalt',
'C6' => 'Comio',
'COM' => 'CommScope',
'CL' => 'Compal',
'CQ' => 'Compaq',
'C7' => 'ComTrade Tesla',
Expand Down Expand Up @@ -644,6 +647,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'44' => 'Four Mobile',
'F0' => 'Fonos',
'F2' => 'FORME',
'FRM' => 'Formovie',
'F5' => 'Formuler',
'FR' => 'Forstar',
'RF' => 'Fortis',
Expand Down Expand Up @@ -737,6 +741,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'GR1' => 'GroBerwert',
'GF' => 'Gretel',
'82' => 'Gresso',
'GRB' => 'Grünberg',
'GU' => 'Grundig',
'GV' => 'Gtel',
'CUO' => 'Guophone',
Expand Down Expand Up @@ -1187,6 +1192,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'72' => 'M-Tech',
'9H' => 'M-Horse',
'MKP' => 'M-KOPA',
'MLB' => 'multibox',
'1R' => 'Multilaser',
'MPS' => 'MultiPOS',
'1M' => 'MYFON',
Expand Down Expand Up @@ -1297,7 +1303,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'OQ' => 'Meta',
'O1' => 'Odys',
'ODP' => 'Odotpad',
'O9' => 'Ok',
'O9' => 'ok.',
'OKA' => 'Okapi',
'OA' => 'Okapia',
'OKI' => 'Oking',
Expand Down
36 changes: 36 additions & 0 deletions Tests/fixtures/peripheral.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1630,3 +1630,39 @@
model: MoGo Pro
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 11; Xming Google TV Build/RTM7.230903.079; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/129.0.6668.102 Mobile Safari/537.36
os:
name: Android TV
version: "11"
platform: ""
client:
type: browser
name: Chrome Webview
version: 129.0.6668.102
engine: Blink
engine_version: 129.0.6668.102
device:
type: peripheral
brand: Formovie
model: Xming
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 11; SCN550 Build/RTM6.230109.257; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/129.0.6668.102 Mobile Safari/537.36
os:
name: Android
version: "11"
platform: ""
client:
type: browser
name: Chrome Webview
version: 129.0.6668.102
engine: Blink
engine_version: 129.0.6668.102
device:
type: peripheral
brand: Philips
model: Screeneo U5
os_family: Android
browser_family: Chrome
2 changes: 1 addition & 1 deletion Tests/fixtures/tv-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1911,7 +1911,7 @@
engine_version: 75.0.3770.143
device:
type: tv
brand: Ok
brand: ok.
model: 4K (2020)
os_family: Android
browser_family: Chrome
Expand Down
270 changes: 270 additions & 0 deletions Tests/fixtures/tv-4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6996,3 +6996,273 @@
model: 24HEY1
os_family: Android
browser_family: Unknown
-
user_agent: Mozilla/5.0 (Linux; Android 13; GR32200 Build/TP1A.220905.004.A2; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/101.0.4951.61 Safari/537.36
os:
name: Android
version: "13"
platform: ""
client:
type: browser
name: Chrome Webview
version: 101.0.4951.61
engine: Blink
engine_version: 101.0.4951.61
device:
type: tv
brand: Grünberg
model: GR32200
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 13; GR43200 Build/TP1A.220905.004.A2; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/101.0.4951.61 Safari/537.36
os:
name: Android
version: "13"
platform: ""
client:
type: browser
name: Chrome Webview
version: 101.0.4951.61
engine: Blink
engine_version: 101.0.4951.61
device:
type: tv
brand: Grünberg
model: GR43200
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 12; AS512 Build/SP1A.211105.004; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/91.0.4472.114 Mobile Safari/537.36
os:
name: Android
version: "12"
platform: ""
client:
type: browser
name: Chrome Webview
version: 91.0.4472.114
engine: Blink
engine_version: 91.0.4472.114
device:
type: tv
brand: alpsmart
model: AS512
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 12; AS514 Build/SP1A.211105.004; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/91.0.4472.114 Mobile Safari/537.36
os:
name: Android
version: "12"
platform: ""
client:
type: browser
name: Chrome Webview
version: 91.0.4472.114
engine: Blink
engine_version: 91.0.4472.114
device:
type: tv
brand: alpsmart
model: AS514
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 12; AS515 Build/SP1A.211105.004; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/91.0.4472.114 Mobile Safari/537.36
os:
name: Android
version: "12"
platform: ""
client:
type: browser
name: Chrome Webview
version: 91.0.4472.114
engine: Blink
engine_version: 91.0.4472.114
device:
type: tv
brand: alpsmart
model: AS515
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 12; AS516 Build/SP1A.211105.004; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/91.0.4472.114 Mobile Safari/537.36
os:
name: Android
version: "12"
platform: ""
client:
type: browser
name: Chrome Webview
version: 91.0.4472.114
engine: Blink
engine_version: 91.0.4472.114
device:
type: tv
brand: alpsmart
model: AS516
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 11; VIP7802 Build/RTT4.230821.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/130.0.6723.58 Mobile Safari/537.36
os:
name: Android
version: "11"
platform: ""
client:
type: browser
name: Chrome Webview
version: 130.0.6723.58
engine: Blink
engine_version: 130.0.6723.58
device:
type: tv
brand: CommScope
model: VIP7802
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 11; QS02 Build/RT; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/129.0.6668.100 Mobile Safari/537.36
os:
name: Android
version: "11"
platform: ""
client:
type: browser
name: Chrome Webview
version: 129.0.6668.100
engine: Blink
engine_version: 129.0.6668.100
device:
type: tv
brand: BenQ
model: QS02
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 10; Allente 1 Build/QTG1.200820.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/129.0.6668.102 Mobile Safari/537.36
os:
name: Android
version: "10"
platform: ""
client:
type: browser
name: Chrome Webview
version: 129.0.6668.102
engine: Blink
engine_version: 129.0.6668.102
device:
type: tv
brand: allente
model: Allente 1
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 10; Fundroid MB18 Build/QP1A.191105.004; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.186 Safari/537.36
os:
name: Android
version: "10"
platform: ""
client:
type: browser
name: Chrome Webview
version: 74.0.3729.186
engine: Blink
engine_version: 74.0.3729.186
device:
type: tv
brand: multibox
model: Fundroid MB18
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 10; Fundroid MB216 Build/QP1A.191105.004; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.186 Safari/537.36
os:
name: Android
version: "10"
platform: ""
client:
type: browser
name: Chrome Webview
version: 74.0.3729.186
engine: Blink
engine_version: 74.0.3729.186
device:
type: tv
brand: multibox
model: Fundroid MB216
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 11; STILEVS SMART TV Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.120 Safari/537.36
os:
name: Android TV
version: "11"
platform: ""
client:
type: browser
name: Chrome Webview
version: 83.0.4103.120
engine: Blink
engine_version: 83.0.4103.120
device:
type: tv
brand: Stilevs
model: Smart TV
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 11; OK Google TV Build/RTM7.230903.015; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/129.0.6668.100 Mobile Safari/537.36
os:
name: Android TV
version: "11"
platform: ""
client:
type: browser
name: Chrome Webview
version: 129.0.6668.100
engine: Blink
engine_version: 129.0.6668.100
device:
type: tv
brand: ok.
model: Smart TV
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 11; Haier MatrixTV AEL Build/RTM6.230109.197; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/129.0.6668.100 Mobile Safari/537.36
os:
name: Android
version: "11"
platform: ""
client:
type: browser
name: Chrome Webview
version: 129.0.6668.100
engine: Blink
engine_version: 129.0.6668.100
device:
type: tv
brand: Haier
model: Smart TV
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 9; PATH_7XPRO Build/PI; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/129.0.6668.100 Mobile Safari/537.36
os:
name: Android
version: "9"
platform: ""
client:
type: browser
name: Chrome Webview
version: 129.0.6668.100
engine: Blink
engine_version: 129.0.6668.100
device:
type: tv
brand: Kodak
model: 7XPRO
os_family: Android
browser_family: Chrome
2 changes: 1 addition & 1 deletion Tests/fixtures/tv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8141,7 +8141,7 @@
engine_version: 53.0.2785.143
device:
type: tv
brand: Ok
brand: ok.
model: Smart TV (2017)
os_family: GNU/Linux
browser_family: Opera
Expand Down
Loading
Loading