Skip to content

Commit

Permalink
Bumping version to 0.16.23
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Dec 16, 2018
1 parent 315c366 commit b9871a1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/Client/ReleaseNotes.fs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
11 changes: 7 additions & 4 deletions src/Server/Server.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
8 changes: 4 additions & 4 deletions src/Shared/Shared.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 =
Expand All @@ -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
]

Expand Down

0 comments on commit b9871a1

Please sign in to comment.