JOCHLSDownloader 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/JOCHLSDownloader.rb +8 -5
- metadata +1 -1
data/lib/JOCHLSDownloader.rb
CHANGED
@@ -15,11 +15,11 @@ require 'uri'
|
|
15
15
|
class CJOCHLSDownloader
|
16
16
|
|
17
17
|
#Initialize CJOCHLSDownloader
|
18
|
-
#
|
19
|
-
#
|
20
|
-
#
|
21
|
-
#
|
22
|
-
#
|
18
|
+
#
|
19
|
+
# @param url [String] the HLS source string
|
20
|
+
# @param path [String] base path of all downloaded content
|
21
|
+
# @param logfile [String] log file to save the logs (optional)
|
22
|
+
# @param loglevel log level, could be Logger::FATAL, Logger::ERROR, Logger::WARN, Logger::INFO, Logger::DEBUG (optional)
|
23
23
|
def initialize(url, path, logfile = nil, loglevel = Logger::INFO)
|
24
24
|
|
25
25
|
@sourceurl = URI(url)
|
@@ -52,6 +52,7 @@ class CJOCHLSDownloader
|
|
52
52
|
private
|
53
53
|
|
54
54
|
#Download a m3u8 file and call to parse function
|
55
|
+
#
|
55
56
|
# @param domain [String] Source domain to download m3u8 file
|
56
57
|
# @param url [String] Source url path to download m3u8 file
|
57
58
|
# @param basedir [String] local filesystem path to save the downloaded files
|
@@ -86,6 +87,7 @@ private
|
|
86
87
|
end
|
87
88
|
|
88
89
|
#Parse a m3u8 file
|
90
|
+
#
|
89
91
|
# @param file [String] path to donwloaded m3u8 to parse
|
90
92
|
# @param domain [String] Source domain of downloaded m3u8 file
|
91
93
|
# @param url [String] Source url path to downloaded m3u8 file
|
@@ -119,6 +121,7 @@ private
|
|
119
121
|
end
|
120
122
|
|
121
123
|
#Send a log to file or to stderr
|
124
|
+
#
|
122
125
|
# @param type type of log
|
123
126
|
# @param message [String] log message
|
124
127
|
def Log (type, message)
|