From 3421cb1e7b55a5b56f6bb6f5909aeb20f779d3f2 Mon Sep 17 00:00:00 2001 From: Louis Barthonet Date: Mon, 3 Jun 2024 11:43:25 +0300 Subject: [PATCH] fix(device): ensure chromecast parsing doesn't return null This is supported by the JS library, but not by all the others. This sets the model to Chromecast, to prevent any possible error going on, as the model is needed in that regex. --- regexes.yaml | 2 +- tests/test_device.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/regexes.yaml b/regexes.yaml index 7f8116b8..5106155e 100644 --- a/regexes.yaml +++ b/regexes.yaml @@ -2513,7 +2513,7 @@ device_parsers: - regex: 'CrKey/' brand_replacement: 'Google' device_replacement: 'Chromecast' - model_replacement: null + model_replacement: 'Chromecast' ######### # Cloudfone diff --git a/tests/test_device.yaml b/tests/test_device.yaml index 659df843..9d8bddff 100644 --- a/tests/test_device.yaml +++ b/tests/test_device.yaml @@ -7763,7 +7763,7 @@ test_cases: - user_agent_string: 'Mozilla/5.0 (X11; Linux armv7l) CrKey/1' family: 'Chromecast' brand: 'Google' - model: null + model: 'Chromecast' - user_agent_string: 'Mozilla/5.0 (Linux; U; Android 2.3.5; En-gb; Cloudfone_Excite320e Build/GRJ90) AppleWebKit/533.1 (KHTML, Like Gecko) Version/4.0 Mobile Safari/533.1' family: 'Cloudfone Excite 320e'