[PR #16] [MERGED] Fix some critical bugs and update the example #77

Closed
opened 2026-02-27 08:11:50 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/kokarare1212/librespot-python/pull/16
Author: @raitonoberu
Created: 4/24/2021
Status: Merged
Merged: 4/24/2021
Merged by: @kokarare1212

Base: mainHead: main


📝 Commits (3)

📊 Changes

18 files changed (+65 additions, -54 deletions)

View changed files

📝 README.md (+5 -5)
📝 librespot/audio/AbsChunkedInputStream.py (+5 -5)
📝 librespot/audio/AudioKeyManager.py (+2 -1)
📝 librespot/audio/cdn/CdnManager.py (+8 -8)
📝 librespot/audio/format/AudioQualityPicker.py (+1 -1)
📝 librespot/audio/storage/ChannelManager.py (+2 -1)
📝 librespot/core/Session.py (+8 -7)
📝 librespot/core/TokenProvider.py (+5 -4)
📝 librespot/dealer/ApiClient.py (+5 -5)
📝 librespot/dealer/DealerClient.py (+2 -1)
📝 librespot/mercury/MercuryClient.py (+5 -5)
📝 librespot/mercury/RawMercuryRequest.py (+4 -3)
📝 librespot/metadata/ShowId.py (+1 -1)
📝 librespot/player/Player.py (+2 -1)
📝 librespot/player/StateWrapper.py (+3 -1)
📝 librespot/player/codecs/AudioQuality.py (+2 -1)
📝 librespot/player/codecs/VorbisOnlyAudioQuality.py (+4 -3)
📝 librespot/player/state/DeviceStateHandler.py (+1 -1)

📄 Description

Hello @kokarare1212!
I'm glad to know that someone is porting Librespot to Python.
I tried your library, but ran into a few problems.

  1. TypeError in different files due to using things like list[int] instead of typing.List[int];
  2. AttributeError due to wrong reference;
  3. Missing imports in the example.

I made some changes. Now the login is finally working. However, stream.input_stream.stream().read() keeps saying Failed reading packet! without any logs. I don't understand the internal part, so I can only hope that you can get it to work :)

Thank you!


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/kokarare1212/librespot-python/pull/16 **Author:** [@raitonoberu](https://github.com/raitonoberu) **Created:** 4/24/2021 **Status:** ✅ Merged **Merged:** 4/24/2021 **Merged by:** [@kokarare1212](https://github.com/kokarare1212) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (3) - [`8481226`](https://github.com/kokarare1212/librespot-python/commit/8481226ff46f6b02e138cb76f393831b309c2440) Fix TypeError - [`84a43be`](https://github.com/kokarare1212/librespot-python/commit/84a43bed3d9091a65f13f29daeee6c24e647a20b) Fix AttributeError - [`89082b1`](https://github.com/kokarare1212/librespot-python/commit/89082b1448b26cc08cc39cf588ef246d7303476c) Update examples ### 📊 Changes **18 files changed** (+65 additions, -54 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+5 -5) 📝 `librespot/audio/AbsChunkedInputStream.py` (+5 -5) 📝 `librespot/audio/AudioKeyManager.py` (+2 -1) 📝 `librespot/audio/cdn/CdnManager.py` (+8 -8) 📝 `librespot/audio/format/AudioQualityPicker.py` (+1 -1) 📝 `librespot/audio/storage/ChannelManager.py` (+2 -1) 📝 `librespot/core/Session.py` (+8 -7) 📝 `librespot/core/TokenProvider.py` (+5 -4) 📝 `librespot/dealer/ApiClient.py` (+5 -5) 📝 `librespot/dealer/DealerClient.py` (+2 -1) 📝 `librespot/mercury/MercuryClient.py` (+5 -5) 📝 `librespot/mercury/RawMercuryRequest.py` (+4 -3) 📝 `librespot/metadata/ShowId.py` (+1 -1) 📝 `librespot/player/Player.py` (+2 -1) 📝 `librespot/player/StateWrapper.py` (+3 -1) 📝 `librespot/player/codecs/AudioQuality.py` (+2 -1) 📝 `librespot/player/codecs/VorbisOnlyAudioQuality.py` (+4 -3) 📝 `librespot/player/state/DeviceStateHandler.py` (+1 -1) </details> ### 📄 Description Hello @kokarare1212! I'm glad to know that someone is porting Librespot to Python. I tried your library, but ran into a few problems. 1. `TypeError` in different files due to using things like `list[int]` instead of `typing.List[int]`; 2. `AttributeError` due to wrong reference; 3. Missing imports in the example. I made some changes. Now the login is finally working. However, `stream.input_stream.stream().read()` keeps saying `Failed reading packet!` without any logs. I don't understand the internal part, so I can only hope that you can get it to work :) Thank you! --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 08:11:50 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot-python-kokarare1212#77
No description provided.