-
-
Notifications
You must be signed in to change notification settings - Fork 82
Expand file tree
/
Copy path__init__.py
More file actions
34 lines (28 loc) · 1.11 KB
/
__init__.py
File metadata and controls
34 lines (28 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from __future__ import annotations
from librespot.crypto import DiffieHellman
from librespot.proto.Keyexchange_pb2 import BuildInfo, Platform, Product, ProductFlags
from librespot.structure import Closeable, Runnable
import platform
class Version:
version_name = "0.0.11"
@staticmethod
def platform() -> Platform:
if platform.system() == "Windows":
return Platform.PLATFORM_WIN32_X86
if platform.system() == "Darwin":
return Platform.PLATFORM_OSX_X86
return Platform.PLATFORM_LINUX_X86
@staticmethod
def version_string():
return "librespot-python " + Version.version_name
@staticmethod
def system_info_string():
return Version.version_string() + \
"; Python " + platform.python_version() + \
"; " + platform.system()
@staticmethod
def standard_build_info() -> BuildInfo:
return BuildInfo(product=Product.PRODUCT_CLIENT,
product_flags=[ProductFlags.PRODUCT_FLAG_NONE],
platform=Version.platform(),
version=117300517)