mirror of https://github.com/morpheus65535/bazarr
28 lines
986 B
Python
28 lines
986 B
Python
|
# coding=utf-8
|
||
|
|
||
|
import os
|
||
|
import platform
|
||
|
|
||
|
from flask import jsonify
|
||
|
from flask_restful import Resource
|
||
|
|
||
|
from ..utils import authenticate
|
||
|
from utils import get_sonarr_info, get_radarr_info
|
||
|
from get_args import args
|
||
|
from init import startTime
|
||
|
|
||
|
|
||
|
class SystemStatus(Resource):
|
||
|
@authenticate
|
||
|
def get(self):
|
||
|
system_status = {}
|
||
|
system_status.update({'bazarr_version': os.environ["BAZARR_VERSION"]})
|
||
|
system_status.update({'sonarr_version': get_sonarr_info.version()})
|
||
|
system_status.update({'radarr_version': get_radarr_info.version()})
|
||
|
system_status.update({'operating_system': platform.platform()})
|
||
|
system_status.update({'python_version': platform.python_version()})
|
||
|
system_status.update({'bazarr_directory': os.path.dirname(os.path.dirname(__file__))})
|
||
|
system_status.update({'bazarr_config_directory': args.config_dir})
|
||
|
system_status.update({'start_time': startTime})
|
||
|
return jsonify(data=system_status)
|