lib/m3uzi/file.rb in m3uzi-0.1.4 vs lib/m3uzi/file.rb in m3uzi-0.1.6
- old
+ new
@@ -1,11 +1,15 @@
class M3Uzi
class File
- attr_accessor :path, :duration, :description
+ attr_accessor :path, :duration, :description, :byterange
def attribute_string
- "#{duration},#{description}"
+ if duration.kind_of?(Float)
+ "#{sprintf('%0.3f',duration)},#{description}"
+ else
+ "#{duration},#{description}"
+ end
end
end
end