Skip to content

Commit 3f097d5

Browse files
committed
Update Television
1 parent a57afcb commit 3f097d5

1 file changed

Lines changed: 36 additions & 3 deletions

File tree

src/Analyser/Header/Useragent/Device/Television.js

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ class Television {
292292

293293
static detectSamsungTelevision(ua) {
294294
let match;
295-
if (/(SMART-TV|SmartHub)/u.test(ua)) {
295+
if (/(SMART-TV;|SmartHub;)/u.test(ua)) {
296296
this.data.device.manufacturer = 'Samsung';
297297
this.data.device.series = 'Smart TV';
298298
this.data.device.type = Constants.deviceType.TELEVISION;
@@ -400,7 +400,7 @@ class Television {
400400
this.data.device.type = Constants.deviceType.TELEVISION;
401401
this.data.device.identified |= Constants.id.MATCH_UA;
402402

403-
if ((match = /Panasonic\.tv\.(?:mid\.)?([0-9]+)/u.exec(ua))) {
403+
if ((match = /Panasonic\.tv\.(?:mid\.|pro4\.)?([0-9]+)/u.exec(ua))) {
404404
this.data.device.series = `Viera ${match[1]}`;
405405
}
406406

@@ -859,7 +859,18 @@ class Television {
859859
}
860860

861861
if (
862-
['Access', 'ANT', 'EMSYS', 'Em-Sys', 'Opera', 'Opera Software', 'Seraphic', 'Vendor'].includes(vendorName)
862+
[
863+
'Access',
864+
'ANT',
865+
'EMSYS',
866+
'Em-Sys',
867+
'Ocean Blue Software',
868+
'Opera',
869+
'Opera Software',
870+
'Seraphic',
871+
'ST',
872+
'Vendor',
873+
].includes(vendorName)
863874
) {
864875
found = false;
865876
}
@@ -880,6 +891,8 @@ class Television {
880891
case 'GLOBAL-PLAT4':
881892
this.data.device.series = 'NetCast TV 2013';
882893
break;
894+
case 'WEBOS1':
895+
case 'WEBOS2.0':
883896
case 'WEBOS3':
884897
this.data.device.series = 'webOS TV';
885898
break;
@@ -903,6 +916,12 @@ class Television {
903916
case 'SmartTV2015':
904917
this.data.device.series = 'Smart TV 2015';
905918
break;
919+
case 'SmartTV2016':
920+
this.data.device.series = 'Smart TV 2016';
921+
break;
922+
case 'SmartTV2017':
923+
this.data.device.series = 'Smart TV 2017';
924+
break;
906925
case 'OTV-SMT-E5015':
907926
this.data.device.model = 'Olleh SkyLife Smart Settopbox';
908927
this.data.device.series = null;
@@ -931,8 +950,21 @@ class Television {
931950
case 'Viera2015.mid':
932951
this.data.device.series = 'Viera 2015';
933952
break;
953+
case 'Viera2016':
954+
this.data.device.series = 'Viera 2016';
955+
break;
956+
case 'Viera2017':
957+
this.data.device.series = 'Viera 2017';
958+
break;
959+
case 'Viera2018':
960+
this.data.device.series = 'Viera 2018';
961+
break;
934962
default:
935963
this.data.device.model = modelName;
964+
if ((modelName || '').startsWith('DIGA')) {
965+
this.data.device.series = 'Diga';
966+
this.data.device.model = null;
967+
}
936968
break;
937969
}
938970

@@ -1149,4 +1181,5 @@ class Television {
11491181
}
11501182
}
11511183
}
1184+
11521185
module.exports = Television;

0 commit comments

Comments
 (0)