Skip to content

Commit a14f85b

Browse files
authored
Merge pull request #307 from Googolplexed0/patch-1
Accept Incorrectly Capitalized Content-Range Headers as Backup
2 parents 2782d23 + 4f796e6 commit a14f85b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

librespot/audio/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,8 @@ def __init__(self, session: Session, stream_id: StreamId,
578578
response = self.request(range_start=0,
579579
range_end=ChannelManager.chunk_size - 1)
580580
content_range = response.headers.get("Content-Range")
581+
if content_range is None:
582+
content_range = response.headers.get("content-range")
581583
if content_range is None:
582584
raise IOError("Missing Content-Range header!")
583585
split = content_range.split("/")

0 commit comments

Comments
 (0)