A music player that connects to your cloud/distributed storage.
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

Improve source processing

+18 -16
+10 -3
src/Applications/Brain.elm
··· 119 119 , msg = debouncerMsg 120 120 } 121 121 122 + Process { origin, sources } -> 123 + { origin = origin 124 + , sources = sources 125 + , tracks = model.hypaethralUserData.tracks 126 + } 127 + |> Processing.Process 128 + |> ProcessingMsg 129 + |> updateWithModel model 130 + 122 131 ToCache alienEvent -> 123 132 alienEvent 124 133 |> Brain.Ports.toCache ··· 436 445 -- otherwise report an error in the UI. 437 446 case Json.decodeValue Processing.argumentsDecoder data of 438 447 Ok arguments -> 439 - arguments 440 - |> Processing.Process 441 - |> ProcessingMsg 448 + Process arguments 442 449 443 450 Err err -> 444 451 report Alien.ProcessSources (Json.errorToString err)
+2
src/Applications/Brain/Core.elm
··· 7 7 import Brain.Tracks as Tracks 8 8 import Debouncer.Basic as Debouncer exposing (Debouncer) 9 9 import Json.Decode as Json 10 + import Sources.Processing as Processing 10 11 11 12 12 13 ··· 39 40 | Initialize String 40 41 | NotifyUI Alien.Event 41 42 | NotSoFast (Debouncer.Msg Msg) 43 + | Process Processing.Arguments 42 44 | ToCache Alien.Event 43 45 ----------------------------------------- 44 46 -- Authentication
+1 -1
src/Applications/Brain/Sources/Processing/Common.elm
··· 30 30 31 31 32 32 type Msg 33 - = Process Arguments 33 + = Process { origin : String, sources : List Source, tracks : List Track } 34 34 | NextInLine 35 35 ----------------------------------------- 36 36 -- Steps
+3 -6
src/Applications/UI.elm
··· 952 952 return model 953 953 954 954 ProcessSources -> 955 - -- TODO: 956 - -- Don't process disabled sources? 957 955 let 958 956 notification = 959 957 Notifications.stickyWarning "Processing sources …" ··· 974 972 , Json.Encode.string (Common.urlOrigin model.url) 975 973 ) 976 974 , ( "sources" 977 - , Json.Encode.list Sources.Encoding.encode model.sources.collection 978 - ) 979 - , ( "tracks" 980 - , Json.Encode.list Tracks.Encoding.encodeTrack model.tracks.collection.untouched 975 + , model.sources.collection 976 + |> List.filter (.enabled >> (==) True) 977 + |> Json.Encode.list Sources.Encoding.encode 981 978 ) 982 979 ] 983 980 |> Json.Encode.object
+1 -2
src/Applications/UI/Authentication.elm
··· 723 723 , T.pv3 724 724 , T.tl 725 725 ] 726 - [ -- TODO: Remove `chunk` + outOfOrder when everything is implemented 727 - chunk 726 + [ chunk 728 727 [ T.flex 729 728 , T.items_center 730 729
-1
src/Library/Sources/Processing.elm
··· 16 16 type alias Arguments = 17 17 { origin : String 18 18 , sources : List Source 19 - , tracks : List Track 20 19 } 21 20 22 21
+1 -3
src/Library/Sources/Processing/Encoding.elm
··· 6 6 import Json.Decode as Decode exposing (Decoder) 7 7 import Sources.Encoding as Sources 8 8 import Sources.Processing exposing (Arguments) 9 - import Tracks.Encoding as Tracks 10 9 11 10 12 11 ··· 15 14 16 15 argumentsDecoder : Decoder Arguments 17 16 argumentsDecoder = 18 - Decode.map3 Arguments 17 + Decode.map2 Arguments 19 18 (Decode.field "origin" Decode.string) 20 19 (Decode.field "sources" <| Decode.list Sources.decoder) 21 - (Decode.field "tracks" <| Decode.list Tracks.trackDecoder)