woody 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/woody/compiler.rb +1 -0
- data/lib/woody/episode.rb +6 -2
- data/lib/woody/version.rb +1 -1
- metadata +1 -1
data/lib/woody/compiler.rb
CHANGED
data/lib/woody/episode.rb
CHANGED
@@ -61,7 +61,7 @@ module Woody
|
|
61
61
|
|
62
62
|
# @return [Integer] the size of the episodes media file in bytes
|
63
63
|
def size
|
64
|
-
File.size "content
|
64
|
+
File.size File.join("content", filename)
|
65
65
|
end
|
66
66
|
|
67
67
|
# @return [String] 'yes' if explicit content, otherwise n'o'
|
@@ -73,7 +73,7 @@ module Woody
|
|
73
73
|
def duration
|
74
74
|
return @duration unless @duration.nil?
|
75
75
|
length = 0
|
76
|
-
Mp3Info.open("content
|
76
|
+
Mp3Info.open(File.join("content", filename)) do |mp3|
|
77
77
|
length = mp3.length
|
78
78
|
end
|
79
79
|
@duration = Time.at(length).gmtime.strftime('%R:%S') # Should work up to 24 hours
|
@@ -82,5 +82,9 @@ module Woody
|
|
82
82
|
end
|
83
83
|
end
|
84
84
|
|
85
|
+
def <=> (other)
|
86
|
+
other.date <=> self.date
|
87
|
+
end
|
88
|
+
|
85
89
|
end
|
86
90
|
end
|
data/lib/woody/version.rb
CHANGED