Skip to content

Commit

Permalink
improvements in communication of backup troubles (lost devices)
Browse files Browse the repository at this point in the history
  • Loading branch information
outdoorbits committed Jan 5, 2025
1 parent 6ab9c22 commit 1090586
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 24 deletions.
25 changes: 13 additions & 12 deletions scripts/backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ def backup(self):
if SourceStorageType in ['usb', 'internal','nvme', 'camera', 'cloud', 'cloud_rsync']:
self.SourceDevice = lib_storage.storage(StorageName=SourceStorageName, Role=lib_storage.role_Source, WaitForDevice=True, DeviceIdentifierPresetThis=Identifier, DeviceIdentifierPresetOther=self.TargetDevice.DeviceIdentifier)

self.__display.message([f":{self.__lan.l('box_backup_mounting_target')}", f":{self.__lan.l(f'box_backup_mode_{self.TargetDevice.StorageType}')} {self.TargetDevice.CloudServiceName}"])
self.SourceDevice.mount()

elif SourceStorageType in ['thumbnails', 'database', 'exif']:
Expand Down Expand Up @@ -532,7 +533,7 @@ def backup(self):

if not self.SourceDevice.mounted():
self.__log.message(f"remount source device {SourceStorageName} {self.SourceDevice.CloudServiceName} {self.SourceDevice.DeviceIdentifier}",3)
self.__display.message([f"s=a:{self.__lan.l('box_backup_remounting_source')}"])
self.__display.message([f"s=a:{self.__lan.l('box_backup_mounting_target')}", f"s=a:{self.__lan.l(f'box_backup_mode_{self.SourceDevice.StorageType}')} {self.SourceDevice.CloudServiceName}"])
if not self.SourceDevice.mount(TimeOutActive=True):
self.__reporter.add_error('Err.: Remounting source device failed!')

Expand All @@ -546,7 +547,7 @@ def backup(self):
if "Err.: Lost device!" in ErrorsOld:
if not self.TargetDevice.mounted():
self.__log.message(f"remount target device {self.TargetDevice.StorageType} {self.TargetDevice.CloudServiceName} {self.TargetDevice.DeviceIdentifier}",3)
self.__display.message([f"s=a:{self.__lan.l('box_backup_remounting_target')}"])
self.__display.message([f"s=a:{self.__lan.l('box_backup_mounting_target')}", f"s=a:{self.__lan.l(f'box_backup_mode_{self.TargetDevice.StorageType}')} {self.TargetDevice.CloudServiceName}"])
if not self.TargetDevice.mount(TimeOutActive=True):
self.__reporter.add_error('Err.: Remounting target device failed!')

Expand Down Expand Up @@ -582,17 +583,17 @@ def backup(self):

#define progress object
progress = lib_backup.progressmonitor(
setup = self.__setup,
display = self.__display,
log = self.__log,
lan = self.__lan,
FilesToProcess = FilesToProcess,
setup = self.__setup,
display = self.__display,
log = self.__log,
lan = self.__lan,
FilesToProcess = FilesToProcess,
FilesToProcess_possible_more = FilesToProcess_possible_more,
DisplayLine1 = DisplayLine1,
DisplayLine2 = DisplayLine2,
SourceDevice = self.SourceDevice,
TargetDevice = self.TargetDevice,
vpn = self.vpn
DisplayLine1 = DisplayLine1,
DisplayLine2 = DisplayLine2,
SourceDevice = self.SourceDevice,
TargetDevice = self.TargetDevice,
vpn = self.vpn
)

SyncStartTime = lib_system.get_uptime_sec()
Expand Down
6 changes: 3 additions & 3 deletions scripts/lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,9 @@
"rename_files": {
"renaming_files": "Umbenennen von Dateien"
},
"remounting": {
"source": "Quelle wieder einbinden...",
"target": "Ziel wieder einbinden..."
"mounting": {
"source": "Quelle einbinden",
"target": "Ziel einbinden"
}
},
"cronip": {
Expand Down
6 changes: 3 additions & 3 deletions scripts/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@
"rename_files": {
"renaming_files": "Renaming files"
},
"remounting": {
"source": "Remount source...",
"target": "Remount target..."
"mounting": {
"source": "Mount source",
"target": "Mount target"
}
},
"poweroff": {
Expand Down
6 changes: 3 additions & 3 deletions scripts/lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,9 @@
"rename_files": {
"renaming_files": "Cambiar el nombre de los archivos"
},
"remounting": {
"source": "Reintegrar fuente...",
"target": "Volver a montar el objetivo..."
"mounting": {
"source": "Integrar fuente",
"target": "Integrar objetivo"
}
},
"cronip": {
Expand Down
6 changes: 3 additions & 3 deletions scripts/lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,9 @@
"rename_files": {
"renaming_files": "Renommer des fichiers"
},
"remounting": {
"source": "Réintégrer la source...",
"target": "Remonter la cible..."
"mounting": {
"source": "Monter la source",
"target": "Monter la cible"
}
},
"cronip": {
Expand Down

0 comments on commit 1090586

Please sign in to comment.