dolit 0.0.3 → 0.0.4
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.
- data/lib/dolit.rb +5 -5
- data/lib/dolit/version.rb +1 -1
- data/lib/libSiteParser.so +0 -0
- metadata +2 -2
data/lib/dolit.rb
CHANGED
@@ -17,7 +17,7 @@ module Dolit
|
|
17
17
|
attach_function :video_freevideoresult, :DLVideo_FreeVideoResult, [:id], :void
|
18
18
|
|
19
19
|
def self.parse(url, user_agent = nil)
|
20
|
-
pResult = MemoryPointer.new :pointer
|
20
|
+
pResult = FFI::MemoryPointer.new :pointer
|
21
21
|
ret = video_parse(url, user_agent, pResult)
|
22
22
|
return if ret != 0
|
23
23
|
pos = 0
|
@@ -42,7 +42,7 @@ module Dolit
|
|
42
42
|
if count > 0
|
43
43
|
p = 0
|
44
44
|
res[:strs] = []
|
45
|
-
|
45
|
+
count.times do |i|
|
46
46
|
type_hash = {}
|
47
47
|
type_hash[:str_type] = pTypePtr.get_pointer(p).read_string
|
48
48
|
p += 4
|
@@ -54,7 +54,7 @@ module Dolit
|
|
54
54
|
if segCount > 0
|
55
55
|
type_hash[:files] = []
|
56
56
|
segPinterPos = 0
|
57
|
-
|
57
|
+
segCount.times do |j|
|
58
58
|
file_hash = {}
|
59
59
|
file_hash[:file_size] = pSegPtr.get_long(segPinterPos)
|
60
60
|
segPinterPos += 8
|
@@ -62,12 +62,12 @@ module Dolit
|
|
62
62
|
segPinterPos += 4
|
63
63
|
file_hash[:file_no] = pSegPtr.get_int(segPinterPos)
|
64
64
|
segPinterPos += 4
|
65
|
-
file_hash[:url] = pSegPtr.
|
65
|
+
file_hash[:url] = pSegPtr.get_pointer(segPinterPos).read_string
|
66
66
|
segPinterPos += 4
|
67
67
|
type_hash[:files][j] = file_hash
|
68
68
|
end
|
69
69
|
end
|
70
|
-
res[:
|
70
|
+
res[:strs][i] = type_hash
|
71
71
|
end
|
72
72
|
end
|
73
73
|
video_freevideoresult(pVideoResult)
|
data/lib/dolit/version.rb
CHANGED
data/lib/libSiteParser.so
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dolit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-07-
|
12
|
+
date: 2013-07-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|