wahwah 1.6.3 → 1.6.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wahwah/helper.rb +3 -1
- data/lib/wahwah/tag.rb +3 -0
- 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: aefad7912144b9ca322ab5cc843c615b48fe54eafff68bae8626c674513c5b63
|
4
|
+
data.tar.gz: 131564fa1db4bcff6e0e24e2eff8781348f4900e9d54c3047ff86ec6a4eefc7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc42d711d7dd060258bfb46751e12637fe925486891949c7f40b2201a0a81dda5a184d2071080a4cfd6025f22c14ec4f066ff0e07392075e0c22d890a1143f59
|
7
|
+
data.tar.gz: e9e909d3633237af3e47de9d4d55ddc3e2f41347db4ef9bb7f134fe2adb65cde9fe0962ddfcce60b2a96352803964d46438d6d9199405df6d34c7ef2182c7ed3
|
data/lib/wahwah/helper.rb
CHANGED
@@ -54,13 +54,15 @@ module WahWah
|
|
54
54
|
def self.file_format_from_signature(io)
|
55
55
|
io.rewind
|
56
56
|
signature = io.read(16)
|
57
|
+
# Rewind after reading the signature to not mess with the file position
|
58
|
+
io.rewind
|
57
59
|
|
58
60
|
# Source: https://en.wikipedia.org/wiki/List_of_file_signatures
|
59
61
|
|
60
62
|
# M4A is checked for first, since MP4 files start with a chunk size -
|
61
63
|
# and that chunk size may incidentally match another signature.
|
62
64
|
# No other formats would reasonably have "ftyp" as the next for bytes.
|
63
|
-
return "m4a" if
|
65
|
+
return "m4a" if ["ftypM4A ".b, "ftyp3gp4".b].include?(signature[4...12])
|
64
66
|
# Handled separately simply because it requires two checks.
|
65
67
|
return "wav" if signature.start_with?("RIFF".b) && signature[8...12] == "WAVE".b
|
66
68
|
magic_numbers = {
|
data/lib/wahwah/tag.rb
CHANGED
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.5
|
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-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|