24 lines
543 B
Python
24 lines
543 B
Python
from getmac import get_mac_address
|
|
import os
|
|
|
|
class JellyfinUtils:
|
|
@staticmethod
|
|
def get_machine_name() -> str:
|
|
"""
|
|
Retrieves the machine name of the current host.
|
|
|
|
Returns:
|
|
str: The machine name.
|
|
"""
|
|
return os.uname().nodename
|
|
|
|
@staticmethod
|
|
def get_unique_id() -> str:
|
|
"""
|
|
Retrieves the MAC address of the localhost as a unique identifier.
|
|
|
|
Returns:
|
|
str: The MAC address.
|
|
"""
|
|
return get_mac_address(hostname="localhost")
|