mirror of
https://github.com/fHDHR/fHDHR_NextPVR.git
synced 2025-12-06 20:36:58 -05:00
Minor enhancements
This commit is contained in:
parent
38e98d7000
commit
aa01bff67e
@ -22,7 +22,7 @@ if sys.version_info.major == 2 or sys.version_info < (3, 7):
|
|||||||
|
|
||||||
opersystem = platform.system()
|
opersystem = platform.system()
|
||||||
if opersystem in ["Windows"]:
|
if opersystem in ["Windows"]:
|
||||||
print("WARNING: This script may fail on Windows.")
|
print("WARNING: This script may fail on Windows. Try Setting the `thread_method` to `threading`")
|
||||||
|
|
||||||
|
|
||||||
def build_args_parser():
|
def build_args_parser():
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
import random
|
import random
|
||||||
import configparser
|
import configparser
|
||||||
import pathlib
|
import pathlib
|
||||||
@ -8,6 +9,7 @@ import platform
|
|||||||
import json
|
import json
|
||||||
|
|
||||||
import fHDHR.exceptions
|
import fHDHR.exceptions
|
||||||
|
from fHDHR import fHDHR_VERSION
|
||||||
from fHDHR.tools import isint, isfloat, is_arithmetic, is_docker
|
from fHDHR.tools import isint, isfloat, is_arithmetic, is_docker
|
||||||
|
|
||||||
|
|
||||||
@ -49,15 +51,14 @@ class Config():
|
|||||||
|
|
||||||
def load_versions(self):
|
def load_versions(self):
|
||||||
|
|
||||||
self.internal["versions"] = {
|
self.internal["versions"] = {}
|
||||||
"opersystem": None,
|
|
||||||
"isdocker": False,
|
self.internal["versions"]["fHDHR"] = fHDHR_VERSION
|
||||||
"ffmpeg": "N/A",
|
|
||||||
"vlc": "N/A"
|
self.internal["versions"]["Python"] = sys.version
|
||||||
}
|
|
||||||
|
|
||||||
opersystem = platform.system()
|
opersystem = platform.system()
|
||||||
self.internal["versions"]["opersystem"] = opersystem
|
self.internal["versions"]["Operating System"] = opersystem
|
||||||
if opersystem in ["Linux", "Darwin"]:
|
if opersystem in ["Linux", "Darwin"]:
|
||||||
# Linux/Mac
|
# Linux/Mac
|
||||||
if os.getuid() == 0 or os.geteuid() == 0:
|
if os.getuid() == 0 or os.geteuid() == 0:
|
||||||
@ -70,7 +71,7 @@ class Config():
|
|||||||
print("Uncommon Operating System, use at your own risk.")
|
print("Uncommon Operating System, use at your own risk.")
|
||||||
|
|
||||||
isdocker = is_docker()
|
isdocker = is_docker()
|
||||||
self.internal["versions"]["isdocker"] = isdocker
|
self.internal["versions"]["Docker"] = isdocker
|
||||||
|
|
||||||
if self.dict["fhdhr"]["stream_type"] == "ffmpeg":
|
if self.dict["fhdhr"]["stream_type"] == "ffmpeg":
|
||||||
try:
|
try:
|
||||||
|
|||||||
@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
from .index_html import Index_HTML
|
from .index_html import Index_HTML
|
||||||
from .origin_html import Origin_HTML
|
from .origin_html import Origin_HTML
|
||||||
from .cluster_html import Cluster_HTML
|
|
||||||
from .diagnostics_html import Diagnostics_HTML
|
|
||||||
from .streams_html import Streams_HTML
|
|
||||||
from .version_html import Version_HTML
|
|
||||||
from .guide_html import Guide_HTML
|
from .guide_html import Guide_HTML
|
||||||
|
from .cluster_html import Cluster_HTML
|
||||||
|
from .streams_html import Streams_HTML
|
||||||
from .xmltv_html import xmlTV_HTML
|
from .xmltv_html import xmlTV_HTML
|
||||||
from .settings import Settings_HTML
|
from .version_html import Version_HTML
|
||||||
|
from .diagnostics_html import Diagnostics_HTML
|
||||||
|
from .settings_html import Settings_HTML
|
||||||
|
|
||||||
|
|
||||||
class fHDHR_Pages():
|
class fHDHR_Pages():
|
||||||
@ -16,12 +16,12 @@ class fHDHR_Pages():
|
|||||||
def __init__(self, fhdhr):
|
def __init__(self, fhdhr):
|
||||||
self.fhdhr = fhdhr
|
self.fhdhr = fhdhr
|
||||||
|
|
||||||
self.index = Index_HTML(fhdhr)
|
self.index_html = Index_HTML(fhdhr)
|
||||||
self.settings = Settings_HTML(fhdhr)
|
self.origin_html = Origin_HTML(fhdhr)
|
||||||
self.origin = Origin_HTML(fhdhr)
|
self.guide_html = Guide_HTML(fhdhr)
|
||||||
self.cluster = Cluster_HTML(fhdhr)
|
self.cluster_html = Cluster_HTML(fhdhr)
|
||||||
self.diagnostics = Diagnostics_HTML(fhdhr)
|
self.streams_html = Streams_HTML(fhdhr)
|
||||||
self.version = Version_HTML(fhdhr)
|
self.xmltv_html = xmlTV_HTML(fhdhr)
|
||||||
self.guide = Guide_HTML(fhdhr)
|
self.version_html = Version_HTML(fhdhr)
|
||||||
self.streams = Streams_HTML(fhdhr)
|
self.diagnostics_html = Diagnostics_HTML(fhdhr)
|
||||||
self.xmltv = xmlTV_HTML(fhdhr)
|
self.settings_html = Settings_HTML(fhdhr)
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
import sys
|
|
||||||
from flask import request, render_template
|
from flask import request, render_template
|
||||||
|
|
||||||
|
|
||||||
@ -13,13 +12,7 @@ class Version_HTML():
|
|||||||
return self.get(*args)
|
return self.get(*args)
|
||||||
|
|
||||||
def get(self, *args):
|
def get(self, *args):
|
||||||
|
version_dict = {}
|
||||||
version_dict = {
|
for key in list(self.fhdhr.config.internal["versions"].keys()):
|
||||||
"fHDHR": self.fhdhr.version,
|
version_dict[key] = self.fhdhr.config.internal["versions"][key]
|
||||||
"Python": sys.version,
|
|
||||||
"Operating System": self.fhdhr.config.internal["versions"]["opersystem"],
|
|
||||||
"Using Docker": self.fhdhr.config.internal["versions"]["isdocker"],
|
|
||||||
"ffmpeg": self.fhdhr.config.internal["versions"]["ffmpeg"],
|
|
||||||
"vlc": self.fhdhr.config.internal["versions"]["vlc"],
|
|
||||||
}
|
|
||||||
return render_template('version.html', request=request, fhdhr=self.fhdhr, version_dict=version_dict, list=list)
|
return render_template('version.html', request=request, fhdhr=self.fhdhr, version_dict=version_dict, list=list)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user