Decode float for duration

This commit is contained in:
Thomas Forgione 2020-10-05 11:33:49 +02:00
parent 98c34600d1
commit b6cdf308cb
2 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ resultToMsg result =
Ok o ->
PlaylistsReceived ( o, Time.utc )
_ ->
Err _ ->
Noop

View File

@ -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))