Skip to content

Commit 4b24197

Browse files
committed
Add support for unlimited saved devices using a list view, allow exporting and importing saved devices
1 parent 021fd9f commit 4b24197

File tree

7 files changed

+320
-286
lines changed

7 files changed

+320
-286
lines changed

src/main/java/airsquared/blobsaver/app/Background.java

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,22 @@ private static void macosBackgroundFile() {
4545
long interval = Prefs.getBackgroundTimeUnit().toSeconds(Prefs.getBackgroundInterval());
4646
//language=XML
4747
String plist = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
48-
"<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">" +
49-
"<plist>" +
50-
"<dict>" +
51-
"<key>Label</key>" +
52-
"<string>" + backgroundLabel + "</string>" +
53-
"<key>ProgramArguments</key>" +
54-
"<array>" +
55-
" <string>" + executablePath + "</string>" +
56-
" <string>--background-autosave</string>" +
57-
"</array>" +
58-
"<key>RunAtLoad</key>" +
59-
"<true/>" +
60-
"<key>StartInterval</key>" +
61-
"<integer>" + interval + "</integer>" +
62-
"</dict>" +
63-
"</plist>";
48+
"<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">" +
49+
"<plist>" +
50+
"<dict>" +
51+
"<key>Label</key>" +
52+
"<string>" + backgroundLabel + "</string>" +
53+
"<key>ProgramArguments</key>" +
54+
"<array>" +
55+
" <string>" + executablePath + "</string>" +
56+
" <string>--background-autosave</string>" +
57+
"</array>" +
58+
"<key>RunAtLoad</key>" +
59+
"<true/>" +
60+
"<key>StartInterval</key>" +
61+
"<integer>" + interval + "</integer>" +
62+
"</dict>" +
63+
"</plist>";
6464
try {
6565
Files.writeString(plistFilePath, plist);
6666
} catch (IOException e) {
@@ -137,7 +137,7 @@ public static boolean isBackgroundEnabled() {
137137
} else {
138138
try {
139139
return new ProcessBuilder("systemctl", "is-enabled", "--user", "--quiet", "blobsaver.timer")
140-
.start().waitFor() == 0;
140+
.start().waitFor() == 0;
141141
} catch (IOException e) {
142142
throw new UncheckedIOException(e);
143143
} catch (InterruptedException e) {
@@ -194,7 +194,7 @@ public static void saveAllBackgroundBlobs() {
194194
}
195195

196196
private static void saveBlobs(Prefs.SavedDevice savedDevice) {
197-
System.out.println("attempting to save for device " + savedDevice.number);
197+
System.out.println("attempting to save for device " + savedDevice);
198198

199199
TSS.Builder builder = new TSS.Builder().setDevice(savedDevice.getIdentifier())
200200
.setEcid(savedDevice.getEcid()).setSavePath(savedDevice.getSavePath());

0 commit comments

Comments
 (0)