2021-09-12 23:47:53 +02:00
|
|
|
from __future__ import annotations
|
2021-09-13 14:04:50 +02:00
|
|
|
from librespot.crypto import DiffieHellman
|
2021-08-24 07:43:18 +02:00
|
|
|
from librespot.proto.Keyexchange_pb2 import BuildInfo, Platform, Product, ProductFlags
|
2021-09-13 14:04:50 +02:00
|
|
|
from librespot.structure import Closeable, Runnable
|
2021-02-24 00:46:59 +01:00
|
|
|
import platform
|
|
|
|
|
|
|
|
|
|
|
|
class Version:
|
2022-06-28 23:47:04 +02:00
|
|
|
version_name = "0.0.5"
|
2021-02-24 00:46:59 +01:00
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
def platform() -> Platform:
|
|
|
|
if platform.system() == "Windows":
|
|
|
|
return Platform.PLATFORM_WIN32_X86
|
2021-04-10 01:30:53 +02:00
|
|
|
if platform.system() == "Darwin":
|
2021-02-24 00:46:59 +01:00
|
|
|
return Platform.PLATFORM_OSX_X86
|
2021-04-10 01:30:53 +02:00
|
|
|
return Platform.PLATFORM_LINUX_X86
|
2021-02-24 00:46:59 +01:00
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
def version_string():
|
2021-09-12 05:58:24 +02:00
|
|
|
return "librespot-python " + Version.version_name
|
2021-02-24 00:46:59 +01:00
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
def system_info_string():
|
2021-09-12 05:58:24 +02:00
|
|
|
return Version.version_string() + \
|
|
|
|
"; Python " + platform.python_version() + \
|
|
|
|
"; " + platform.system()
|
2021-02-24 00:46:59 +01:00
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
def standard_build_info() -> BuildInfo:
|
2021-09-12 06:58:42 +02:00
|
|
|
return BuildInfo(product=Product.PRODUCT_CLIENT,
|
|
|
|
product_flags=[ProductFlags.PRODUCT_FLAG_NONE],
|
|
|
|
platform=Version.platform(),
|
2021-09-13 14:04:50 +02:00
|
|
|
version=112800721)
|