totpero / DeviceDetector.NET

The Universal Device Detection library will parse any User Agent and detect the browser, operating system, device used (desktop, tablet, mobile, tv, cars, console, etc.), brand and model.
Apache License 2.0
348 stars 73 forks source link

Invalid Device and Brand Name #76

Closed myomintin closed 10 months ago

myomintin commented 1 year ago

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/89.0.4389.116 Safari/534.24 XiaoMi/MiuiBrowser/17.0.20 swan-mibrowser

Result: Device : desktop Brand : Brand Name : Model :

OS Name : GNU/Linux OS Short Name : LIN OS Version : OS Platform : x64

Client Type : browser Client Name : MIUI Browser Client Version : 17.0.20 Client Short Name : MU Client Engine : WebKit Client Engine Version : 534.24

totpero commented 10 months ago

Hi @mymintin

I have test this User Agent online:

iehol.sse.codesandbox.io

device: {
    id: "",
    type: "desktop",
    brand: "",
    model: ""
}

or: devicedetector.lw1.at

 "deviceName": "desktop",
  "deviceBrand": {
    "name": "",
    "short_name": ""
  },

and the result is the same like in DeviceDetector.Net

If the expected result need to be other, you need to write this issue to the original php repo: https://github.com/matomo-org/device-detector and after this will be fixed there, I will update the regexes also here.

Thanks 👍