taffy 1.3.0 → 1.3.1

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.
Files changed (4) hide show
  1. checksums.yaml +5 -5
  2. data/bin/taffy +15 -3
  3. data/taffy.gemspec +2 -2
  4. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 58282fce937d3bff94a00d40c3d8798b0211415f
4
- data.tar.gz: 585d5092e405198779f2ae3876ee93ce6a0e1d54
2
+ SHA256:
3
+ metadata.gz: 850e518644abad8bc71cf624789c0d7056f19afa48fba9e91a84706d98d16dfc
4
+ data.tar.gz: 70c10669fbccc6be56d95d5112084c74db2461eb8e660f82e5e51d929d0bfb63
5
5
  SHA512:
6
- metadata.gz: f14622caae83525e8e890932dd1ce446b4530cf03a1d6ae8b4aede000a8368508ef6dcde6e4abbf433fbc5e58c757c25948b7361b0e175f3da6858b9988b7c72
7
- data.tar.gz: 135bb7b972ad6f1516d2ecc2a41be27dba2aaaefd9504b532d0e09fc377aa546b91c61dc6ad8ea708898ce56c793e0453eac72887f986e1b495ff18bd33d3002
6
+ metadata.gz: d74150a00506c0d32b823ff59767c614627d50d63bcae08a33d0bad0cf4a2c91a6b1f49062e19c55f8639c5e257ac6a036262fbd96daa31c73a66f77a94bed2c
7
+ data.tar.gz: f9519806bc08b20bcfe7d53263b2415fc2677b497c3783222252278b09ddb4918cf002fdac87115e52e98064cc312d5a06911724d4818dab9f7a8eae0ebfef0b
data/bin/taffy CHANGED
@@ -5,7 +5,7 @@ require 'shellwords'
5
5
 
6
6
  require 'taglib'
7
7
 
8
- VERSION = [1, 3, 0]
8
+ VERSION = [1, 3, 1]
9
9
 
10
10
  FIELDS = [
11
11
  ['l', 'album', String],
@@ -146,6 +146,18 @@ def rename(tag, spec)
146
146
  spec
147
147
  end
148
148
 
149
+ def safe_save(filename, fileref)
150
+ lowername = filename.downcase
151
+
152
+ if lowername.end_with?('.ogg') or lowername.end_with?('.oga')
153
+ warn("Not saving Ogg Vorbis file: #{filename} - see " +
154
+ "https://github.com/robinst/taglib-ruby/issues/82")
155
+ return false
156
+ else
157
+ return fileref.save
158
+ end
159
+ end
160
+
149
161
  ARGV.each do |filename|
150
162
  TagLib::FileRef.open(filename) do |fileref|
151
163
  if fileref.null?
@@ -156,14 +168,14 @@ ARGV.each do |filename|
156
168
 
157
169
  if extract_spec
158
170
  extract(fileref.tag, extract_spec, filename)
159
- fileref.save
171
+ $status = 2 if not safe_save(filename, fileref)
160
172
  end
161
173
 
162
174
  if actions.empty? and !(extract_spec or rename_spec)
163
175
  print_info(filename, fileref.tag)
164
176
  elsif !actions.empty?
165
177
  actions.each { |action| action.call(fileref.tag) }
166
- fileref.save
178
+ $status = 2 if not safe_save(filename, fileref)
167
179
  end
168
180
 
169
181
  if rename_spec
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'taffy'
3
- s.version = '1.3.0'
4
- s.date = '2017-07-07'
3
+ s.version = '1.3.1'
4
+ s.date = '2018-03-24'
5
5
  s.summary = 'A command-line audio tagging tool'
6
6
  s.description = "A command-line tool for reading and writing audio \
7
7
  metadata.".squeeze(' ')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: taffy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mulcahy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-07 00:00:00.000000000 Z
11
+ date: 2018-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: taglib-ruby
@@ -61,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
61
61
  version: '0'
62
62
  requirements: []
63
63
  rubyforge_project:
64
- rubygems_version: 2.6.11
64
+ rubygems_version: 2.7.6
65
65
  signing_key:
66
66
  specification_version: 4
67
67
  summary: A command-line audio tagging tool