Compare commits

..

No commits in common. "main" and "v0.0.8" have entirely different histories.
main ... v0.0.8

6 changed files with 254 additions and 698 deletions

View File

@ -3,17 +3,10 @@
![Forks](https://img.shields.io/github/forks/kokarare1212/librespot-python.svg) ![Forks](https://img.shields.io/github/forks/kokarare1212/librespot-python.svg)
[![DeepSource](https://deepsource.io/gh/kokarare1212/librespot-python.svg/?label=active+issues&show_trend=true)](https://deepsource.io/gh/kokarare1212/librespot-python/?ref=repository-badge) [![DeepSource](https://deepsource.io/gh/kokarare1212/librespot-python.svg/?label=active+issues&show_trend=true)](https://deepsource.io/gh/kokarare1212/librespot-python/?ref=repository-badge)
![Counter](https://count.getloli.com/get/@librespot-python?theme=moebooru)
# Librespot-Python # Librespot-Python
Open Source Spotify Client Open Source Spotify Client
## Support Project
If you find our project useful and want to support its development, please consider making a donation. Your contribution will help us maintain and improve the project, ensuring that it remains free and accessible to everyone.<br><br>
[![GitHub Sponsor](https://img.shields.io/github/sponsors/kokarare1212?label=GitHub%20Sponsor&logo=GitHub)](https://github.com/sponsors/kokarare1212)
[![Liberapay receiving](https://img.shields.io/liberapay/receives/kokarare1212?label=Liberapay&logo=Liberapay)](https://liberapay.com/kokarare1212/)
## About The Project ## About The Project
This project was developed to make the music streaming service Spotify available This project was developed to make the music streaming service Spotify available
@ -124,3 +117,7 @@ for more information.
- [Librespot](https://github.com/librespot-org/librespot) (Concept) - [Librespot](https://github.com/librespot-org/librespot) (Concept)
- [Librespot-Java](https://github.com/librespot-org/librespot-java) (Core) - [Librespot-Java](https://github.com/librespot-org/librespot-java) (Core)
## Special thanks
<a href="https://www.jetbrains.com/"><img src="https://github.com/kokarare1212/librespot-python/blob/main/img/jetbrains.png?raw=true" width="100" height="100" alt="JetBrains"></a>

View File

@ -6,7 +6,7 @@ import platform
class Version: class Version:
version_name = "0.0.9" version_name = "0.0.8"
@staticmethod @staticmethod
def platform() -> Platform: def platform() -> Platform:
@ -31,4 +31,4 @@ class Version:
return BuildInfo(product=Product.PRODUCT_CLIENT, return BuildInfo(product=Product.PRODUCT_CLIENT,
product_flags=[ProductFlags.PRODUCT_FLAG_NONE], product_flags=[ProductFlags.PRODUCT_FLAG_NONE],
platform=Version.platform(), platform=Version.platform(),
version=117300517) version=112800721)

View File

@ -320,10 +320,7 @@ class CdnFeedHelper:
@staticmethod @staticmethod
def get_url(resp: StorageResolve.StorageResolveResponse) -> str: def get_url(resp: StorageResolve.StorageResolveResponse) -> str:
selected_url = random.choice(resp.cdnurl) return random.choice(resp.cdnurl)
while "audio4-gm-fb" in selected_url or "audio-gm-fb" in selected_url:
selected_url = random.choice(resp.cdnurl)
return selected_url
@staticmethod @staticmethod
def load_track( def load_track(
@ -506,11 +503,6 @@ class CdnManager:
token_str = str(token_list[0]) token_str = str(token_list[0])
except TypeError: except TypeError:
token_str = "" token_str = ""
expires_list = token_query.get("Expires")
try:
expires_str = str(expires_list[0])
except TypeError:
expires_str = ""
if token_str != "None" and len(token_str) != 0: if token_str != "None" and len(token_str) != 0:
expire_at = None expire_at = None
split = token_str.split("~") split = token_str.split("~")
@ -528,15 +520,6 @@ class CdnManager:
"Invalid __token__ in CDN url: {}".format(url)) "Invalid __token__ in CDN url: {}".format(url))
return return
self.__expiration = expire_at * 1000 self.__expiration = expire_at * 1000
elif expires_str != "None" and len(expires_str) != 0:
expires_at = None
expires_str = expires_str.split("~")[0]
expires_at = int(expires_str)
if expires_at is None:
self.__expiration = -1
self.__cdn_manager.logger.warning("Invalid Expires param in CDN url: {}".format(url))
return
self.__expiration = expires_at * 1000
else: else:
try: try:
i = token_url.query.index("_") i = token_url.query.index("_")

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
defusedxml==0.7.1 defusedxml==0.7.1
protobuf==3.20.1 protobuf==3.20.1
pycryptodomex==3.20.0 pycryptodomex==3.17
pyogg==0.6.14a.1 pyogg==0.6.14a.1
requests==2.32.3 requests==2.28.2
websocket-client==1.8.0 websocket-client==1.5.1
zeroconf==0.132.2 zeroconf==0.55.0

View File

@ -1,7 +1,7 @@
import setuptools import setuptools
setuptools.setup(name="librespot", setuptools.setup(name="librespot",
version="0.0.9", version="0.0.8",
description="Open Source Spotify Client", description="Open Source Spotify Client",
long_description=open("README.md").read(), long_description=open("README.md").read(),
long_description_content_type="text/markdown", long_description_content_type="text/markdown",