Expanded cpu name detection

pull/86/head
aristocratos 2020-08-23 13:17:16 +02:00
parent 5ff5f23400
commit 95b0076445
1 changed files with 3 additions and 1 deletions

View File

@ -4095,10 +4095,12 @@ def get_cpu_name() -> str:
name = nlist[nlist.index("CPU")+1] name = nlist[nlist.index("CPU")+1]
elif "Ryzen" in name: elif "Ryzen" in name:
name = " ".join(nlist[nlist.index("Ryzen"):nlist.index("Ryzen")+3]) name = " ".join(nlist[nlist.index("Ryzen"):nlist.index("Ryzen")+3])
elif "Duo" in name and "@" in name:
name = " ".join(nlist[:nlist.index("@")])
elif "CPU" in name and not nlist[0] == "CPU": elif "CPU" in name and not nlist[0] == "CPU":
name = nlist[nlist.index("CPU")-1] name = nlist[nlist.index("CPU")-1]
return name return name.replace("Processor ", "").replace("CPU ", "").replace("(R)", "").replace("(TM)", "").replace("Intel ", "")
def create_box(x: int = 0, y: int = 0, width: int = 0, height: int = 0, title: str = "", title2: str = "", line_color: Color = None, title_color: Color = None, fill: bool = True, box = None) -> str: def create_box(x: int = 0, y: int = 0, width: int = 0, height: int = 0, title: str = "", title2: str = "", line_color: Color = None, title_color: Color = None, fill: bool = True, box = None) -> str:
'''Create a box from a box object or by given arguments''' '''Create a box from a box object or by given arguments'''