if devinfo.GetModel().Left(4) = "4200" then ...
"RokuMarkn" wrote:
You should compare just the first 4 digits of the model.
"RokuMarkn" wrote:
Yes, GetModel() returns 5000X on TVs. GetModelDetails() returns a more specific model number for the TV.
--Mark
"RokuMarkn" wrote:
Good point. If you do want to specifically detect those models, you can do a special case test for the first letter being "N". But there are only four models of that type, N1000, N1050, N1100 and N1101. Except for distinguishing the last two, using the first four letters would be fine in these cases too. I doubt there's any reason to act differently on the N1100 and N1101 anyway.
BrightScript Debugger> modStr = "N1234X" 'imagine it came from ifdeviceInfo.Getmodel
BrightScript Debugger> modStr = createObject("roRegex", "\D", "").replaceAll(modStr, "")
BrightScript Debugger> ? modStr
1234
"RokuShawnS" wrote:"Komag" wrote:
So I just recently ordered a refurbished Roku 1 2710XB
I assume the B means "refurBished"?
Er, possibly. I'd have to check into that though, as this is the first I'm hearing of XB.
"EnTerr" wrote:"RokuMarkn" wrote:
Good point. If you do want to specifically detect those models, you can do a special case test for the first letter being "N". But there are only four models of that type, N1000, N1050, N1100 and N1101. Except for distinguishing the last two, using the first four letters would be fine in these cases too. I doubt there's any reason to act differently on the N1100 and N1101 anyway.
1101 has USB, 1080p, 802.11 N, extra flash - which 1100 doesn't. First two may matter, i suppose.
"RokuMarkn" wrote:"EnTerr" wrote:"RokuMarkn" wrote:
If you're trying to detect USB or 1080p, you should definitely NOT be looking at the model number. You should use roDeviceInfo.HasFeature(), which will work on all models, even on future models that didn't exist when you wrote the code. I'd actually be interested to know why developers have ever needed to look at model numbers, as a need to do that probably indicates a deficiency in HasFeature().
--Mark