Skip to content

Commit c7329ae

Browse files
committed
suppress linking files in UI
I might re-enable later but i suspect importing can go out the window entirely later. for now, this is easier than bookmark URL support and I don't want to ship something that's actually been super busted this whole time. see discussion in GH-201 and GH-197
1 parent e10fcab commit c7329ae

File tree

3 files changed

+18
-11
lines changed

3 files changed

+18
-11
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ Doing so isn't fatal (it's not a secret), but it is annoying for other contribut
3535
* Artists, albums, and tracks can be favourited ("starred" in Subsonic parlance; we use a heart to avoid being confused with ratings).
3636
* Favourited albums can be recalled in the server albums view.
3737
* Favourited status is synchronized to the server.
38+
* Linking artists has been deprecated for now, and hidden behind an manual option.
39+
* It requires a lot more work to work correctly with arbitrary directores together with App Sandbox.
40+
* To re-enable it (for now, knowing the issues), run `defaults write fr.read-write.Submariner canLinkImport -bool YES`.
41+
* See the discussion thread on https://github.com/SubmarinerApp/Submariner/discussions/201 for possible plans.
3842
* A directory view has been added, for users of servers that organize files by directory and prefer managing files that way.
3943
* A basic AppleScript dictionary has been added as a way to inspect and control playback programatically.
4044
* Albums can be dragged tracklist or playlist drop targets to add their containing tracks.

Submariner/SBAppDelegate.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ fileprivate let logger = Logger(subsystem: Bundle.main.bundleIdentifier!, catego
4646
"deleteAfterPlay": NSNumber(value: false),
4747
"SkipIncrement": NSNumber(value: 5.0),
4848
"albumSortOrder": "OldestFirst",
49+
"canLinkImport": NSNumber(value: false),
4950
]
5051
UserDefaults.standard.register(defaults: defaults)
5152

Submariner/SBDatabaseController.m

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,17 +1319,19 @@ - (void)displayViewControllerForResource:(SBResource *)resource {
13191319

13201320

13211321
- (BOOL)openImportAlert:(NSWindow *)sender files:(NSArray<NSURL*> *)files {
1322-
NSAlert *importAlert = [[NSAlert alloc] init];
1323-
[importAlert setMessageText:@"Do you want to copy the imported audio files?"];
1324-
[importAlert setInformativeText: @"The files will copied into the library directory, or have the new library items link to the original files."];
1325-
[importAlert addButtonWithTitle: @"Copy into Library"];
1326-
[importAlert addButtonWithTitle: @"Link Existing Files"];
1327-
[importAlert addButtonWithTitle: @"Cancel"];
1328-
[importAlert beginSheetModalForWindow: sender completionHandler:^(NSModalResponse alertReturnCode) {
1329-
[self importSheetDidEnd: sender returnCode: alertReturnCode contextInfo: files];
1330-
}];
1331-
1332-
//[files autorelease];
1322+
if ([[NSUserDefaults standardUserDefaults] boolForKey: @"canLinkImport"]) {
1323+
NSAlert *importAlert = [[NSAlert alloc] init];
1324+
[importAlert setMessageText:@"Do you want to copy the imported audio files?"];
1325+
[importAlert setInformativeText: @"The files will copied into the library directory, or have the new library items link to the original files."];
1326+
[importAlert addButtonWithTitle: @"Copy into Library"];
1327+
[importAlert addButtonWithTitle: @"Link Existing Files"];
1328+
[importAlert addButtonWithTitle: @"Cancel"];
1329+
[importAlert beginSheetModalForWindow: sender completionHandler:^(NSModalResponse alertReturnCode) {
1330+
[self importSheetDidEnd: sender returnCode: alertReturnCode contextInfo: files];
1331+
}];
1332+
} else {
1333+
[self importSheetDidEnd: sender returnCode: NSAlertFirstButtonReturn contextInfo: files];
1334+
}
13331335
return NO;
13341336
}
13351337

0 commit comments

Comments
 (0)