Decode float for duration
This commit is contained in:
parent
98c34600d1
commit
b6cdf308cb
|
@ -54,7 +54,7 @@ resultToMsg result =
|
|||
Ok o ->
|
||||
PlaylistsReceived ( o, Time.utc )
|
||||
|
||||
_ ->
|
||||
Err _ ->
|
||||
Noop
|
||||
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ decodeVideo =
|
|||
Decode.map4 Video
|
||||
(Decode.field "title" Decode.string)
|
||||
(Decode.field "url" Decode.string)
|
||||
(Decode.field "duration" Decode.int)
|
||||
(Decode.map Basics.round (Decode.field "duration" Decode.float))
|
||||
(Decode.maybe (Decode.field "date" Iso8601.decoder))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue