Skip to content

Commit

Permalink
Merge branch 'master' into devices
Browse files Browse the repository at this point in the history
  • Loading branch information
liviuconcioiu committed Nov 13, 2023
2 parents 9d586f7 + dd1d060 commit 2030287
Show file tree
Hide file tree
Showing 14 changed files with 172 additions and 16 deletions.
2 changes: 1 addition & 1 deletion DeviceDetector.php
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,7 @@ protected function parseDevice(): void
/**
* All devices that contain Andr0id in string are assumed to be a tv
*/
if ($this->matchUserAgent('Andr0id|Android TV|\(lite\) TV|BRAVIA')) {
if ($this->matchUserAgent('Andr0id|(?:Android(?: UHD)?|Google) TV|\(lite\) TV|BRAVIA')) {
$this->device = AbstractDeviceParser::DEVICE_TYPE_TV;
}

Expand Down
4 changes: 2 additions & 2 deletions Parser/Client/Browser/Engine/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ public function parse(): ?array
$engineToken = $this->engine;

if ('Blink' === $this->engine) {
$engineToken = 'Chrome';
$engineToken = 'Chrome|Cronet';
}

\preg_match(
"~{$engineToken}\s*/?\s*((?(?=\d+\.\d)\d+[.\d]*|\d{1,7}(?=(?:\D|$))))~i",
"~(?:{$engineToken})\s*/?\s*((?(?=\d+\.\d)\d+[.\d]*|\d{1,7}(?=(?:\D|$))))~i",
$this->userAgent,
$matches
);
Expand Down
1 change: 1 addition & 0 deletions Parser/Device/AbstractDeviceParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'LEG' => 'Legend',
'L4' => 'Lemhoov',
'W9' => 'LEMFO',
'LEM' => 'Lemco',
'LN' => 'Lenco',
'LE' => 'Lenovo',
'LT' => 'Leotec',
Expand Down
3 changes: 2 additions & 1 deletion Parser/OperatingSystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ class OperatingSystem extends AbstractParser
'TEN' => 'TencentOS',
'TDX' => 'ThreadX',
'TIZ' => 'Tizen',
'TIV' => 'TiVo OS',
'TOS' => 'TmaxOS',
'UBT' => 'Ubuntu',
'VID' => 'VIDAA',
Expand Down Expand Up @@ -206,7 +207,7 @@ class OperatingSystem extends AbstractParser
'ORD', 'TOS', 'RSO', 'DEE', 'FRE', 'MAG', 'FEN', 'CAI', 'PCL', 'HAS',
'LOS', 'DVK', 'ROK', 'OWR', 'OTV', 'KTV', 'PUR', 'PLA', 'FUC', 'PAR',
'FOR', 'MON', 'KAN', 'ZEN', 'LND', 'LNS', 'CHN', 'AMZ', 'TEN', 'CST',
'NOV', 'ROU', 'ZOR', 'RED', 'KAL', 'ORA', 'VID',
'NOV', 'ROU', 'ZOR', 'RED', 'KAL', 'ORA', 'VID', 'TIV',
],
'Mac' => ['MAC'],
'Mobile Gaming Console' => ['PSP', 'NDS', 'XBX'],
Expand Down
14 changes: 7 additions & 7 deletions README.md

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions Tests/Parser/Client/fixtures/browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7621,3 +7621,12 @@
engine: Presto
engine_version: 2.5.25
family: Opera
-
user_agent: com.tcl.browser/660020 (Linux; U; Android 11; tr_TR; Arcelik Android UHD TV; Build/RTM6.230109.219; Cronet/114.0.5735.33)
client:
type: browser
name: BrowseHere
version: ""
engine: Blink
engine_version: 114.0.5735.33
family:
6 changes: 6 additions & 0 deletions Tests/Parser/Client/fixtures/mediaplayer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,3 +203,9 @@
type: mediaplayer
name: JHelioviewer
version: 4.4.2.10777
-
user_agent: com.devcoder.iptvxtreamplayer/111 (Linux; U; Android 12; en; Philips Google TV TA1; Build/STT2.220929.001; Cronet/114.0.5735.33)
client:
type: mediaplayer
name: Xtream Player
version: ""
8 changes: 8 additions & 0 deletions Tests/Parser/fixtures/oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3958,3 +3958,11 @@
version: "4.21"
platform: ARM
family: GNU/Linux
-
user_agent: Mozilla/5.0 (Linux ) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.5359.128 Safari/537.36 OPR/46.0.2207.0 OMI/4.23.2.96.LIMA2.89 Model/Vestel-MB180 VSTVB MB100 FVC/8.0 (OEM; MB180; ) HbbTV/1.6.1 (+DRM; OEM; MB180; 0.32.0.0; ; _TV_G31_2023;) TiVoOS/1.0.0 (Vestel MB180 OEM) SmartTvA/3.0.0
os:
name: TiVo OS
short_name: TIV
version: 1.0.0
platform: ""
family: GNU/Linux
36 changes: 36 additions & 0 deletions Tests/fixtures/peripheral.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1234,3 +1234,39 @@
model: Smart LED 3D Projector
os_family: Android
browser_family: Opera
-
user_agent: Mozilla/5.0 (Lemco FBX-3566; Linux aarch64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.15.2 Chrome/87.0.4280.144 Safari/537.36
os:
name: GNU/Linux
version: ""
platform: ARM
client:
type: browser
name: QtWebEngine
version: 5.15.2
engine: WebKit
engine_version: "537.36"
device:
type: peripheral
brand: Lemco
model: FBX-3566
os_family: GNU/Linux
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Lemco FBX-3566W; Linux aarch64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.15.2 Chrome/87.0.4280.144 Safari/537.36
os:
name: GNU/Linux
version: ""
platform: ARM
client:
type: browser
name: QtWebEngine
version: 5.15.2
engine: WebKit
engine_version: "537.36"
device:
type: peripheral
brand: Lemco
model: FBX-3566W
os_family: GNU/Linux
browser_family: Chrome
72 changes: 71 additions & 1 deletion Tests/fixtures/tv-2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1566,7 +1566,7 @@
-
user_agent: Mozilla/5.0 (Linux; Android 11; 4K Google TV Stick Build/RTT0.210618.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/101.0.4951.61 Mobile Safari/537.36
os:
name: Android
name: Android TV
version: "11"
platform: ""
client:
Expand Down Expand Up @@ -5719,3 +5719,73 @@
model: OV50500
os_family: Other Mobile
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux armv7l) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36 OPR/36.0.2128.0 OMI/4.8.0.129.JFK.651 TV Store/4.8 Model/TiVo-Cogeco-TCDD16000
os:
name: Opera TV
version: "4.8"
platform: ARM
client:
type: browser
name: Opera Devices
version: 4.8.0.129
engine: Blink
engine_version: 49.0.2623.112
device:
type: tv
brand: TiVo
model: TCDD16000
os_family: GNU/Linux
browser_family: Opera
-
user_agent: Mozilla/5.0 (Linux; Android 11; Arcelik Android UHD TV Build/RTM6.230109.219; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/119.0.6045.66 Mobile Safari/537.36
os:
name: Android TV
version: "11"
platform: ""
client:
type: browser
name: Chrome Webview
version: 119.0.6045.66
engine: Blink
engine_version: 119.0.6045.66
device:
type: tv
brand: Arçelik
model: ""
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 11; Arcelik Google TV Build/RTM6.230109.257; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/118.0.0.0 Mobile Safari/537.36
os:
name: Android TV
version: "11"
platform: ""
client:
type: browser
name: Chrome Webview
version: 118.0.0.0
engine: Blink
engine_version: 118.0.0.0
device:
type: tv
brand: Arçelik
model: ""
os_family: Android
browser_family: Chrome
-
user_agent: com.devcoder.iptvxtreamplayer/111 (Linux; U; Android 12; en; Philips Google TV TA1; Build/STT2.220929.001; Cronet/114.0.5735.33)
os:
name: Android TV
version: "12"
platform: ""
client:
type: mediaplayer
name: Xtream Player
version: ""
device:
type: tv
brand: Philips
model: Android TV
os_family: Android
browser_family: Unknown
7 changes: 6 additions & 1 deletion regexes/client/browsers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -581,12 +581,17 @@
engine:
default: 'Blink'

# T-Browser (https://play.google.com/store/apps/details?id=com.tcl.browser)
# T-Browser and new BrowseHere (https://play.google.com/store/apps/details?id=com.tcl.browser)
- regex: 'Tbrowser/(\d+[\.\d]+)'
name: 'T-Browser'
version: '$1'
engine:
default: 'Blink'
- regex: 'com.tcl.browser'
name: 'BrowseHere'
version: '$1'
engine:
default: 'Blink'

# SFive (https://sfive.vn/)
- regex: 'SFive(?:_Android)?/.+ Chrome/(\d+[\.\d]+)'
Expand Down
5 changes: 5 additions & 0 deletions regexes/client/mediaplayers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,8 @@
- regex: 'JHV/SWHV-([.\d+]+)'
name: 'JHelioviewer'
version: '$1'

# Xtream Player (https://play.google.com/store/apps/details?id=com.devcoder.iptvxtreamplayer)
- regex: 'com.devcoder.iptvxtreamplayer'
name: 'Xtream Player'
version: ''
12 changes: 10 additions & 2 deletions regexes/device/mobiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -885,13 +885,15 @@ TiPhone:

# TiVo (https://www.tivo.com/)
TiVo:
regex: 'TIVO[ ,]'
regex: 'TIVO[ ,-]'
device: 'tv'
models:
- regex: 'STREAM 4K'
model: 'Stream 4K'
- regex: 'TCD8F6000'
model: 'TCD8F6000'
- regex: 'TiVo-([a-z0-9]+)-([a-z0-9]+)'
model: '$2'

# Apple
Apple:
Expand Down Expand Up @@ -13482,6 +13484,12 @@ Lephone:
- regex: 'lephone(?:[ _])?([^/);]*)(?: Build|[);])'
model: '$1'

# Lemco
Lemco:
regex: 'Lemco (FBX-3566W?)(?:[);/ ]|$)'
device: 'peripheral'
model: '$1'

# lenco
Lenco:
regex: 'Lenco (?:[^/);]*)(?: Build|[);])|(?:TDV900)(?:[);/ ]|$)'
Expand Down Expand Up @@ -32776,7 +32784,7 @@ Philips:
model: 'Xenium $1'
- regex: '(?:Philips[_ ])?(S397|W5510)(?:[);/ ]|$)'
model: '$1'
- regex: 'AND1E(?: TV)?(?:[);/ ]|$)'
- regex: '(?:AND1E|Google)(?: TV)?(?:[);/ ]|$)'
model: 'Android TV'
device: 'tv'
- regex: '(PI3210G)'
Expand Down
9 changes: 8 additions & 1 deletion regexes/oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@
name: 'Kali'
version: '$1'

# TiVo OS (https://business.tivo.com/products-solutions/tivo-os)
##########
- regex: 'TiVoOS/(\d+[\.\d]+)'
name: 'TiVo OS'
version: '$1'

##########
# VIDAA (https://www.vidaa.com/vidaa-os/)
##########
- regex: 'VIDAA/(\d+[\.\d]+)'
Expand Down Expand Up @@ -307,7 +314,7 @@
name: 'Android TV'
version: '$1'

- regex: 'Android[; ](\d+[\.\d]*).+(?:(?:Android|AT&T) TV|AOSP on r33a0|BRAVIA)'
- regex: 'Android[; ](\d+[\.\d]*).+(?:(?:Android( UHD)?|AT&T|Google) TV|AOSP on r33a0|BRAVIA)'
name: 'Android TV'
version: '$1'

Expand Down

0 comments on commit 2030287

Please sign in to comment.