From 60b70e7404637eef1b3f5c736c9ff4416eeda63b Mon Sep 17 00:00:00 2001 From: flare561 Date: Sun, 21 May 2017 00:29:21 -0500 Subject: [PATCH] Added support for empty publishers or catalog numbers --- Rippy/AlbumData.cs | 4 +++- Rippy/HelperMethods.cs | 8 ++++++++ readme.md | 6 +----- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Rippy/AlbumData.cs b/Rippy/AlbumData.cs index 1857352..f2b0af4 100644 --- a/Rippy/AlbumData.cs +++ b/Rippy/AlbumData.cs @@ -106,7 +106,9 @@ public string FLAC private string FormatFolderName(string format) { - var pubNum = !string.IsNullOrWhiteSpace(Publisher) || !string.IsNullOrWhiteSpace(Number) ? $"[{Publisher} {Number}] " : ""; + + var space = !string.IsNullOrWhiteSpace(Publisher) && !string.IsNullOrWhiteSpace(Number) ? " " : ""; + var pubNum = !string.IsNullOrWhiteSpace(Publisher) || !string.IsNullOrWhiteSpace(Number) ? $"[{Publisher}{space}{Number}] " : ""; var medium = !string.IsNullOrWhiteSpace(Medium) ? $"{Medium} " : ""; return $"{Artist} - {Album} ({Year}) {pubNum}[{medium}{format}]"; } diff --git a/Rippy/HelperMethods.cs b/Rippy/HelperMethods.cs index bb5d664..0471f2c 100644 --- a/Rippy/HelperMethods.cs +++ b/Rippy/HelperMethods.cs @@ -10,6 +10,13 @@ namespace Rippy { public static class HelperMethods { + + /// + /// Runs a process and returns a task that completes when the process exits + /// + /// Path of the executable to run + /// Arguments to pass to the executable + /// A task that completes at process exit public static Task RunProcessAsync(string fileName, string arguments) { // there is no non-generic TaskCompletionSource @@ -31,6 +38,7 @@ public static Task RunProcessAsync(string fileName, string arguments) return tcs.Task; } + /// /// Get custom value from the info dict of the torrent /// diff --git a/readme.md b/readme.md index d3263c2..be265bb 100644 --- a/readme.md +++ b/readme.md @@ -8,11 +8,7 @@ Download the latest version from [the releases page](https://github.com/flare561 Usage ----- -This program uses MP3 Tag and dBpoweramp, the locations for these are currently defined in settings.json - -If settings.json does not exist for you, run the program once, then close it and ensure the settings are correct. - -In the future, the settings will be managed in the GUI, so check back for updates. +This program uses MP3 Tag and dBpoweramp, the locations for these are defined in the settings UI Select a folder containing your flac files using the browse at the top right. Ensure the metadata is correct using the Set Metadata button which will open MP3 Tag in the flac folder.