Fix #470 Identify Android TV as SmartTV

This commit is contained in:
Faisal Salman 2021-03-14 22:47:23 +07:00
parent fc1d3b0719
commit e612b44ecd
2 changed files with 13 additions and 4 deletions

View File

@ -686,6 +686,9 @@
/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i // Gigaset Tablets /android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i // Gigaset Tablets
], [VENDOR, MODEL, [TYPE, TABLET]], [ ], [VENDOR, MODEL, [TYPE, TABLET]], [
/[\s\/\(](android\stv|smart-?tv)[;\)\s]/i // SmartTV from Unidentified Vendors
], [[TYPE, SMARTTV]], [
// Android Phones from Unidentified Vendors // Android Phones from Unidentified Vendors
/android .+?; ([^;]+?)(?: build|\) applewebkit).+? mobile safari/i /android .+?; ([^;]+?)(?: build|\) applewebkit).+? mobile safari/i
], [MODEL, [TYPE, MOBILE]], [ ], [MODEL, [TYPE, MOBILE]], [
@ -697,9 +700,6 @@
/\s(mobile)(?:[;\/]|\ssafari)/i // Unidentifiable Mobile /\s(mobile)(?:[;\/]|\ssafari)/i // Unidentifiable Mobile
], [[TYPE, util.lowerize], VENDOR, MODEL], [ ], [[TYPE, util.lowerize], VENDOR, MODEL], [
/[\s\/\(](smart-?tv)[;\)]/i // SmartTV
], [[TYPE, SMARTTV]], [
/(android[\w\.\s\-]{0,9});.+build/i // Generic Android Device /(android[\w\.\s\-]{0,9});.+build/i // Generic Android Device
], [MODEL, [VENDOR, 'Generic']], [ ], [MODEL, [VENDOR, 'Generic']], [

View File

@ -1300,6 +1300,15 @@
"type": "smarttv" "type": "smarttv"
} }
}, },
{
"desc": "Android TV",
"ua": "Mozilla/5.0 (Linux; Android 10; 2020/2021 UHD Android TV Build/QTG3.201102.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) version/4.0 Chrome/83.0.4103.101 Mobile Safari/537.36",
"expect": {
"vendor": "undefined",
"model": "undefined",
"type": "smarttv"
}
},
{ {
"desc": "Gigaset Tablet", "desc": "Gigaset Tablet",
"ua": "Mozilla/5.0 (Linux; Android 4.2.2; Gigaset QV830 Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36", "ua": "Mozilla/5.0 (Linux; Android 4.2.2; Gigaset QV830 Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",