diff --git a/python/common/src/rascsi/common_settings.py b/python/common/src/rascsi/common_settings.py index 0bd83a84..2a975c1a 100644 --- a/python/common/src/rascsi/common_settings.py +++ b/python/common/src/rascsi/common_settings.py @@ -8,6 +8,7 @@ WORK_DIR = getcwd() REMOVABLE_DEVICE_TYPES = ("SCCD", "SCRM", "SCMO") NETWORK_DEVICE_TYPES = ("SCDP", "SCBR") +SUPPORT_DEVICE_TYPES = ("SCHS", ) # There may be a more elegant way to get the HOME dir of the user that installed RaSCSI HOME_DIR = "/".join(WORK_DIR.split("/")[0:3]) diff --git a/python/oled/src/rascsi_oled_monitor.py b/python/oled/src/rascsi_oled_monitor.py index 90ba7d29..7ecd750a 100755 --- a/python/oled/src/rascsi_oled_monitor.py +++ b/python/oled/src/rascsi_oled_monitor.py @@ -46,6 +46,7 @@ from rascsi.socket_cmds import SocketCmds from rascsi.common_settings import ( REMOVABLE_DEVICE_TYPES, NETWORK_DEVICE_TYPES, + SUPPORT_DEVICE_TYPES, ) parser = argparse.ArgumentParser(description="RaSCSI OLED Monitor script") @@ -186,8 +187,8 @@ def formatted_output(): f"{line['file']} {line['status']}") else: output.append(f"{line['id']} {line['device_type'][2:4]} {line['status']}") - # Special handling for network devices - elif line["device_type"] in NETWORK_DEVICE_TYPES: + # Special handling of devices that don't use image files + elif line["device_type"] in (NETWORK_DEVICE_TYPES + SUPPORT_DEVICE_TYPES): output.append(f"{line['id']} {line['device_type'][2:4]} {line['vendor']} " f"{line['product']}") # Print only the Vendor/Product info if it's not generic RaSCSI diff --git a/python/web/src/device_utils.py b/python/web/src/device_utils.py index e5abdff7..02711483 100644 --- a/python/web/src/device_utils.py +++ b/python/web/src/device_utils.py @@ -59,20 +59,22 @@ def extend_device_names(device_types): """ mapped_device_types = {} for device_type in device_types: - if device_type is "SAHD": - device_name = _("SASI Hard Drive") - elif device_type is "SCHD": - device_name = _("SCSI Hard Drive") - elif device_type is "SCRM": - device_name = _("Removable Drive") - elif device_type is "SCMO": - device_name = _("Magneto-Optical Drive") - elif device_type is "SCCD": - device_name = _("CD-ROM Drive") - elif device_type is "SCBR": + if device_type == "SAHD": + device_name = _("SASI Hard Disk") + elif device_type == "SCHD": + device_name = _("SCSI Hard Disk") + elif device_type == "SCRM": + device_name = _("Removable Disk") + elif device_type == "SCMO": + device_name = _("Magneto-Optical") + elif device_type == "SCCD": + device_name = _("CD-ROM / DVD") + elif device_type == "SCBR": device_name = _("X68000 Host Bridge") - elif device_type is "SCDP": + elif device_type == "SCDP": device_name = _("DaynaPORT SCSI/Link") + elif device_type == "SCHS": + device_name = _("Host Service") else: device_name = _("Unknown Device") mapped_device_types[device_type] = device_name diff --git a/python/web/src/templates/index.html b/python/web/src/templates/index.html index 667f230a..200abe91 100644 --- a/python/web/src/templates/index.html +++ b/python/web/src/templates/index.html @@ -267,7 +267,7 @@ {{ _("Select device type") }} {% for key, value in device_types.items() %} - {% if key not in NETWORK_DEVICE_TYPES %} + {% if key not in (NETWORK_DEVICE_TYPES + SUPPORT_DEVICE_TYPES) %} @@ -360,6 +360,50 @@
{{ _("Install Macproxy to browse the Web with any vintage browser. It's not just for Macs!", url="https://github.com/akuker/RASCSI/wiki/Vintage-Web-Proxy#macproxy") }}
{% endif %} ++ + | +