(InputPos, isHeight)
| 243 | ZoomFactor = GetZoomFactor(BiliPlayerSize, (width, height)) |
| 244 | |
| 245 | def GetPosition(InputPos, isHeight): |
| 246 | isHeight = int(isHeight) # True -> 1 |
| 247 | if isinstance(InputPos, int): |
| 248 | return ZoomFactor[0]*InputPos+ZoomFactor[isHeight+1] |
| 249 | elif isinstance(InputPos, float): |
| 250 | if InputPos > 1: |
| 251 | return ZoomFactor[0]*InputPos+ZoomFactor[isHeight+1] |
| 252 | else: |
| 253 | return BiliPlayerSize[isHeight]*ZoomFactor[0]*InputPos+ZoomFactor[isHeight+1] |
| 254 | else: |
| 255 | try: |
| 256 | InputPos = int(InputPos) |
| 257 | except ValueError: |
| 258 | InputPos = float(InputPos) |
| 259 | return GetPosition(InputPos, isHeight) |
| 260 | |
| 261 | try: |
| 262 | comment_args = safe_list(json.loads(c[3])) |
no outgoing calls
no test coverage detected