wahwah 1.6.5 → 1.6.6
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.
- checksums.yaml +4 -4
- data/lib/wahwah/helper.rb +1 -1
- data/lib/wahwah/mp3_tag.rb +2 -1
- data/lib/wahwah/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 400a515344d4ada3244b5ac7953439dcee43be09c6d667e45ff1a644f636d525
|
4
|
+
data.tar.gz: b3dbaa7e0676c66997f2a48a56a193ef73ee58f5cd0d86fee89ad6cd30adb222
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 937dc4d3c348c1f7cf3c60d787e0943a1462d2de4de36ea60233871ffdbca8b89cf65f53c5aec1d0eb1ed0731409b4abb11b479d32814885fae2f697e09245e6
|
7
|
+
data.tar.gz: 2b98514ddec430ad3912e88ae94ba006bc205cf662c2bde30048fb4dd62687216b8a3b83bdba88951ab74fb9191b0afb631417ce7a7f689f99434f5bfb046f80
|
data/lib/wahwah/helper.rb
CHANGED
@@ -62,7 +62,7 @@ module WahWah
|
|
62
62
|
# M4A is checked for first, since MP4 files start with a chunk size -
|
63
63
|
# and that chunk size may incidentally match another signature.
|
64
64
|
# No other formats would reasonably have "ftyp" as the next for bytes.
|
65
|
-
return "m4a" if ["ftypM4A ".b, "ftyp3gp4".b].include?(signature[4...12])
|
65
|
+
return "m4a" if ["ftypM4A ".b, "ftyp3gp4".b, "ftypmp42".b].include?(signature[4...12])
|
66
66
|
# Handled separately simply because it requires two checks.
|
67
67
|
return "wav" if signature.start_with?("RIFF".b) && signature[8...12] == "WAVE".b
|
68
68
|
magic_numbers = {
|
data/lib/wahwah/mp3_tag.rb
CHANGED
@@ -52,6 +52,7 @@ module WahWah
|
|
52
52
|
def parse_id3_tag
|
53
53
|
@file_io.rewind
|
54
54
|
signature = @file_io.read(6)
|
55
|
+
@file_io.rewind
|
55
56
|
|
56
57
|
if signature.start_with?("ID3".b)
|
57
58
|
id3_v2_tag = ID3::V2.new(@file_io)
|
@@ -72,7 +73,7 @@ module WahWah
|
|
72
73
|
@bitrate = (bytes_count * 8 / @duration / 1000).round unless @duration.zero?
|
73
74
|
else
|
74
75
|
@bitrate = mpeg_frame_header.frame_bitrate
|
75
|
-
@duration = (file_size - (@id3_tag&.size || 0)) * 8 / (@bitrate * 1000).to_f unless @bitrate.zero?
|
76
|
+
@duration = (file_size - (@id3_tag&.size || 0)) * 8 / (@bitrate * 1000).to_f unless @bitrate.to_i.zero?
|
76
77
|
end
|
77
78
|
end
|
78
79
|
|
data/lib/wahwah/version.rb
CHANGED
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.6.
|
4
|
+
version: 1.6.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- aidewoode
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08-
|
11
|
+
date: 2024-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|