Skip to content
Extraits de code Groupes Projets
Valider c461d432 rédigé par sgiehl's avatar sgiehl
Parcourir les fichiers

added/improved some more detections; added many tests

parent 2009fe9e
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -27,6 +27,7 @@ class UserAgentParserEnhanced ...@@ -27,6 +27,7 @@ class UserAgentParserEnhanced
'AC' => 'Acer', 'AC' => 'Acer',
'AI' => 'Airness', 'AI' => 'Airness',
'AL' => 'Alcatel', 'AL' => 'Alcatel',
'AN' => 'Arnova',
'AO' => 'Amoi', 'AO' => 'Amoi',
'AP' => 'Apple', 'AP' => 'Apple',
'AR' => 'Archos', 'AR' => 'Archos',
...@@ -46,6 +47,7 @@ class UserAgentParserEnhanced ...@@ -46,6 +47,7 @@ class UserAgentParserEnhanced
'CN' => 'CnM', 'CN' => 'CnM',
'CR' => 'CreNova', 'CR' => 'CreNova',
'CT' => 'Capitel', 'CT' => 'Capitel',
'CO' => 'Coolpad',
'CU' => 'Cube', 'CU' => 'Cube',
'DE' => 'Denver', 'DE' => 'Denver',
'DB' => 'Dbtel', 'DB' => 'Dbtel',
......
...@@ -216,6 +216,16 @@ Archos: ...@@ -216,6 +216,16 @@ Archos:
- regex: 'ARCHOS ([a-z0-9]+)' - regex: 'ARCHOS ([a-z0-9]+)'
model: '$1' model: '$1'
# Arnova
Arnova:
regex: 'arnova|AN[0-9]'
device: 'tablet'
models:
- regex: 'Arnova ([^/]*) Build'
model: '$1'
- regex: 'AN([0-9][a-z0-9]+)'
model: '$1'
# Asus # Asus
Asus: Asus:
regex: 'Asus|Transformer|PadFone' regex: 'Asus|Transformer|PadFone'
...@@ -251,9 +261,13 @@ Avvio: ...@@ -251,9 +261,13 @@ Avvio:
#BBK #BBK
BBK: BBK:
regex: 'vivo (.*) Build' regex: 'vivo'
device: 'smartphone' device: 'smartphone'
model: 'Vivo $1' models:
- regex: 'vivo ([^/]*) Build'
model: 'Vivo $1'
- regex: 'vivo_([a-z0-9]+)'
model: 'Vivo $1'
# Bird # Bird
Bird: Bird:
...@@ -307,6 +321,16 @@ Compal: ...@@ -307,6 +321,16 @@ Compal:
device: 'feature phone' device: 'feature phone'
model: '$1' model: '$1'
# Coolpad
Coolpad:
regex: 'Coolpad'
device: 'smartphone'
models:
- regex: 'Coolpad ?([^/]+) Build'
model: '$1'
- regex: '(?:YL-)?Coolpad[ _-]?([a-z0-9]+)'
model: '$1'
# Cricket # Cricket
Cricket: Cricket:
regex: 'Cricket-([a-z0-9]+)' regex: 'Cricket-([a-z0-9]+)'
...@@ -491,10 +515,14 @@ Haier: ...@@ -491,10 +515,14 @@ Haier:
# Huawei # Huawei
Huawei: Huawei:
regex: 'Huawei|vodafone([a-z0-9]+)' regex: '(HW-)?Huawei|vodafone([a-z0-9]+)'
device: 'smartphone' device: 'smartphone'
models: models:
- regex: 'Huawei(?:[\- /_]|/1\.0/)?([a-z0-9]+)' - regex: '(MediaPad [^/]*) Build'
model: '$1'
- regex: 'Huawei ([^/]*) Build'
model: '$1'
- regex: '(?:HW-)?Huawei(?:[\- /_]|/1\.0/)?([a-z0-9]+)'
model: '$1' model: '$1'
- regex: 'Huawei; ([a-z0-9 -]+)' - regex: 'Huawei; ([a-z0-9 -]+)'
model: '$1' model: '$1'
...@@ -594,6 +622,8 @@ Lenovo: ...@@ -594,6 +622,8 @@ Lenovo:
regex: '(?:LNV-)?Lenovo|IdeaTab' regex: '(?:LNV-)?Lenovo|IdeaTab'
device: 'smartphone' device: 'smartphone'
models: models:
- regex: 'Lenovo ([^/]*) Build'
model: '$1'
- regex: '(?:LNV-)?Lenovo[ \-_]([a-z0-9]+)' - regex: '(?:LNV-)?Lenovo[ \-_]([a-z0-9]+)'
model: '$1' model: '$1'
- regex: 'IdeaTab[ \-_]?([a-z0-9]+)' - regex: 'IdeaTab[ \-_]?([a-z0-9]+)'
...@@ -895,7 +925,7 @@ Samsung: ...@@ -895,7 +925,7 @@ Samsung:
model: '$1' model: '$1'
- regex: 'SAMSUNG;[ ]?([a-z0-9]+[\-_][a-z0-9]+)' - regex: 'SAMSUNG;[ ]?([a-z0-9]+[\-_][a-z0-9]+)'
model: '$1' model: '$1'
- regex: 'SAMSUNG[ _/]?([a-z0-9\-]+)' - regex: 'SAMSUNG[ _/-]?([a-z0-9\-]+)'
model: '$1' model: '$1'
- regex: 'SAMSUNG;[ ]?([a-z0-9 ]+)' - regex: 'SAMSUNG;[ ]?([a-z0-9 ]+)'
model: '$1' model: '$1'
...@@ -1035,6 +1065,8 @@ Sony: ...@@ -1035,6 +1065,8 @@ Sony:
regex: 'Sony|PlayStation' regex: 'Sony|PlayStation'
device: 'smartphone' device: 'smartphone'
models: models:
- regex: 'Sony[ ]?([^/]*) Build'
model: '$1'
- regex: 'Sony[ ]?([a-z0-9\-]+)' - regex: 'Sony[ ]?([a-z0-9\-]+)'
model: '$1' model: '$1'
- regex: '(PlayStation (?:3|4|Portable|Vita))' - regex: '(PlayStation (?:3|4|Portable|Vita))'
...@@ -1091,9 +1123,10 @@ TCL: ...@@ -1091,9 +1123,10 @@ TCL:
# teXet # teXet
teXet: teXet:
regex: '(NaviPad .*) Build' regex: '(NaviPad [^/]*) Build'
device: 'tablet' device: 'tablet'
model: '$1' model: '$1'
# Telit # Telit
Telit: Telit:
regex: 'Telit' regex: 'Telit'
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter