flacky 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/flacky/cli.rb +4 -4
- data/lib/flacky/version.rb +1 -1
- metadata +1 -1
data/lib/flacky/cli.rb
CHANGED
@@ -18,7 +18,7 @@ module Flacky
|
|
18
18
|
desc "generate_json <root_path>", "Generate and populate metadata as JSON"
|
19
19
|
def generate_json(root_dir = ENV['PWD'])
|
20
20
|
start_dir = File.join(File.expand_path(root_dir), '**/*.flac')
|
21
|
-
Dir.glob(start_dir).map { |f| File.dirname(f) }.uniq.each do |dir|
|
21
|
+
Dir.glob(start_dir).sort.map { |f| File.dirname(f) }.uniq.each do |dir|
|
22
22
|
mdf = File.join(dir, "metadata.json")
|
23
23
|
say("Processing <#{dir}>", :cyan)
|
24
24
|
data = Flacky::MetadataGenerator.new(mdf).combined_data
|
@@ -37,7 +37,7 @@ module Flacky
|
|
37
37
|
start_dir = File.join(File.expand_path(root_dir), '**/metadata.json')
|
38
38
|
files = []
|
39
39
|
|
40
|
-
Dir.glob(start_dir).each do |mdf|
|
40
|
+
Dir.glob(start_dir).sort.each do |mdf|
|
41
41
|
attr = JSON.parse(IO.read(mdf))["allmusic_url"]
|
42
42
|
files << mdf if attr.nil? || attr.empty?
|
43
43
|
end
|
@@ -71,7 +71,7 @@ module Flacky
|
|
71
71
|
private
|
72
72
|
|
73
73
|
def convert_files(glob, mp3izer)
|
74
|
-
Dir.glob(glob).each do |file|
|
74
|
+
Dir.glob(glob).sort.each do |file|
|
75
75
|
next unless file =~ /\.flac$/
|
76
76
|
|
77
77
|
say("Processing #{file}...", :cyan)
|
@@ -82,7 +82,7 @@ module Flacky
|
|
82
82
|
end
|
83
83
|
|
84
84
|
def import_metadata_for_files(glob)
|
85
|
-
Dir.glob(glob).each do |file|
|
85
|
+
Dir.glob(glob).sort.each do |file|
|
86
86
|
next unless file =~ /\.flac$/
|
87
87
|
|
88
88
|
say("Processing #{file}...", :cyan)
|
data/lib/flacky/version.rb
CHANGED