File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -52,19 +52,20 @@ let read_commands chan video user_duration user_seek =
52
52
(constf " %s"
53
53
String. (sub video.name 0 (min 23 (length video.name))) )
54
54
; percentage_of total
55
- ; bar ~style: `ASCII total
55
+ ; bar ~style: `ASCII ~data: `Sum total
56
56
; const " -" ++ eta total ++ const " " ]
57
57
in
58
- let prev = ref 0.0 in
58
+ let prev = ref 0 in
59
59
let quit = ref false in
60
60
Progress. with_reporter bar (fun f ->
61
61
while not ! quit do
62
62
match read_command chan with
63
63
| Eof | ParsingError ->
64
64
quit := true (* FIXME: handle parsing error *)
65
65
| Nop -> ()
66
- | Timestamp timestamp ->
67
- f (Float. to_int (timestamp -. ! prev)) ;
66
+ | Timestamp tt ->
67
+ let timestamp = Float. to_int tt in
68
+ f (timestamp - ! prev) ;
68
69
prev := timestamp
69
70
done ) ;
70
71
Ok () )
You can’t perform that action at this time.
0 commit comments