removed a hardcoded path

This commit is contained in:
Cooper Hammond 2020-03-28 15:00:29 -07:00
parent 4e0ba7ec79
commit 5c611c9af5

View file

@ -1,3 +1,5 @@
require "../bottle/config"
# Uses FFMPEG binary to add metadata to mp3 files # Uses FFMPEG binary to add metadata to mp3 files
# ``` # ```
# t = Tags.new("bohem rap.mp3") # t = Tags.new("bohem rap.mp3")
@ -8,7 +10,7 @@
class Tags class Tags
# TODO: export this path to a config file # TODO: export this path to a config file
@BIN_LOC = Path["~/.irs/bin".sub("~", Path.home)] @BIN_LOC = Config.binary_location
@query_args = [] of String @query_args = [] of String
# initialize the class with an already created MP3 # initialize the class with an already created MP3
@ -46,7 +48,7 @@ class Tags
# Run the necessary commands to attach album art to the mp3 # Run the necessary commands to attach album art to the mp3
def save : Nil def save : Nil
@query_args.push(%("_#{@filename}")) @query_args.push(%("_#{@filename}"))
command = @BIN_LOC.to_s + "/ffmpeg " + @query_args.join(" ") command = @BIN_LOC + "/ffmpeg " + @query_args.join(" ")
l = Logger.new(command, ".tagger.log") l = Logger.new(command, ".tagger.log")
l.start { |line, start| } l.start { |line, start| }