flacky 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module Flacky
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flacky
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: