Skip to content

Commit

Permalink
Merge pull request #968 from ignacionar/#967
Browse files Browse the repository at this point in the history
#967 Set device type based on model or name
  • Loading branch information
dhreben authored May 22, 2024
2 parents 40cf4ac + d6d1512 commit 9d0c62d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/units/ios-device/plugins/group.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,15 @@ module.exports = syrup.serial()
json: true
})
.then((deviceInfo) => {
log.info('Storing device type value: ' + deviceInfo.value.model)
let = deviceType = deviceInfo.value.model
let deviceInfoModel = deviceInfo.value.model.toLowerCase()
let deviceInfoName = deviceInfo.value.name.toLowerCase()
let deviceType
if (deviceInfoModel.includes("tv") || deviceInfoName.includes("tv")) {
deviceType = "Apple TV"
} else {
deviceType = "iPhone"
}
log.info('Storing device type value: ' + deviceType)
dbapi.setDeviceType(options.serial, deviceType)
})
.catch((err) => {
Expand Down

0 comments on commit 9d0c62d

Please sign in to comment.