X-Git-Url: http://njoseph.me/gitweb/nimcoon.git/blobdiff_plain/fabf02942a6fbc3004f6fe5894a489cbbe84fe42..9ed70b9e0ee8ebf8e0b1fc1bbe1b77178d1f008c:/src/nimcoon.nim diff --git a/src/nimcoon.nim b/src/nimcoon.nim index 4f75d82..3ad8fdc 100644 --- a/src/nimcoon.nim +++ b/src/nimcoon.nim @@ -1,6 +1,5 @@ import parseopt, - strformat, strutils, tables @@ -12,9 +11,16 @@ import proc parseArguments(): CommandLineOptions = + var searchQuery = "" - options = to_table({"musicOnly": false, "feelingLucky": false, "fullScreen": false, "download": false, "non-interactive": false}) + options = to_table({ + "musicOnly": false, + "feelingLucky": false, + "fullScreen": false, + "download": false, + "non-interactive": false + }) for kind, key, value in getopt(): case kind @@ -36,15 +42,6 @@ proc parseArguments(): CommandLineOptions = (searchQuery, options) -proc isValidOptions*(options: Options): bool = - # Check for invalid combinations of options - var invalidCombinations = [("musicOnly", "fullScreen"), ("download", "fullScreen")] - result = true - for combination in invalidCombinations: - if options[combination[0]] and options[combination[1]]: - stderr.writeLine fmt"Incompatible options provided: {combination[0]} and {combination[1]}" - result = false - proc main() = let player = selectMediaPlayer()