|
|
|
@ -237,20 +237,11 @@ def start(attrs):
|
|
|
|
|
new_version = latest_version[0] if latest_version and (version[1] != latest_version[1] or (version[2] and version[2] < latest_version[2])) else None
|
|
|
|
|
if new_version:
|
|
|
|
|
logger.info(f" Newest Version: {new_version}")
|
|
|
|
|
def get_required_plexapi_version():
|
|
|
|
|
with open('requirements.txt', 'r') as file:
|
|
|
|
|
lines = file.readlines()
|
|
|
|
|
for line in lines:
|
|
|
|
|
if line.strip().startswith('PlexAPI=='):
|
|
|
|
|
return line.strip().split('==')[1]
|
|
|
|
|
return None
|
|
|
|
|
|
|
|
|
|
required_version = get_required_plexapi_version()
|
|
|
|
|
|
|
|
|
|
if required_version == plexapi.VERSION:
|
|
|
|
|
logger.info(f" PlexAPI library version: {plexapi.VERSION}")
|
|
|
|
|
else:
|
|
|
|
|
logger.info(f" PlexAPI library version: {plexapi.VERSION} (Required Version: {required_version})")
|
|
|
|
|
with open("requirements.txt", "r") as file:
|
|
|
|
|
required_version = next(l.strip()[9:] for l in file.readlines() if l.strip().startswith("PlexAPI=="))
|
|
|
|
|
logger.info(f" PlexAPI Version: {plexapi.VERSION}")
|
|
|
|
|
if required_version != plexapi.VERSION:
|
|
|
|
|
logger.info(f" PlexAPI Requires an Update to Version: {required_version}")
|
|
|
|
|
logger.info(f" Platform: {platform.platform()}")
|
|
|
|
|
logger.info(f" Memory: {round(psutil.virtual_memory().total / (1024.0 ** 3))} GB")
|
|
|
|
|
if "time" in attrs and attrs["time"]: start_type = f"{attrs['time']} "
|
|
|
|
|