Decode float for duration

This commit is contained in:
2020-10-05 11:33:49 +02:00
parent 98c34600d1
commit b6cdf308cb
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ resultToMsg result =
Ok o -> Ok o ->
PlaylistsReceived ( o, Time.utc ) PlaylistsReceived ( o, Time.utc )
_ -> Err _ ->
Noop Noop
+1 -1
View File
@@ -35,7 +35,7 @@ decodeVideo =
Decode.map4 Video Decode.map4 Video
(Decode.field "title" Decode.string) (Decode.field "title" Decode.string)
(Decode.field "url" 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)) (Decode.maybe (Decode.field "date" Iso8601.decoder))