mirror of
https://github.com/SeedSigner/seedsigner.git
synced 2026-10-05 15:08:25 +00:00
Minor bugfix, compatibility fix
This commit is contained in:
@@ -20,7 +20,7 @@ class Camera(Singleton):
|
||||
from seedsigner.models import Settings
|
||||
if cls._instance is None:
|
||||
cls._instance = cls.__new__(cls)
|
||||
cls._instance._camera_rotation = Settings.get_instance().get_value(SettingsConstants.SETTING__CAMERA_ROTATION)
|
||||
cls._instance._camera_rotation = int(Settings.get_instance().get_value(SettingsConstants.SETTING__CAMERA_ROTATION))
|
||||
return cls._instance
|
||||
|
||||
|
||||
|
||||
@@ -746,12 +746,13 @@ class SettingsQrDecoder(BaseSingleFrameQrDecoder):
|
||||
|
||||
|
||||
def add(self, segment, qr_type=QRType.SETTINGS):
|
||||
print(f"SettingsQR: {segment}")
|
||||
print(f"SettingsQR:\n{segment}")
|
||||
try:
|
||||
self.settings = {}
|
||||
|
||||
# QR Settings format is space-separated key/value pairs
|
||||
for entry in segment.split(" "):
|
||||
# QR Settings format is space-separated key/value pairs, but should also
|
||||
# parse \n-separated keys.
|
||||
for entry in segment.split():
|
||||
key = entry.split("=")[0].strip()
|
||||
value = entry.split("=")[1].strip()
|
||||
self.settings[key] = value
|
||||
|
||||
Reference in New Issue
Block a user