ehbrs-tools 0.16.4 → 0.20.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ehbrs/cooking_book.rb +9 -0
- data/lib/ehbrs/cooking_book/build.rb +45 -0
- data/lib/ehbrs/cooking_book/build/base_page.rb +43 -0
- data/lib/ehbrs/cooking_book/build/index_page.rb +26 -0
- data/lib/ehbrs/cooking_book/build/recipe_page.rb +27 -0
- data/lib/ehbrs/cooking_book/project.rb +31 -0
- data/lib/ehbrs/cooking_book/recipe.rb +37 -0
- data/lib/ehbrs/cooking_book/recipe/ingredient.rb +21 -0
- data/lib/ehbrs/cooking_book/recipe/measure.rb +60 -0
- data/lib/ehbrs/cooking_book/recipe/part.rb +32 -0
- data/lib/ehbrs/music.rb +9 -0
- data/lib/ehbrs/music/album.rb +42 -0
- data/lib/ehbrs/observers/base.rb +1 -1
- data/lib/ehbrs/observers/with_persistence.rb +1 -1
- data/lib/ehbrs/patches/module/erb_template.rb +11 -0
- data/lib/ehbrs/patches/object/erb_template.rb +9 -0
- data/lib/ehbrs/patches/object/template.rb +7 -0
- data/lib/ehbrs/runner.rb +6 -13
- data/lib/ehbrs/runner/cooking_book.rb +30 -0
- data/lib/ehbrs/runner/cooking_book/build.rb +32 -0
- data/lib/ehbrs/runner/music.rb +16 -0
- data/lib/ehbrs/runner/music/selected.rb +63 -0
- data/lib/ehbrs/runner/telegram.rb +26 -0
- data/lib/ehbrs/runner/telegram/send_message.rb +29 -0
- data/lib/ehbrs/runner/videos/unsupported.rb +1 -1
- data/lib/ehbrs/runner/web_utils/videos/upload.rb +1 -1
- data/lib/ehbrs/telegram.rb +9 -0
- data/lib/ehbrs/telegram/message_sending.rb +32 -0
- data/lib/ehbrs/tools/application.rb +13 -0
- data/lib/ehbrs/tools/instance.rb +16 -0
- data/lib/ehbrs/tools/version.rb +1 -1
- data/lib/ehbrs/videos/track.rb +1 -19
- data/lib/ehbrs/videos/unsupported/check_support.rb +1 -1
- data/lib/ehbrs/videos/unsupported/checks/codec_extra_unlisted.rb +1 -1
- data/lib/ehbrs/videos/unsupported/checks/codec_extra_unsupported.rb +1 -1
- data/lib/ehbrs/videos/unsupported/checks/codec_unlisted.rb +2 -2
- data/lib/ehbrs/videos/unsupported/checks/codec_unsupported.rb +1 -1
- data/lib/ehbrs/videos/unsupported/fix_profile.rb +0 -13
- data/lib/ehbrs/videos/unsupported/fixes/supported_codec.rb +10 -10
- data/lib/ehbrs/videos/unsupported/profiles/aoc.rb +27 -0
- data/template/ehbrs/cooking_book/build/base_page/layout.html.erb +20 -0
- data/template/ehbrs/cooking_book/build/index_page/inner.html.erb +6 -0
- data/template/ehbrs/cooking_book/build/recipe_page/inner.html.erb +6 -0
- data/template/ehbrs/cooking_book/build/recipe_page/part.html.erb +27 -0
- data/vendor/eac_cli/lib/eac_cli/core_ext.rb +2 -0
- data/vendor/eac_cli/lib/eac_cli/definition/alternative.rb +4 -7
- data/vendor/eac_cli/lib/eac_cli/definition/argument_option.rb +8 -0
- data/vendor/eac_cli/lib/eac_cli/definition/base_option.rb +21 -9
- data/vendor/eac_cli/lib/eac_cli/definition/base_option/initialize_args_parser.rb +47 -0
- data/vendor/eac_cli/lib/eac_cli/definition/boolean_option.rb +8 -0
- data/vendor/eac_cli/lib/eac_cli/definition/positional_argument.rb +12 -0
- data/vendor/eac_cli/lib/eac_cli/docopt/doc_builder.rb +15 -1
- data/vendor/eac_cli/lib/eac_cli/docopt/runner_context_replacement.rb +15 -0
- data/vendor/eac_cli/lib/eac_cli/docopt/runner_extension.rb +5 -0
- data/vendor/eac_cli/lib/eac_cli/parser/alternative.rb +4 -4
- data/vendor/eac_cli/lib/eac_cli/parser/alternative/long_options.rb +37 -0
- data/vendor/eac_cli/lib/eac_cli/parser/alternative/option_argument.rb +29 -0
- data/vendor/eac_cli/lib/eac_cli/parser/alternative/options.rb +7 -36
- data/vendor/eac_cli/lib/eac_cli/parser/alternative/short_options.rb +45 -0
- data/vendor/eac_cli/lib/eac_cli/parser/collector.rb +3 -17
- data/vendor/eac_cli/lib/eac_cli/patches/object/runner_with.rb +2 -1
- data/vendor/eac_cli/lib/eac_cli/runner.rb +0 -48
- data/vendor/eac_cli/lib/eac_cli/runner/after_class_methods.rb +29 -0
- data/vendor/eac_cli/lib/eac_cli/runner/instance_methods.rb +31 -0
- data/vendor/eac_cli/lib/eac_cli/runner_with/subcommands.rb +15 -3
- data/vendor/eac_cli/lib/eac_cli/runner_with_set.rb +50 -0
- data/vendor/eac_cli/lib/eac_cli/version.rb +1 -1
- data/vendor/eac_cli/spec/lib/eac_cli/definition/alternative_spec.rb +4 -0
- data/vendor/eac_cli/spec/lib/eac_cli/runner_spec.rb +43 -4
- data/vendor/eac_ruby_base0/Gemfile +5 -0
- data/vendor/eac_ruby_base0/eac_ruby_base0.gemspec +20 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0.rb +7 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/application.rb +69 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb +31 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/patches.rb +4 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/patches/class.rb +4 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/patches/class/jobs_runner.rb +10 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/patches/object.rb +5 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/patches/object/runner_with.rb +5 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner.rb +54 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner/test_all.rb +22 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner_with.rb +9 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner_with/confirmable.rb +21 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/runner_with/filesystem_traverser.rb +52 -0
- data/vendor/eac_ruby_base0/lib/eac_ruby_base0/version.rb +5 -0
- data/vendor/eac_ruby_base0/spec/rubocop_spec.rb +7 -0
- data/vendor/eac_ruby_base0/spec/spec_helper.rb +100 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/common_concern/module_setup.rb +16 -6
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/common_constructor.rb +2 -99
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/common_constructor/class_initialize.rb +29 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/common_constructor/instance_initialize.rb +53 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/common_constructor/super_args.rb +54 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/console/docopt_runner/_subcommands.rb +10 -1
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/fs/traverser.rb +0 -2
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/inflector.rb +4 -1
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/local_time_zone.rb +48 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/class/settings_provider.rb +10 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/kernel.rb +4 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/kernel/nyi.rb +8 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/module/template.rb +10 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/if_nil.rb +17 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/object/template.rb +1 -8
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/pathname/basename_sub.rb +2 -2
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/time/required_zone.rb +11 -0
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/yaml.rb +8 -0
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/common_concern_spec.rb +14 -4
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/common_constructor_spec.rb +30 -0
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/inflector_spec.rb +2 -1
- data/vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/local_time_zone_spec.rb +17 -0
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/version.rb +1 -1
- data/vendor/ehbrs_ruby_utils/lib/ehbrs_ruby_utils/videos/stream.rb +1 -1
- metadata +87 -8
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/time/default_time_zone_set.rb +0 -5
- data/vendor/eac_ruby_utils/lib/eac_ruby_utils/patches/time/local_time_zone.rb +0 -25
data/lib/ehbrs/runner.rb
CHANGED
@@ -1,26 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require '
|
4
|
-
require 'ehbrs/tools/
|
3
|
+
require 'eac_ruby_base0/runner'
|
4
|
+
require 'ehbrs/tools/application'
|
5
5
|
|
6
6
|
module Ehbrs
|
7
7
|
class Runner
|
8
8
|
require_sub __FILE__
|
9
|
+
include ::EacRubyBase0::Runner
|
9
10
|
|
10
|
-
|
11
|
+
runner_definition do
|
11
12
|
desc 'Tools for EHB/RS.'
|
12
|
-
subcommands
|
13
|
-
alt do
|
14
|
-
bool_opt '-V', '--version', 'Show version.'
|
15
|
-
end
|
16
13
|
end
|
17
14
|
|
18
|
-
def
|
19
|
-
|
20
|
-
out(::Ehbrs::Tools::VERSION + "\n")
|
21
|
-
else
|
22
|
-
run_with_subcommand
|
23
|
-
end
|
15
|
+
def application
|
16
|
+
::Ehbrs::Tools.application
|
24
17
|
end
|
25
18
|
end
|
26
19
|
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_cli/core_ext'
|
4
|
+
require 'ehbrs/cooking_book/project'
|
5
|
+
|
6
|
+
module Ehbrs
|
7
|
+
class Runner
|
8
|
+
class CookingBook
|
9
|
+
require_sub __FILE__
|
10
|
+
|
11
|
+
DEFAULT_SOURCE_DIR = '.'
|
12
|
+
|
13
|
+
runner_with :help, :subcommands do
|
14
|
+
desc 'Operações para livros de receitas.'
|
15
|
+
arg_opt '-C', '--source-dir', 'Caminho para o diretório do código-fonte.'
|
16
|
+
subcommands
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
def source_dir_uncached
|
22
|
+
(parsed.source_dir || DEFAULT_SOURCE_DIR).to_pathname.expand_path
|
23
|
+
end
|
24
|
+
|
25
|
+
def project_uncached
|
26
|
+
::Ehbrs::CookingBook::Project.new(source_dir)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_cli/core_ext'
|
4
|
+
require 'ehbrs/cooking_book/build'
|
5
|
+
|
6
|
+
module Ehbrs
|
7
|
+
class Runner
|
8
|
+
class CookingBook
|
9
|
+
class Build
|
10
|
+
runner_with :help, :subcommands do
|
11
|
+
desc 'Operações para livros de receitas.'
|
12
|
+
arg_opt '-d', '--target-dir', 'Caminho para o diretório destino da construção.'
|
13
|
+
end
|
14
|
+
|
15
|
+
def run
|
16
|
+
infov 'Project', build.project
|
17
|
+
infov 'Target directory', build.target_dir
|
18
|
+
build.run
|
19
|
+
success 'Done'
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
def build_uncached
|
25
|
+
::Ehbrs::CookingBook::Build.new(
|
26
|
+
runner_context.call(:project), target_dir: parsed.target_dir
|
27
|
+
)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_base0/patches'
|
4
|
+
require 'eac_ruby_utils/fs/clearable_directory'
|
5
|
+
require 'ehbrs/music/album'
|
6
|
+
|
7
|
+
module Ehbrs
|
8
|
+
class Runner
|
9
|
+
class Music
|
10
|
+
class Selected
|
11
|
+
DEFAULT_TRAVERSER_RECURSIVE = true
|
12
|
+
|
13
|
+
enable_jobs_runner
|
14
|
+
runner_with :help, :filesystem_traverser do
|
15
|
+
desc 'Seleciona álbuns de música.'
|
16
|
+
arg_opt '-b', '--build-dir', 'Constrói diretório de músicas selecionadas.'
|
17
|
+
end
|
18
|
+
|
19
|
+
def run
|
20
|
+
infov 'Recursive', traverser_recursive
|
21
|
+
run_jobs :show, :build
|
22
|
+
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def build
|
27
|
+
infom 'Building...'
|
28
|
+
build_dir.clear
|
29
|
+
selected_albums.each do |album|
|
30
|
+
::EacRubyUtils::Envs.local.command('ln', '-s', album.path,
|
31
|
+
build_dir.join(album.id)).system!
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def build_dir_uncached
|
36
|
+
parsed.build_dir.if_present { |v| ::EacRubyUtils::Fs::ClearableDirectory.new(v) }
|
37
|
+
end
|
38
|
+
|
39
|
+
def run_build?
|
40
|
+
build_dir.present?
|
41
|
+
end
|
42
|
+
|
43
|
+
def selected_albums_uncached
|
44
|
+
infom 'Searching selected albums...'
|
45
|
+
@selected = []
|
46
|
+
run_filesystem_traverser
|
47
|
+
@selected.sort
|
48
|
+
end
|
49
|
+
|
50
|
+
def show
|
51
|
+
infov 'Albums found', selected_albums.count
|
52
|
+
selected_albums.each do |album|
|
53
|
+
puts album.to_label
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def traverser_check_directory(path)
|
58
|
+
@selected << ::Ehbrs::Music::Album.new(path) if path.join('.selected').exist?
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_cli/core_ext'
|
4
|
+
require 'ehbrs/tools/instance'
|
5
|
+
|
6
|
+
module Ehbrs
|
7
|
+
class Runner
|
8
|
+
class Telegram
|
9
|
+
require_sub __FILE__
|
10
|
+
|
11
|
+
runner_with :help, :subcommands do
|
12
|
+
desc 'Operações com Telegram.'
|
13
|
+
arg_opt '-b', '--bot-token', 'Token do bot Telegram.'
|
14
|
+
subcommands
|
15
|
+
end
|
16
|
+
|
17
|
+
def bot_token
|
18
|
+
parsed.bot_token || default_bot_token
|
19
|
+
end
|
20
|
+
|
21
|
+
def default_bot_token
|
22
|
+
::Ehbrs::Tools.instance.read_entry(:telegram_bot_token)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_cli/core_ext'
|
4
|
+
require 'ehbrs/telegram/message_sending'
|
5
|
+
|
6
|
+
module Ehbrs
|
7
|
+
class Runner
|
8
|
+
class Telegram
|
9
|
+
class SendMessage
|
10
|
+
runner_with :help do
|
11
|
+
desc 'Envia mensagens Telegram.'
|
12
|
+
pos_arg :message
|
13
|
+
pos_arg :recipients_ids, repeat: true
|
14
|
+
end
|
15
|
+
|
16
|
+
delegate :run, to: :message_sending
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def message_sending_uncached
|
21
|
+
parsed.recipients_ids
|
22
|
+
.inject(::Ehbrs::Telegram::MessageSending.new) { |a, e| a.recipient_id(e) }
|
23
|
+
.bot_token(runner_context.call(:bot_token))
|
24
|
+
.message(parsed.message)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -42,7 +42,7 @@ module Ehbrs
|
|
42
42
|
def process_response(response)
|
43
43
|
infov 'Response status', response.status
|
44
44
|
if response.status == 200
|
45
|
-
pp ::JSON.parse(response.body)
|
45
|
+
pp ::JSON.parse(response.body)
|
46
46
|
else
|
47
47
|
error_file = '/tmp/ehbrsutils.html'
|
48
48
|
::File.write(error_file, response.body)
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
require 'eac_ruby_utils/immutable'
|
5
|
+
require 'telegram/bot'
|
6
|
+
|
7
|
+
module Ehbrs
|
8
|
+
module Telegram
|
9
|
+
class MessageSending
|
10
|
+
include ::EacRubyUtils::Immutable
|
11
|
+
immutable_accessor :bot_token, :message
|
12
|
+
immutable_accessor :recipient_id, type: :array
|
13
|
+
|
14
|
+
def run
|
15
|
+
::Telegram::Bot::Client.run(prop(:bot_token)) do |bot|
|
16
|
+
prop(:recipient_ids).each do |recipient_id|
|
17
|
+
bot.api.sendMessage(chat_id: recipient_id, text: prop(:message))
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
def prop(attribute)
|
25
|
+
r = send(attribute)
|
26
|
+
return r if r.present?
|
27
|
+
|
28
|
+
raise "Attribute #{attribute} is blank"
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_base0/application'
|
4
|
+
|
5
|
+
module Ehbrs
|
6
|
+
module Tools
|
7
|
+
class << self
|
8
|
+
def application
|
9
|
+
@application ||= ::EacRubyBase0::Application.new(::File.expand_path('../../..', __dir__))
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/instances/base'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Ehbrs
|
7
|
+
module Tools
|
8
|
+
INSTANCE_ID = 'ehbrs-tools_0'
|
9
|
+
|
10
|
+
class << self
|
11
|
+
def instance
|
12
|
+
@instance ||= ::Avm::Instances::Base.by_id(INSTANCE_ID)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/ehbrs/tools/version.rb
CHANGED
data/lib/ehbrs/videos/track.rb
CHANGED
@@ -6,30 +6,12 @@ require 'ehbrs_ruby_utils/videos/stream'
|
|
6
6
|
module Ehbrs
|
7
7
|
module Videos
|
8
8
|
class Track < ::SimpleDelegator
|
9
|
-
TYPE_MAPPING = {
|
10
|
-
audio: 'Audio',
|
11
|
-
video: 'Video',
|
12
|
-
subtitle: 'Subtitle'
|
13
|
-
}.freeze
|
14
|
-
|
15
|
-
def codec
|
16
|
-
codec_name
|
17
|
-
end
|
18
|
-
|
19
|
-
def type
|
20
|
-
TYPE_MAPPING.fetch(codec_type)
|
21
|
-
end
|
22
|
-
|
23
|
-
def number
|
24
|
-
index
|
25
|
-
end
|
26
|
-
|
27
9
|
def extra
|
28
10
|
ffprobe_data.fetch(:codec_tag_string).to_s
|
29
11
|
end
|
30
12
|
|
31
13
|
def to_s
|
32
|
-
"[#{
|
14
|
+
"[#{codec_type}(#{index}): #{codec_name}/#{language || '-'}" +
|
33
15
|
extra.if_present('') { |v| " | #{v}" } + ']'
|
34
16
|
end
|
35
17
|
end
|
@@ -10,7 +10,7 @@ module Ehbrs
|
|
10
10
|
common_constructor :codec, :listed_extras
|
11
11
|
|
12
12
|
def check(track)
|
13
|
-
return nil unless track.
|
13
|
+
return nil unless track.codec_name == codec
|
14
14
|
return nil if listed_extras.any? do |extra|
|
15
15
|
track.extra.downcase.include?(extra.downcase)
|
16
16
|
end
|
@@ -12,7 +12,7 @@ module Ehbrs
|
|
12
12
|
common_constructor :codec, :extra
|
13
13
|
|
14
14
|
def check(track)
|
15
|
-
return nil unless track.
|
15
|
+
return nil unless track.codec_name == codec
|
16
16
|
return nil unless track.extra.downcase.include?(extra.downcase)
|
17
17
|
|
18
18
|
"Unsupported extra \"#{extra}\" for codec \"#{codec}\" and track #{track}"
|
@@ -10,9 +10,9 @@ module Ehbrs
|
|
10
10
|
common_constructor :listed_codecs
|
11
11
|
|
12
12
|
def check(track)
|
13
|
-
return nil if listed_codecs.include?(track.
|
13
|
+
return nil if listed_codecs.include?(track.codec_name)
|
14
14
|
|
15
|
-
"Not listed codec \"#{track.
|
15
|
+
"Not listed codec \"#{track.codec_name}\" (Track: #{track}, listed: #{listed_codecs})"
|
16
16
|
end
|
17
17
|
|
18
18
|
def fix
|