Skip to content

Commit 27797a4

Browse files
committed
Simplify byte range to timestamp conversion for compatibility with Python 2 #1412
1 parent 3c5de9f commit 27797a4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

resources/lib/youtube_plugin/kodion/network/http_server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,11 +458,11 @@ def do_GET(self):
458458
timestamp = ' (~%.2fs)' % (
459459
float(duration)
460460
*
461-
next(map(int, byte_range[6:].split('-')))
461+
int(byte_range[6:].split('-')[0])
462462
/
463463
int(clen)
464464
)
465-
except (IndexError, StopIteration, ValueError):
465+
except ValueError:
466466
timestamp = ''
467467
else:
468468
timestamp = ''

0 commit comments

Comments
 (0)