wahwah 1.4.0 → 1.5.1
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 +1 -0
- data/lib/wahwah/ogg/vorbis_comment.rb +2 -1
- data/lib/wahwah/ogg_tag.rb +2 -1
- data/lib/wahwah/riff_tag.rb +6 -0
- data/lib/wahwah/tag.rb +1 -0
- data/lib/wahwah/version.rb +1 -1
- data/lib/wahwah.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ae84eaac046bfc70016dd80a23f1c246066d70264c064fd048127946a40bd51
|
4
|
+
data.tar.gz: bea598207d92e57cac06bfc948b1ea86a70b68b7ffd61c2231a5b2f75d193785
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc3e3ad5fb44882840f7fe1d21d77aa722a0bc5b13ef41b1d8243f6dc24ec83ac83ce2765e5941f09e7e097b458810235f11235d6b9b997623b9910082d8e023
|
7
|
+
data.tar.gz: 4f5fd37cbe0eadfec74eae4b73952bd9fe03b5a8ce67569c4662f54e142a33a163c94722257b6d461286b537b7c59cd0c52b33728659f606d1a1219b10332e00
|
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
data/lib/wahwah/ogg_tag.rb
CHANGED
data/lib/wahwah/riff_tag.rb
CHANGED
@@ -95,6 +95,12 @@ module WahWah
|
|
95
95
|
def parse_fmt_chunk(chunk)
|
96
96
|
_, @channel, @sample_rate, _, _, @bit_depth = chunk.data.unpack("vvVVvv")
|
97
97
|
@bitrate = @sample_rate * @channel * @bit_depth / 1000
|
98
|
+
|
99
|
+
# There is a rare situation where the data chunk is not included in the top RIFF chunk.
|
100
|
+
# In this case, the duration can not be got from the data chunk, some player even cannot play the file.
|
101
|
+
# So try to estimate the duration from the file size and bitrate.
|
102
|
+
# This may be inaccurate, but at least can get approximate duration.
|
103
|
+
@duration = (@file_size * 8) / (@bitrate * 1000).to_f if @duration.nil?
|
98
104
|
end
|
99
105
|
|
100
106
|
def parse_data_chunk(chunk)
|
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.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- aidewoode
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -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
|