Skip to content

Commit

Permalink
Adds detection for AYA, Botech, Continental Edison, EAS Electric, Ede…
Browse files Browse the repository at this point in the history
…nwood, Fobem, Hanseatic, Hiremco, HKC, Kydos, Logik, Mitchell & Brown, NEVIR, Next & NextStar, Novacom, Skytech brands and improves detection for various brands (#7533)

* Adds detection for Xiaomi MiTV A Pro
* Improves detection for Qilive devices
* Improves detection for TCL devices
* Improves detection for Brandt devices
* Improves detection for JVC devices
* Adds detection for TiviMate
* Improves detection for ONN devices
* Adds detection for H96 Pro+
* Adds detection for IPTV
* Improves detection for Sagem devices
* Adds detection for Continental Edison brand
* Adds detection for Next brand and devices
* Rename Next to Next & NextStar
* Adds detection for Nokia Streaming Stick 800
* Adds detection for Xiaomi MiTV Box S
* Rename from MiTV Box S to TV Box S (2nd Gen)
* Adds detection for Botech brand and devices
* Improves detection for Hitachi
* Improves detection for Finlux
* Adds detection for NEVIR brand
* Improves detection for ONVO devices
* Improves detection for Saba devices
* Improves detection for Nordmende devices
* Improves detection for DreamStar devices
* Adds detection for Hiremco brand
* Adds detection for Novacom brand
* Improves detection for Google devices
* Adds detection for HKC brand
* Adds detection for Fobem brand
* Improves detection for Gplus devices
* Adds detection for Mitchell & Brown brand
* Adds detection for Logik brand
* Improves detection for NEXON devices
* Adds detection for Edenwood brand
* Adds detection for Kydos brand
* Adds detection for EAS Electric brand
* Adds detection for AYA brand
* Adds detection for Hanseatic brand
* Improves detection for AWOX devices
* Adds detection for Skytech brand
* Improves detection for Arçelik

ref #7528, ref #7527
  • Loading branch information
liviuconcioiu committed Dec 14, 2023
1 parent a32a771 commit 852eeee
Show file tree
Hide file tree
Showing 9 changed files with 1,196 additions and 114 deletions.
5 changes: 3 additions & 2 deletions DeviceDetector.php
Original file line number Diff line number Diff line change
Expand Up @@ -1048,10 +1048,11 @@ protected function parseDevice(): void
}

