Skip to content

Commit

Permalink
[Harddisk, About] Add brackets to SD card name / model and remove dou…
Browse files Browse the repository at this point in the history
…ble brackets from other devices in about / devices screen
  • Loading branch information
Ev0-BH committed Jan 15, 2024
1 parent 125e4be commit 8361ee3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/python/Components/Harddisk.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def model(self):
if data is None:
print("[Harddisk] Error: Failed to get model!%s:" % msg)
return "Unknown"
return data
return "(" + data + ")".replace("((", "(").replace("))", ")")

def free(self, dev=None):
if dev is None:
Expand Down
4 changes: 2 additions & 2 deletions lib/python/Screens/About.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def populate2(self):
hdd = self.hddlist[count][1]
hddp = self.hddlist[count][0]
if "ATA" or "USB" in hddp:
hddp = hddp.replace("ATA ", "").replace("Internal", "ATA Bus").replace("USB ", "")
hddp = hddp.replace("ATA ", "").replace("Internal", "ATA Bus").replace("USB ", "").replace(" (SD", "(SD")
free = hdd.Totalfree()
if free >= 1:
free *= 1000000 # convert MB to bytes
Expand All @@ -298,7 +298,7 @@ def populate2(self):
freeline = _("\n") + ("Free: ") + _("Full")
line = "%s %s" % (hddp, freeline)
self.list.append(line)
self.list = "\n".join(self.list)
self.list = "\n".join(self.list).replace("((", "(").replace("))", ")")
self["hdd"].setText(self.list)

self.Console.ePopen("df -mh | grep -v '^Filesystem'", self.Stage1Complete)
Expand Down

0 comments on commit 8361ee3

Please sign in to comment.