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 Telkom, UD brands, improves detection for Hyundai, Nordmende, O2, Orange and unknown brands, adds detection for QbHttp library and TV Bro browser #7598

Merged
merged 16 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from 12 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 @@ -1053,7 +1053,7 @@ protected function parseDevice(): void
*/
if (\in_array($clientName, [
'Kylo', 'Espial TV Browser', 'LUJO TV Browser', 'LogicUI TV Browser', 'Open TV Browser', 'Seraphic Sraf',
'Opera Devices', 'Crow Browser', 'Vewd Browser', 'TiviMate', 'Quick Search TV',
'Opera Devices', 'Crow Browser', 'Vewd Browser', 'TiviMate', 'Quick Search TV', 'TV Bro',
])
) {
$this->device = AbstractDeviceParser::DEVICE_TYPE_TV;
Expand Down
2 changes: 2 additions & 0 deletions Parser/Device/AbstractDeviceParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -1553,6 +1553,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'TB' => 'Tecno Mobile',
'TEC' => 'TecToy',
'91' => 'TEENO',
'TLK' => 'Telkom',
'2L' => 'Tele2',
'TL' => 'Telefunken',
'TG' => 'Telego',
Expand Down Expand Up @@ -1632,6 +1633,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'TWN' => 'TwinMOS',
'15' => 'Tymes',
'UC' => 'U.S. Cellular',
'UD1' => 'UD',
'UGI' => 'UGINE',
'UG' => 'Ugoos',
'U1' => 'Uhans',
Expand Down
6 changes: 6 additions & 0 deletions Tests/Parser/Client/fixtures/library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -611,3 +611,9 @@
type: library
name: request
version: ""
-
user_agent: qbhttp/1.0.0
client:
type: library
name: QbHttp
version: 1.0.0
18 changes: 18 additions & 0 deletions Tests/fixtures/clienthints-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2461,3 +2461,21 @@
model: Nova 9 SE
os_family: Android
browser_family: Unknown
-
user_agent: Mozilla/5.0 (Linux; Android 11.0; Orange TV Box Build/QTG1.200615.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/102.0.5005.22 Mobile Safari/537.36
headers:
http-x-requested-with: com.droidlogic.xlauncher
os:
name: Android
version: "11.0"
platform: ""
client:
type: mobile app
name: Droidlogic Launcher
liviuconcioiu marked this conversation as resolved.
Show resolved Hide resolved
version: ""
device:
type: tv
brand: Orange
model: TV Box
os_family: Android
browser_family: Unknown
182 changes: 182 additions & 0 deletions Tests/fixtures/tv-3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2609,3 +2609,185 @@
model: X92
os_family: Android
browser_family: Android Browser
-
user_agent: Mozilla/5.0 (Linux; Android 9; Hyundai 2K TV Build/PTO7.210317.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/107.0.5304.91 Mobile Safari/537.36
os:
name: Android
version: "9"
platform: ""
client:
type: browser
name: TV Bro
version: ""
engine: Blink
engine_version: 107.0.5304.91
device:
type: tv
brand: Hyundai
model: 2K TV
os_family: Android
browser_family: Chrome
headers:
http-x-requested-with: com.phlox.tvwebbrowser
-
user_agent: Mozilla/5.0 (Linux; Android 6.0; TV348_DVB Build/MRA58K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/48.0.2542.0 Safari/537.36
os:
name: Android
version: "6.0"
platform: ""
client:
type: browser
name: Chrome Webview
version: 48.0.2542.0
engine: Blink
engine_version: 48.0.2542.0
device:
type: tv
brand: UD
model: TV348 DVB
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 8.0.0; TV358DVB Build/OPR5.170623.014; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/62.0.3202.73 Safari/537.36
os:
name: Android
version: 8.0.0
platform: ""
client:
type: browser
name: Chrome Webview
version: 62.0.3202.73
engine: Blink
engine_version: 62.0.3202.73
device:
type: tv
brand: UD
model: TV358 DVB
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 6.0; TV348_ISDB Build/MRA58K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/48.0.2542.0 Safari/537.36
os:
name: Android
version: "6.0"
platform: ""
client:
type: browser
name: Chrome Webview
version: 48.0.2542.0
engine: Blink
engine_version: 48.0.2542.0
device:
type: tv
brand: UD
model: TV348 ISDB
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 6.0; tv001 on rtd289x Build/MRA58K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/52.0.2743.100 Safari/537.36
os:
name: Android
version: "6.0"
platform: ""
client:
type: browser
name: Chrome Webview
version: 52.0.2743.100
engine: Blink
engine_version: 52.0.2743.100
device:
type: tv
brand: ""
model: ""
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 6.0; net tv.plus Build/MRA58K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/44.0.2403.119 Safari/537.36
os:
name: Android
version: "6.0"
platform: ""
client:
type: browser
name: Chrome Webview
version: 44.0.2403.119
engine: Blink
engine_version: 44.0.2403.119
device:
type: tv
brand: ""
model: ""
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 11.0; Orange TV Box Build/QTG1.200615.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/102.0.5005.22 Mobile Safari/537.36
os:
name: Android
version: "11.0"
platform: ""
client:
type: browser
name: Chrome Webview
version: 102.0.5005.22
engine: Blink
engine_version: 102.0.5005.22
device:
type: tv
brand: Orange
model: TV Box
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 12; O2 TV Box Build/QTT2.200720.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/101.0.4951.15 Mobile Safari/537.36
os:
name: Android
version: "12"
platform: ""
client:
type: browser
name: Chrome Webview
version: 101.0.4951.15
engine: Blink
engine_version: 101.0.4951.15
device:
type: tv
brand: O2
model: TV Box
os_family: Android
browser_family: Chrome
-
user_agent: Dalvik/2.1.0 (Linux; U; Android 9; TVB-100 Build/PI)
os:
name: Android
version: "9"
platform: ""
client:
type: browser
name: Android Browser
version: ""
engine: WebKit
engine_version: ""
device:
type: tv
brand: Telkom
model: TVB-100
os_family: Android
browser_family: Android Browser
-
user_agent: Mozilla/5.0 (Linux ) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36 OPR/40.0.2207.0 OMI/4.9.0.237.DOM3-OPT.253 Model/Vestel-MB211 VSTVB MB200 FVC/2.0 (NORDMENDE; MB211; ) SmartTvA/3.0.0
os:
name: GNU/Linux
version: ""
platform: ""
client:
type: browser
name: Opera Devices
version: 4.9.0.237
engine: Blink
engine_version: 53.0.2785.143
device:
type: tv
brand: Nordmende
model: ""
os_family: GNU/Linux
browser_family: Opera
1 change: 1 addition & 0 deletions regexes/client/hints/apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
'com.massimple.nacion.gcba.es': '+Simple'
'com.massimple.nacion.parana.es': '+Simple'
'com.microsoft.math': 'Microsoft Math Solver'
'com.droidlogic.xlauncher': 'Droidlogic Launcher'

# Vpns
'org.torproject.android': 'Orbot'
Expand Down
1 change: 1 addition & 0 deletions regexes/client/hints/browsers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -250,3 +250,4 @@
'vpn.video.downloader': 'VD Browser'
'com.aospstudio.tvsearch': 'Quick Search TV'
'com.go.browser': 'GO Browser'
'com.phlox.tvwebbrowser': 'TV Bro'
5 changes: 5 additions & 0 deletions regexes/client/libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -566,3 +566,8 @@
name: 'request'
version: ''
url: 'https://github.com/request/request'

- regex: 'qbhttp(?:/(\d+[\.\d]+))?'
name: 'QbHttp'
version: '$1'
url: 'https://github.com/OpenQb/QbHttp'
32 changes: 28 additions & 4 deletions regexes/device/mobiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9497,6 +9497,18 @@ AWOX:
- regex: 'AWOX;SmartTV;([a-z0-9_ \-]+);'
model: '$1'

# UD (https://udtv.store/)
UD:
regex: 'TV3[45]8_?(?:DVB|ISDB)(?:[);/ ]|$)'
device: 'tv'
models:
- regex: 'TV348_DVB(?:[);/ ]|$)'
model: 'TV348 DVB'
- regex: 'TV348_ISDB(?:[);/ ]|$)'
model: 'TV348 ISDB'
- regex: 'TV358DVB(?:[);/ ]|$)'
model: 'TV358 DVB'

# UGINE (https://www.ugine.com.sa/ar)
UGINE:
regex: 'UGINE(?:[);/ ]|$)'
Expand Down Expand Up @@ -11197,7 +11209,7 @@ Hyundai:
- regex: '(?:Hyundai[_ ])?(Eternity[_ ](?:G57L?|G[56]0W?)|H7|Aero Plus|E435 Plus)'
model: '$1'

- regex: '(H-LED\w+|H-DMP100)(?:[);/ ]|$)'
- regex: '(H-LED\w+|H-DMP100|2K TV)(?:[);/ ]|$)'
device: 'tv'
model: '$1'

Expand Down Expand Up @@ -17458,7 +17470,7 @@ Noontec:

# Nordmende
Nordmende:
regex: 'NORDMENDE[ _]'
regex: 'NORDMENDE[ _;,]'
device: 'tv'
models:
- regex: 'NORDMENDE_(43NM6000F)(?:[);/ ]|$)'
Expand Down Expand Up @@ -17769,6 +17781,9 @@ O2:
regex: 'Xda|(?<!FBCR/)O2[ \-]|COCOON'
device: 'smartphone'
models:
- regex: 'O2 TV Box(?:[);/ ]|$)'
device: 'tv'
model: 'TV Box'
- regex: '(Xda[ _][a-z0-9_]+)'
model: '$1'
- regex: '(COCOON)'
Expand Down Expand Up @@ -19090,6 +19105,9 @@ Orange:
- regex: 'SC/IHD92'
device: 'tv' # set top box
model: 'Livebox Play'
- regex: 'Orange TV Box(?:[);/ ]|$)'
device: 'tv'
model: 'TV Box'
- regex: 'Nola play'
model: 'Nola Play'
- regex: 'Nola fun'
Expand Down Expand Up @@ -30667,6 +30685,12 @@ Billion:
device: 'smartphone'
model: 'Capture Plus'

# Telkom
Telkom:
regex: '(TVB-100)(?:[);/ ]|$)'
device: 'tv'
model: '$1'

# Tele2 (www.tele2.com) mobile operator
Tele2:
regex: 'Tele2[ _]|Tele2fon'
Expand Down Expand Up @@ -38767,7 +38791,7 @@ WeChip:

# Devices with undectable brand, but detectable model
Unknown:
regex: 'Plasma Mobile|WebTV/(\d+\.\d+)|TV Bro| BOX|BOX | BOX |roku|YouView|DirectFB|avdn/|wired|wireless|AndroidTV|cordova-amazon-fireos|wv-atv|(?:M10 Ultra|FO-R15|TVBOX|Smart[ _-]?TV|SmartATV|M8S\+ 4K|PCBox|rk(?:3128|322x|3368)(?:[_-]box)?|H10 PLAY|Smart AIO TV|TVBOX_L|L-BOX|TVBOX-5G|mips.+(?:Opera TV|wireless|wired)|smartbox|TV BOX|BOX TV|I12Pro Max|(?:audi_)?ks1280x480|AT&T TV|RealtekATV|AOSP on r33a0|hx322x_box|X98_S500|8K3528-T|MX10|V88|H8S|X92|AI PONT)(?:[);/ ]|$)'
regex: 'Plasma Mobile|WebTV/(\d+\.\d+)|TV Bro| BOX|BOX | BOX |roku|YouView|DirectFB|avdn/|wired|wireless|AndroidTV|cordova-amazon-fireos|wv-atv|(?:M10 Ultra|FO-R15|TVBOX|Smart[ _-]?TV|SmartATV|M8S\+ 4K|PCBox|rk(?:3128|322x|3368)(?:[_-]box)?|H10 PLAY|Smart AIO TV|TVBOX_L|L-BOX|TVBOX-5G|mips.+(?:Opera TV|wireless|wired)|smartbox|TV BOX|BOX TV|I12Pro Max|(?:audi_)?ks1280x480|AT&T TV|RealtekATV|AOSP on r33a0|tv001 on rtd289x|hx322x_box|X98_S500|8K3528-T|MX10|V88|H8S|X92|AI PONT|tv.plus)(?:[);/ ]|$)'
device: 'smartphone'
models:
- regex: 'WebTV/(\d+\.\d+)'
Expand All @@ -38779,7 +38803,7 @@ Unknown:
- regex: '(FO-R15|X98_S500|8K3528-T|MX10|V88|H8S|X92|AI PONT)(?:[);/ ]|$)'
device: 'tv'
model: '$1'
- regex: ' BOX|BOX | BOX |roku|YouView|DirectFB|avdn/|wired|wireless|AndroidTV|cordova-amazon-fireos|wv-atv|(Smart[ _-]?TV|SmartATV|PCBox|hx322x_box|rk(?:3128|322x|3368)(?:[_-]box)?|TVBOX|Smart AIO TV|TVBOX_L|L-BOX|TVBOX-5G|AT&T TV|RealtekATV|TV Bro|AOSP on r33a0)(?:[);/ ]|$)'
- regex: ' BOX|BOX | BOX |roku|YouView|DirectFB|avdn/|wired|wireless|AndroidTV|cordova-amazon-fireos|wv-atv|(Smart[ _-]?TV|SmartATV|PCBox|hx322x_box|rk(?:3128|322x|3368)(?:[_-]box)?|TVBOX|Smart AIO TV|TVBOX_L|L-BOX|TVBOX-5G|AT&T TV|RealtekATV|TV Bro|AOSP on r33a0|tv001 on rtd289x|tv.plus)(?:[);/ ]|$)'
device: 'tv'
model: ''
- regex: 'M8S\+ 4K(?:[);/ ]|$)'
Expand Down
Loading