lib/ehbrs/tools/runner/music/lyrics.rb in ehbrs-tools-0.27.0 vs lib/ehbrs/tools/runner/music/lyrics.rb in ehbrs-tools-0.28.0
- old
+ new
@@ -1,8 +1,7 @@
# frozen_string_literal: true
-require 'eac_ruby_utils/fs_cache'
require 'ehbrs/tools/core_ext'
require 'ehbrs_ruby_utils/videos/container'
require 'ultimate_lyrics/provider'
module Ehbrs
@@ -11,11 +10,11 @@
class Music
class Lyrics
DEFAULT_PROVIDER = 'lyrics.com'
runner_with :help, :output do
- arg_opt '-p', '--provider', "Nome do provedor [Nome do #{DEFAULT_PROVIDER}]"
+ arg_opt '-p', '--provider', 'Nome do provedor.', default: DEFAULT_PROVIDER
pos_arg :file
end
def run
start_banner
@@ -31,11 +30,11 @@
end
end
def start_banner
infov 'File', file
- %w[artist album track title].each do |attr|
+ %w[artist album track title year].each do |attr|
infov attr.humanize, container.tag_file.tag.send(attr)
end
infov 'Selected provider', provider
end
@@ -58,10 +57,10 @@
def provider_uncached
::UltimateLyrics::Provider.by_name(provider_name)
end
def provider_name
- parsed.provider.if_present(DEFAULT_PROVIDER)
+ parsed.provider
end
end
end
end
end