wahwah 1.3.0 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wahwah/asf_tag.rb +2 -1
- data/lib/wahwah/id3/frame.rb +4 -0
- data/lib/wahwah/id3/lyrics_frame_body.rb +8 -0
- data/lib/wahwah/mp3_tag.rb +2 -1
- data/lib/wahwah/mp4_tag.rb +14 -0
- data/lib/wahwah/ogg/vorbis_comment.rb +2 -1
- data/lib/wahwah/ogg_tag.rb +2 -1
- data/lib/wahwah/riff_tag.rb +9 -8
- data/lib/wahwah/tag.rb +1 -0
- data/lib/wahwah/version.rb +1 -1
- data/lib/wahwah.rb +1 -0
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02bf7083fb530d058140db0b5f5e18cf2710ba7a6ba7fed2d2978c2109764ab2
|
4
|
+
data.tar.gz: dc9a32191879dfda4ea08477579ec4c631be6f0829d25ad066623232cd926a15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59b2cd82d8d52b273bb2abfa4085a083716fb9cb701102c0103e6ccf2a08b3909253c8bda2ffe2d423bed43a056a8aab1bd7d3c172468c6f72fa7dafc4879b56
|
7
|
+
data.tar.gz: 578a61f74b3eea858ba31817d8d16e663b3e7680806886e2e44fc7b4c93b09b601a5559c07326f63cc0e43a6be2c1d362e6247297679e65578e301f0f7c591ee
|
data/lib/wahwah/asf_tag.rb
CHANGED
data/lib/wahwah/id3/frame.rb
CHANGED
@@ -18,6 +18,7 @@ module WahWah
|
|
18
18
|
TP2: :albumartist,
|
19
19
|
TCM: :composer,
|
20
20
|
PIC: :image,
|
21
|
+
ULT: :lyrics,
|
21
22
|
|
22
23
|
# ID3v2.3 and ID3v2.4 frame id
|
23
24
|
COMM: :comment,
|
@@ -31,6 +32,7 @@ module WahWah
|
|
31
32
|
TPE2: :albumartist,
|
32
33
|
TCOM: :composer,
|
33
34
|
APIC: :image,
|
35
|
+
USLT: :lyrics,
|
34
36
|
|
35
37
|
# ID3v2.4 use TDRC replace TYER
|
36
38
|
TDRC: :year
|
@@ -167,6 +169,8 @@ module WahWah
|
|
167
169
|
GenreFrameBody
|
168
170
|
when :image
|
169
171
|
ImageFrameBody
|
172
|
+
when :lyrics
|
173
|
+
LyricsFrameBody
|
170
174
|
else
|
171
175
|
TextFrameBody
|
172
176
|
end
|
data/lib/wahwah/mp3_tag.rb
CHANGED
data/lib/wahwah/mp4_tag.rb
CHANGED
@@ -10,6 +10,7 @@ module WahWah
|
|
10
10
|
"\xA9day".b => :year,
|
11
11
|
"\xA9gen".b => :genre,
|
12
12
|
"\xA9nam".b => :title,
|
13
|
+
"\xA9lyr".b => :lyrics,
|
13
14
|
"covr".b => :image,
|
14
15
|
"disk".b => :disc,
|
15
16
|
"trkn".b => :track,
|
@@ -125,9 +126,22 @@ module WahWah
|
|
125
126
|
|
126
127
|
mp4a_atom = atom.find("mp4a")
|
127
128
|
esds_atom = atom.find("esds")
|
129
|
+
alac_atom = atom.find("alac")
|
128
130
|
|
129
131
|
@sample_rate = mp4a_atom.data.unpack1("x22I>") if mp4a_atom.valid?
|
130
132
|
@bitrate = esds_atom.data.unpack1("x26I>") / 1000 if esds_atom.valid?
|
133
|
+
|
134
|
+
# see https://github.com/macosforge/alac/blob/master/ALACMagicCookieDescription.txt for more info.
|
135
|
+
if alac_atom.valid?
|
136
|
+
atom_data = StringIO.new(alac_atom.data)
|
137
|
+
|
138
|
+
atom_data.seek(45, IO::SEEK_CUR)
|
139
|
+
@bit_depth = atom_data.read(1).unpack1("C")
|
140
|
+
|
141
|
+
atom_data.seek(10, IO::SEEK_CUR)
|
142
|
+
@bitrate = (atom_data.read(4).unpack1("I>") / 1000.to_f).round
|
143
|
+
@sample_rate = atom_data.read(4).unpack1("I>")
|
144
|
+
end
|
131
145
|
end
|
132
146
|
|
133
147
|
def parse_image_data(image_data_atom)
|
data/lib/wahwah/ogg_tag.rb
CHANGED
data/lib/wahwah/riff_tag.rb
CHANGED
@@ -109,17 +109,18 @@ module WahWah
|
|
109
109
|
# And INFO chunk as a subchunk for LIST chunk.
|
110
110
|
if chunk.type != "INFO"
|
111
111
|
chunk.skip
|
112
|
-
|
113
|
-
|
114
|
-
info_chunk = Riff::Chunk.new(@file_io)
|
112
|
+
return
|
113
|
+
end
|
115
114
|
|
116
|
-
|
117
|
-
|
118
|
-
next
|
119
|
-
end
|
115
|
+
until list_chunk_end_position <= @file_io.pos
|
116
|
+
info_chunk = Riff::Chunk.new(@file_io)
|
120
117
|
|
121
|
-
|
118
|
+
unless INFO_ID_MAPPING.key? info_chunk.id.to_sym
|
119
|
+
info_chunk.skip
|
120
|
+
next
|
122
121
|
end
|
122
|
+
|
123
|
+
update_attribute(info_chunk)
|
123
124
|
end
|
124
125
|
end
|
125
126
|
|
data/lib/wahwah/tag.rb
CHANGED
data/lib/wahwah/version.rb
CHANGED
data/lib/wahwah.rb
CHANGED
@@ -20,6 +20,7 @@ require "wahwah/id3/text_frame_body"
|
|
20
20
|
require "wahwah/id3/genre_frame_body"
|
21
21
|
require "wahwah/id3/comment_frame_body"
|
22
22
|
require "wahwah/id3/image_frame_body"
|
23
|
+
require "wahwah/id3/lyrics_frame_body"
|
23
24
|
|
24
25
|
require "wahwah/mp3/mpeg_frame_header"
|
25
26
|
require "wahwah/mp3/xing_header"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wahwah
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- aidewoode
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-07-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
75
|
+
version: 0.22.0
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.
|
82
|
+
version: 0.22.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: simplecov-lcov
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -131,6 +131,7 @@ files:
|
|
131
131
|
- lib/wahwah/id3/frame_body.rb
|
132
132
|
- lib/wahwah/id3/genre_frame_body.rb
|
133
133
|
- lib/wahwah/id3/image_frame_body.rb
|
134
|
+
- lib/wahwah/id3/lyrics_frame_body.rb
|
134
135
|
- lib/wahwah/id3/text_frame_body.rb
|
135
136
|
- lib/wahwah/id3/v1.rb
|
136
137
|
- lib/wahwah/id3/v2.rb
|
@@ -167,14 +168,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
167
168
|
requirements:
|
168
169
|
- - ">="
|
169
170
|
- !ruby/object:Gem::Version
|
170
|
-
version: 2.
|
171
|
+
version: 2.7.0
|
171
172
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
172
173
|
requirements:
|
173
174
|
- - ">="
|
174
175
|
- !ruby/object:Gem::Version
|
175
176
|
version: '0'
|
176
177
|
requirements: []
|
177
|
-
rubygems_version: 3.
|
178
|
+
rubygems_version: 3.3.26
|
178
179
|
signing_key:
|
179
180
|
specification_version: 4
|
180
181
|
summary: Audio metadata reader ruby gem
|