Skip to content

Commit

Permalink
Bumping version to 0.0.37
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Oct 5, 2018
1 parent 020ed3e commit 4dd67bb
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 11 deletions.
2 changes: 1 addition & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Release Notes

## 0.0.36 - 2018-10-05
## 0.0.37 - 2018-10-05

* Initial release
Empty file removed audio/mp3/custom/Placeholder.txt
Empty file.
Binary file removed audio/mp3/startup.mp3
Binary file not shown.
5 changes: 1 addition & 4 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,7 @@ Target.create "BundleClient" (fun _ ->

!! (piServerPath </> "*.js") |> Shell.copyFiles piDeployDir
let targetNodeModules = piDeployDir </> "node_modules"
let audioTarget = deployDir </> "audio"
Shell.cleanDirs [targetNodeModules; audioTarget]
Shell.cleanDirs [targetNodeModules]
Shell.copyRecursive (piServerPath </> "node_modules") targetNodeModules true |> ignore

System.IO.Compression.ZipFile.CreateFromDirectory(piDeployDir, currentFirmware)
Expand All @@ -172,8 +171,6 @@ Target.create "BundleClient" (fun _ ->
let jsDir = clientDir </> "js"
let imageDir = clientDir </> "Images"

Shell.copyRecursive "audio" audioTarget true |> ignore
Directory.delete (audioTarget </> "custom")
!! "src/Client/public/**/*.*" |> Shell.copyFiles publicDir
!! "src/Client/js/**/*.*" |> Shell.copyFiles jsDir
!! "src/Client/Images/**/*.*" |> Shell.copyFiles imageDir
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.0.36"
let Version = "0.0.37"

let IsPrerelease = false

let Notes = """
# Release Notes
## 0.0.36 - 2018-10-05
## 0.0.37 - 2018-10-05
* Initial release
"""
7 changes: 7 additions & 0 deletions src/PiServer/PiServer.fs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ let executeAction (nodeServices : INodeServices) (action:TagAction) =
currentTask <- play nodeServices url
return (sprintf "Playing %s" url)
}
| TagAction.PlayBlobMusik guid ->
task {
let! r = stop nodeServices
let url = sprintf "%s/audio/%O" tagServer guid
currentTask <- play nodeServices url
return (sprintf "Playing %s" url)
}


let executeTag (nodeServices : INodeServices) (tag:string) = task {
Expand Down
6 changes: 3 additions & 3 deletions src/Server/Server.fs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ let audioStream (stream : Stream) : HttpHandler =
return! next ctx
}

let mp3Endpoint mediaID =
let blobMusikEndpoint mediaID =
pipeline {
set_header "Content-Type" "audio/mpeg"
plug (fun next ctx -> task {
Expand Down Expand Up @@ -75,7 +75,7 @@ let startupEndpoint =
pipeline {
set_header "Content-Type" "application/json"
plug (fun next ctx -> task {
let actions = [TagAction.PlayMusik (sprintf @"%s/%s" URLs.mp3Server "startup")]
let actions = [TagAction.PlayMusik (sprintf @"%s/%s" URLs.mp3Server "d97cdddb-8a19-4690-8ba5-b8ea43d3641f")]

let txt =
actions
Expand Down Expand Up @@ -103,7 +103,7 @@ let firmwareEndpoint =

let webApp =
router {
getf "/api/audio/mp3/%s" mp3Endpoint
getf "/api/audio/%s" blobMusikEndpoint
getf "/api/tags/%s/%s" tagEndpoint
getf "/api/usertags/%s" allTagsEndpoint
get "/api/startup" startupEndpoint
Expand Down
8 changes: 7 additions & 1 deletion src/Shared/Shared.fs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ type TagAction =
| UnknownTag
| StopMusik
| PlayMusik of string
| PlayBlobMusik of System.Guid

static member Encoder (action : TagAction) =
match action with
Expand All @@ -45,14 +46,19 @@ type TagAction =
Encode.object [
"PlayMusik", Encode.string url
]

| TagAction.PlayBlobMusik url ->
Encode.object [
"PlayBlobMusik", Encode.guid url
]

static member Decoder =
Decode.oneOf [
Decode.field "UnknownTag" (Decode.succeed TagAction.UnknownTag)
Decode.field "StopMusik" (Decode.succeed TagAction.StopMusik)
Decode.field "PlayMusik" Decode.string
|> Decode.map TagAction.PlayMusik
Decode.field "PlayBlobMusik" Decode.guid
|> Decode.map TagAction.PlayBlobMusik
]

type Tag =
Expand Down

0 comments on commit 4dd67bb

Please sign in to comment.