diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 8d8bca3..57f67e3 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,6 +1,6 @@ # Release Notes -## 0.16.22 - 2018-12-15 +## 0.16.23 - 2018-12-15 * Update to ASP.NET 2.2 ## 0.15.11 - 2018-11-05 diff --git a/src/Client/ReleaseNotes.fs b/src/Client/ReleaseNotes.fs index 05c5a6b..b19ff69 100644 --- a/src/Client/ReleaseNotes.fs +++ b/src/Client/ReleaseNotes.fs @@ -1,13 +1,13 @@ module internal ReleaseNotes -let Version = "0.16.22" +let Version = "0.16.23" let IsPrerelease = false let Notes = """ # Release Notes -## 0.16.22 - 2018-12-15 +## 0.16.23 - 2018-12-15 * Update to ASP.NET 2.2 ## 0.15.11 - 2018-11-05 diff --git a/src/Server/Server.fs b/src/Server/Server.fs index 6468809..6d9b91f 100644 --- a/src/Server/Server.fs +++ b/src/Server/Server.fs @@ -47,14 +47,17 @@ let uploadMusik (stream:Stream) = task { let blockBlob = mediaContainer.GetBlockBlobReference(mediaID.ToString()) blockBlob.Properties.ContentType <- "audio/mpeg" do! blockBlob.UploadFromStreamAsync(stream) - return TagAction.PlayBlobMusik mediaID + return TagAction.PlayBlobMusik [|mediaID|] } let mapBlobMusikTag (tag:Tag) = task { match tag.Action with - | TagAction.PlayBlobMusik mediaID -> - let! sas = getSASMediaLink(mediaID.ToString()) - return { tag with Action = TagAction.PlayMusik [| sas |] } + | TagAction.PlayBlobMusik mediaIDs -> + let list = System.Collections.Generic.List<_>() + for mediaID in mediaIDs do + let! sas = getSASMediaLink(mediaID.ToString()) + list.Add sas + return { tag with Action = TagAction.PlayMusik(Seq.toArray list) } | _ -> return tag } diff --git a/src/Shared/Shared.fs b/src/Shared/Shared.fs index 371f16e..b3807b1 100644 --- a/src/Shared/Shared.fs +++ b/src/Shared/Shared.fs @@ -29,7 +29,7 @@ type TagAction = | StopMusik | PlayMusik of string [] | PlayYoutube of string -| PlayBlobMusik of System.Guid +| PlayBlobMusik of System.Guid [] static member Encoder (action : TagAction) = match action with @@ -49,9 +49,9 @@ type TagAction = Encode.object [ "PlayYoutube", Encode.string url ] - | TagAction.PlayBlobMusik url -> + | TagAction.PlayBlobMusik urls -> Encode.object [ - "PlayBlobMusik", Encode.guid url + "PlayBlobMusik", Encode.array (Array.map Encode.guid urls) ] static member Decoder = @@ -62,7 +62,7 @@ type TagAction = |> Decode.map TagAction.PlayMusik Decode.field "PlayYoutube" Decode.string |> Decode.map TagAction.PlayYoutube - Decode.field "PlayBlobMusik" Decode.guid + Decode.field "PlayBlobMusik" (Decode.array Decode.guid) |> Decode.map TagAction.PlayBlobMusik ]