diff --git a/cli/src/main/groovy/com/jdbernard/wdiwtlt/cli/CommandLineInterface.groovy b/cli/src/main/groovy/com/jdbernard/wdiwtlt/cli/CommandLineInterface.groovy index 55d8e5f..78392c5 100644 --- a/cli/src/main/groovy/com/jdbernard/wdiwtlt/cli/CommandLineInterface.groovy +++ b/cli/src/main/groovy/com/jdbernard/wdiwtlt/cli/CommandLineInterface.groovy @@ -454,11 +454,7 @@ Configuration: modelClass = modelClasses[Matcher.lastMatcher[0][1]] return library.getWhere(modelClass, [playlistId: playQueue.id]) case ~/untagged files/: return library.untaggedFiles - default: - logger.debug("Invalid select options: $options") - err "Invalid options to the ${cmdStyle}select${normalStyle}" + - " command. Use ${cmdStyle}help select${normalStyle} to " + - "see a list of valid options." } } + default: invalidOptionsErr('select') } } private Playlist processPlay(String options, List selection) { @@ -1040,7 +1036,6 @@ Play and Controlling Media: Playlist and Queue Management: - scan enqueue selection enqueue @@ -1063,6 +1058,9 @@ Playlist and Queue Management: clear selection clear playlist +Library Management: + + scan """ default: @@ -1071,6 +1069,11 @@ Playlist and Queue Management: Thread.sleep(250) break } } + private String invalidOptionsErr(String commandName) { + err "Invalid options to the ${cmdStyle}${commandName}${normalStyle}" + + " command. Use ${cmdStyle}help ${commandName}${normalStyle} to " + + "see a list of valid options." } + private void playing(def player) { try { def mediaFiles = library.getMediaFilesWhere(playlistId: playQueue.id)