Skip to content

Commit

Permalink
feat(device) detect new brand Altibox: Smart TV
Browse files Browse the repository at this point in the history
feat(device) detect new brand G Guard: Smart TV
feat(device) detect new brand Supermax: Smart TV
feat(device) detect brand Philips: NeoViu D1
feat(device) detect brand Dyon: 2K Smart TV
feat(device) detect brand Walton: 2K Smart TV
feat(device) detect brand Bell: Streamer
feat(device) detect brand XGIMI: MoGo Pro
feat(device) detect brand Telia: TV Box Nordic
feat(device) detect brand Polaroid: SmartBox S (SMX4K)

ref matomo-org#7882
  • Loading branch information
sanchezzzhak committed Dec 19, 2024
1 parent ddf470d commit 6595514
Show file tree
Hide file tree
Showing 5 changed files with 246 additions and 13 deletions.
4 changes: 3 additions & 1 deletion Parser/Device/AbstractDeviceParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'A1' => 'Altech UEC',
'66' => 'Altice',
'ALM' => 'Altimo',
'A5' => 'altron',
'ALB' => 'Altibox',
'ALT' => 'Altus',
'KN' => 'Amazon',
'AMZ' => 'Amazon Basics',
Expand Down Expand Up @@ -322,6 +322,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'C9' => 'CAGI',
'CAD' => 'CADENA',
'CT' => 'Capitel',
'GRD' => 'G Guard',
'G3' => 'CG Mobile',
'37' => 'CGV',
'CP' => 'Captiva',
Expand Down Expand Up @@ -1671,6 +1672,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'5Y' => 'Sunny',
'W8' => 'SUNWIND',
'SBX' => 'SuperBOX',
'SBM' => 'Supermax',
'SBR' => 'Sber',
'SGE' => 'Super General',
'SU' => 'SuperSonic',
Expand Down
36 changes: 36 additions & 0 deletions Tests/fixtures/peripheral.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1594,3 +1594,39 @@
model: TelPad MT7
os_family: Android
browser_family: Opera
-
user_agent: Mozilla/5.0 (Linux; Android 12; NeoViu D1 Build/STTC.230104.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/126.0.6478.186 Mobile Safari/537.36
os:
name: Android
version: "12"
platform: ""
client:
type: browser
name: Chrome Webview
version: 126.0.6478.186
engine: Blink
engine_version: 126.0.6478.186
device:
type: peripheral
brand: Philips
model: NeoViu D1
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 9; MoGo Pro 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: peripheral
brand: XGIMI
model: MoGo Pro
os_family: Android
browser_family: Chrome
144 changes: 144 additions & 0 deletions Tests/fixtures/tv-4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6312,3 +6312,147 @@
model: 32LES905T2SM
os_family: Android
browser_family: Unknown
-
user_agent: Mozilla/5.0 (Linux; Android 10; G Guard SMART TV Build/QTG3.200617.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/104.0.5112.97 Mobile Safari/537.36
os:
name: Android TV
version: "10"
platform: ""
client:
type: browser
name: Chrome Webview
version: 104.0.5112.97
engine: Blink
engine_version: 104.0.5112.97
device:
type: tv
brand: G Guard
model: Smart TV
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 11; DYON 2K Google TV Build/RTK2.230523.018; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/126.0.6478.134 Mobile Safari/537.36
os:
name: Android TV
version: "11"
platform: ""
client:
type: browser
name: Chrome Webview
version: 126.0.6478.134
engine: Blink
engine_version: 126.0.6478.134
device:
type: tv
brand: Dyon
model: 2K Smart TV
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 11; WALTON GSMART 2KTV Build/RTM6.230109.134; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.53 Mobile Safari/537.36
os:
name: Android
version: "11"
platform: ""
client:
type: browser
name: Chrome Webview
version: 125.0.6422.53
engine: Blink
engine_version: 125.0.6422.53
device:
type: tv
brand: Walton
model: 2K Smart TV
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 12; Bell Streamer Build/STTC; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/129.0.6668.100 Mobile Safari/537.36
os:
name: Android
version: "12"
platform: ""
client:
type: browser
name: Chrome Webview
version: 129.0.6668.100
engine: Blink
engine_version: 129.0.6668.100
device:
type: tv
brand: Bell
model: Streamer
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 10; Altibox TV Build/QTG1.230207.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/130.0.6723.58 Mobile Safari/537.36
os:
name: Android
version: "10"
platform: ""
client:
type: browser
name: Chrome Webview
version: 130.0.6723.58
engine: Blink
engine_version: 130.0.6723.58
device:
type: tv
brand: Altibox
model: Smart TV
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 11; Supermax MX11 prime Build/QP1A.191105.004; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/80.0.3987.149 Mobile Safari/537.36
os:
name: Android
version: "11"
platform: ""
client:
type: browser
name: Chrome Webview
version: 80.0.3987.149
engine: Blink
engine_version: 80.0.3987.149
device:
type: tv
brand: Supermax
model: MX11 Prime
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 12; SMX4K Build/STTC.230104.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/129.0.6668.100 Mobile Safari/537.36
os:
name: Android
version: "12"
platform: ""
client:
type: browser
name: Chrome Webview
version: 129.0.6668.100
engine: Blink
engine_version: 129.0.6668.100
device:
type: tv
brand: Polaroid
model: SmartBox S
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 12; Telia Nordic STB Build/ST; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/129.0.6668.102 Mobile Safari/537.36
os:
name: Android
version: "12"
platform: ""
client:
type: browser
name: Chrome Webview
version: 129.0.6668.102
engine: Blink
engine_version: 129.0.6668.102
device:
type: tv
brand: Telia
model: TV Box Nordic
os_family: Android
browser_family: Chrome
73 changes: 62 additions & 11 deletions regexes/device/mobiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9370,7 +9370,7 @@ Geotel:

# Gigabyte
Gigabyte:
regex: '(?<!Singer \dK )GSmart[ _][a-z0-9 ]+(?: Build|\))|Gigabyte-[a-z0-9]+|Simba SX1|Roma R2|Boston 4G|GSmart_Classic_Lite|(?<!Eagle )Classic[_ ](?:Joy|Pro)'
regex: '(?<!Singer \dK |WALTON )GSmart[ _][a-z0-9 ]+(?: Build|\))|Gigabyte-[a-z0-9]+|Simba SX1|Roma R2|Boston 4G|GSmart_Classic_Lite|(?<!Eagle )Classic[_ ](?:Joy|Pro)'
device: 'smartphone'
models:
- regex: 'Roma R2'
Expand Down Expand Up @@ -24180,7 +24180,7 @@ Plum:

# Polaroid
Polaroid:
regex: 'Polaroid|POLPAROID|(?:PMID|MIDC)[0-9a-z]+(?:[);/ ]|$)|MID(?:1014|0714)|PRO[VG]?(?:[0-9]{3,}[a-z]*|[0-9]{2}[a-z])|(?:P(?:400[56]|4526|500[56]|502[56]|504[67]|552[56])A|P902/A900|PSPC(?:505|550|[MZL]20A0|K2[01]NA)|SIGMA 5|MIDI109PDE|MIDI156PDE|MIDB1048PHE|MIDS145PXE|MIDS747PX|MID4004JBL|MIDS185PR|PSPTD21NA|POMDTB00[56]|PSPCL30A0|PSN-H116|BDL0232PR|Mobility3G|BDL1064PR001)(?:[);/ ]|$)'
regex: 'Polaroid|POLPAROID|(?:PMID|MIDC)[0-9a-z]+(?:[);/ ]|$)|MID(?:1014|0714)|PRO[VG]?(?:[0-9]{3,}[a-z]*|[0-9]{2}[a-z])|(?:P(?:400[56]|4526|500[56]|502[56]|504[67]|552[56])A|P902/A900|PSPC(?:505|550|[MZL]20A0|K2[01]NA)|SIGMA 5|MIDI109PDE|MIDI156PDE|MIDB1048PHE|MIDS145PXE|MIDS747PX|MID4004JBL|MIDS185PR|PSPTD21NA|POMDTB00[56]|PSPCL30A0|PSN-H116|BDL0232PR|Mobility3G|BDL1064PR001|SMX4K)(?:[);/ ]|$)'
device: 'smartphone'
models:
# explicit smartphone models
Expand Down Expand Up @@ -24239,6 +24239,9 @@ Polaroid:
- regex: 'PSN-H116'
model: 'Snap'

- regex: 'SMX4K'
device: 'tv'
model: 'SmartBox S'
- regex: 'POLAROID, ([a-z0-9_ -]+), (?:wired|wireless)'
device: 'tv'
model: ''
Expand Down Expand Up @@ -27800,7 +27803,10 @@ Walton:
model: 'Nexg N$1'
- regex: '(LT750)'
model: '$1'

# specific tv models
- regex: 'WALTON GSMART 2KTV'
device: 'tv'
model: '2K Smart TV'
# general detections
- regex: 'Primo[ _]([^;/)]+)[ _]Plus(?: Build|[;)])'
model: 'Primo $1 Plus'
Expand Down Expand Up @@ -35897,9 +35903,13 @@ Camfone:

# Bell (https://www.bell.ca/)
Bell:
regex: 'FibeTV(?:[);/ ]|$)'
regex: '(?:FibeTV|Bell Streamer)(?:[);/ ]|$)'
device: 'tv'
model: 'FibeTV'
models:
- regex: 'FibeTV'
model: 'FibeTV'
- regex: 'Streamer'
model: 'Streamer'

# Bellphone
Bellphone:
Expand Down Expand Up @@ -36449,7 +36459,7 @@ Master-G:

# philips
Philips:
regex: 'Philips|NETTV/|2020/2021 UHD Android|10BDL4151T|Xenium S[25]66|(?:PI3210G|TPM1[79]1E|70PUH6774_96|QM152E|QM16[134]E|TLE(?:821L|722G)|AND1E|S397|W5510|S410J)(?:[);/ ]|$)'
regex: 'Philips|NETTV/|2020/2021 UHD Android|10BDL4151T|Xenium S[25]66|(?:NeoViu D1|PI3210G|TPM1[79]1E|70PUH6774_96|QM152E|QM16[134]E|TLE(?:821L|722G)|AND1E|S397|W5510|S410J)(?:[);/ ]|$)'
device: 'smartphone'
models:
- regex: 'Philips;([a-z0-9_ \-/]+);'
Expand Down Expand Up @@ -36510,6 +36520,11 @@ Philips:

- regex: 'Philips-FISIO ([a-z0-9]+)'
model: 'Fisio $1'
# projector models
- regex: 'NeoViu D1'
device: 'peripheral'
model: 'NeoViu D1'
# general detection
- regex: 'Philips[ _-]?([a-z0-9\-@]+)'
model: '$1'

Expand Down Expand Up @@ -37327,13 +37342,15 @@ Xtratech:
device: 'tablet'
model: 'IguanaPad 10.1"'

# XGIMI (www.xgimi.com)
# XGIMI or XGimi (www.xgimi.com or global.xgimi.com)
XGIMI:
regex: '(?:XGIMI TV|XK03H)(?:[);/ ]|$)'
regex: '(?:XGIMI TV|XK03H|MoGo Pro)(?:[);/ ]|$)'
device: 'peripheral'
models:
- regex: 'XK03H'
model: 'Horizon Pro' # Laser Projector
- regex: 'MoGo Pro'
model: 'MoGo Pro' # Projector

# VIVIBright
VIVIBright:
Expand Down Expand Up @@ -37637,11 +37654,15 @@ CGV:
device: 'smartphone'
model: '$1'

# Telia (telia.se or telia.com)
# Telia (telia.se telia.com telia.fi)
Telia:
regex: 'Telia box'
regex: 'Telia'
device: 'tv'
model: 'TV Box'
models:
- regex: 'Nordic'
model: 'TV Box Nordic'
- regex: 'Telia box'
model: 'TV Box'

# Canal Digital
Canal Digital:
Expand Down Expand Up @@ -43098,6 +43119,36 @@ TV+:
device: 'tv'
model: 'Smart TV'

# G Guard (https://www.gguard.com/)
G Guard:
regex: 'G Guard'
device: 'tv'
models:
- regex: 'SMART TV'
model: 'Smart TV'

# Dyon (https://www.dyon.eu/)
Dyon:
regex: 'DYON'
device: 'tv'
models:
- regex: '2K Google TV'
model: '2K Smart TV'

# Altibox (https://www.altibox.no/)
Altibox:
regex: 'Altibox'
device: 'tv'
model: 'Smart TV'

# Supermax
Supermax:
regex: 'Supermax'
device: 'tv'
models:
- regex: 'MX11 prime'
model: 'MX11 Prime'

# 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|SDSTB|SDOTT|(?: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|WayDroid x86_64 Device|MediaBox|Cloud Phone|HK1RBOX-X4)(?:[);/ ]|$)'
Expand Down
2 changes: 1 addition & 1 deletion regexes/device/televisions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ AXEN:
- regex: 'LGE/ATMACA/AXEN; ([a-z0-9]+)-'
model: '$1'

# Dyon
# Dyon (https://www.dyon.eu/)
Dyon:
regex: 'LGE/KONKA/DYON'
device: 'tv'
Expand Down

0 comments on commit 6595514

Please sign in to comment.