/**
* Devices running Kylo or Espial TV Browsers are assumed to be a TV
* Devices running those browsers are assumed to be a TV
*/
if (\in_array($clientName, [
'Kylo', 'Espial TV Browser', 'LUJO TV Browser', 'LogicUI TV Browser', 'Open TV Browser',
'Kylo', 'Espial TV Browser', 'LUJO TV Browser', 'LogicUI TV Browser', 'Open TV Browser', 'Seraphic Sraf',
'Opera Devices',
])
) {
$this->device = AbstractDeviceParser::DEVICE_TYPE_TV;
Expand Down
17 changes: 17 additions & 0 deletions Parser/Device/AbstractDeviceParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'AXE' => 'AXEN',
'AY' => 'Axxion',
'AXX' => 'AXXA',
'AYA' => 'AYA',
'YR' => 'AYYA',
'XA' => 'Axioo',
'AM' => 'Azumi Mobile',
Expand Down Expand Up @@ -273,6 +274,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'BW' => 'Boway',
'BOO' => 'Boost',
'BOK' => 'Bookeen',
'BOT' => 'Botech',
'BX' => 'bq',
'8B' => 'Brandt',
'BRA' => 'BrandCode',
Expand Down Expand Up @@ -341,6 +343,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'8C' => 'Connex',
'53' => 'Connectce',
'CON' => 'Conceptum',
'CED' => 'Continental Edison',
'9C' => 'Colors',
'CO' => 'Coolpad',
'COO' => 'Coopers',
Expand Down Expand Up @@ -452,6 +455,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'ENI' => 'ENIE',
'2E' => 'E-Ceros',
'E8' => 'E-tel',
'EAS' => 'EAS Electric',
'EP' => 'Easypix',
'EQ' => 'Eagle',
'EA' => 'EBEST',
Expand All @@ -462,6 +466,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'35' => 'ECON',
'ECC' => 'ECOO',
'ZZ' => 'ecom',
'EDE' => 'Edenwood',
'E6' => 'EE',
'GW' => 'EGL',
'EFT' => 'EFT',
Expand Down Expand Up @@ -552,6 +557,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'QC' => 'FLYCAT',
'FLU' => 'Fluo',
'FN' => 'FNB',
'FOB' => 'Fobem',
'FD' => 'Fondi',
'0F' => 'Fourel',
'44' => 'Four Mobile',
Expand Down Expand Up @@ -648,6 +654,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'XH' => 'Haipai',
'HAN' => 'Handheld',
'HE' => 'HannSpree',
'HNS' => 'Hanseatic',
'HK' => 'Hardkernel',
'HAR' => 'Harper',
'HA1' => 'Hartens',
Expand All @@ -668,13 +675,15 @@ abstract class AbstractDeviceParser extends AbstractParser
'H2' => 'Highscreen',
'Q1' => 'High Q',
'1H' => 'Hipstreet',
'HIR' => 'Hiremco',
'HI' => 'Hisense',
'HIP' => 'HIPER',
'HC' => 'Hitachi',
'H8' => 'Hitech',
'W3' => 'HiMax',
'8X' => 'Hi Nova',
'HLL' => 'HLLO',
'HKC' => 'HKC',
'8W' => 'HKPro',
'H1' => 'Hoffmann',
'H0' => 'Hometech',
Expand Down Expand Up @@ -863,6 +872,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'8K' => 'Kult',
'KU' => 'Kumai',
'6K' => 'Kurio',
'KYD' => 'Kydos',
'KY' => 'Kyocera',
'KQ' => 'Kyowon',
'1K' => 'Kzen',
Expand Down Expand Up @@ -913,6 +923,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'1L' => 'Logic',
'LH' => 'Logic Instrument',
'LM' => 'Logicom',
'LOG' => 'Logik',
'GY' => 'LOKMAT',
'LPX' => 'LPX-G',
'0L' => 'Lumigon',
Expand Down Expand Up @@ -985,6 +996,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'MO' => 'Mio',
'X7' => 'Mione',
'M7' => 'Miray',
'MIT' => 'Mitchell & Brown',
'8M' => 'Mito',
'MT' => 'Mitsubishi',
'0Y' => 'Mitsui',
Expand Down Expand Up @@ -1060,6 +1072,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'NEM' => 'Netmak',
'NU' => 'NeuImage',
'NEU' => 'NeuTab',
'NEV' => 'NEVIR',
'NW' => 'Newgen',
'N9' => 'Newland',
'0N' => 'Newman',
Expand All @@ -1076,6 +1089,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'NTT' => 'NTT West',
'4N' => 'NextTab',
'NEX' => 'NEXT',
'NST' => 'Next & NextStar',
'NJO' => 'nJoy',
'NG' => 'NGM',
'NZ' => 'NG Optics',
Expand All @@ -1086,6 +1100,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'N5' => 'NOA',
'N1' => 'Noain',
'N6' => 'Nobby',
'NOC' => 'Novacom',
'NOV' => 'Novey',
'NO1' => 'NOVO',
'57' => 'Nubia',
Expand Down Expand Up @@ -1382,6 +1397,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'SK' => 'Skyworth',
'SKY' => 'Skyline',
'SK1' => 'SkyStream',
'SKT' => 'Skytech',
'SKK' => 'SKK Mobile',
'14' => 'Smadl',
'19' => 'Smailo',
Expand Down Expand Up @@ -2048,6 +2064,7 @@ protected function hasDesktopFragment(): bool
{
return
$this->matchUserAgent('(?:Windows (?:NT|IoT)|X11; Linux x86_64)') &&
!$this->matchUserAgent('CE-HTML') &&
!$this->matchUserAgent(' Mozilla/|Andr[o0]id|Tablet|Mobile|iPhone|Windows Phone|ricoh|OculusBrowser') &&
!$this->matchUserAgent('Lenovo|compatible; MSIE|Trident/|Tesla/|XBOX|FBMD/|ARM; ?([^)]+)');
}
Expand Down
12 changes: 12 additions & 0 deletions Tests/Parser/Client/fixtures/mobile_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1565,3 +1565,15 @@
type: mobile app
name: Spotify
version: "120800923"
-
user_agent: TiviMate/4.7.0 (Onn. 4K Streaming Box; Android 12)
client:
type: mobile app
name: TiviMate
version: 4.7.0
-
user_agent: Mozilla/5.0 (Linux; Android 8.0.0; Sagemcom DIW387_UHD_OOR Build/21.4.60) IPTV/6.1.11
client:
type: mobile app
name: IPTV
version: 6.1.11
4 changes: 2 additions & 2 deletions Tests/fixtures/tv-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5614,7 +5614,7 @@
engine: Blink
engine_version: "84.0.4147.111"
device:
type: smartphone
type: tv
brand: Xiaomi
model: MiTV 4A Pro
os_family: Android
Expand All @@ -5632,7 +5632,7 @@
engine: Blink
engine_version: "84.0.4147.125"
device:
type: smartphone
type: tv
brand: Xiaomi
model: MiTV 4A Pro
os_family: Android
Expand Down
Loading

0 comments on commit 852eeee

Please sign in to comment.