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

Configure Feed

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

Add ability to stop processing and automatically stop when signing out

+32 -2
+3
src/Applications/Brain.elm
··· 578 578 Alien.SignOut -> 579 579 UserLayerMsg User.PerformSignOut 580 580 581 + Alien.StopProcessing -> 582 + ProcessingMsg Processing.StopProcessing 583 + 581 584 Alien.StoreTracksInCache -> 582 585 Cmd (Brain.Ports.storeTracksInCache data) 583 586
+4
src/Applications/Brain/Sources/Processing.elm
··· 86 86 { model | status = NotProcessing } 87 87 [ NudgeUI Alien.FinishedProcessingSources ] 88 88 89 + {- STOP! -} 90 + StopProcessing -> 91 + return { model | status = NotProcessing } 92 + 89 93 ----------------------------------------- 90 94 -- Phase 1 91 95 -- Prepare for processing.
+1
src/Applications/Brain/Sources/Processing/Common.elm
··· 32 32 type Msg 33 33 = Process { origin : String, sources : List Source, tracks : List Track } 34 34 | NextInLine 35 + | StopProcessing 35 36 ----------------------------------------- 36 37 -- Steps 37 38 -----------------------------------------
+1
src/Applications/UI.elm
··· 996 996 } 997 997 |> update (BackdropMsg Backdrop.Default) 998 998 |> addCommand (Ports.toBrain <| Alien.trigger Alien.SignOut) 999 + |> addCommand (Ports.toBrain <| Alien.trigger Alien.StopProcessing) 999 1000 |> addCommand (Ports.activeQueueItemChanged Nothing) 1000 1001 |> addCommand (Nav.pushUrl model.navKey "#/") 1001 1002
+21 -2
src/Applications/UI/Sources.elm
··· 1 1 module UI.Sources exposing (Model, Msg(..), initialModel, sourcesToProcess, update, view) 2 2 3 + import Alien 3 4 import Chunky exposing (..) 4 5 import Conditional exposing (ifThenElse) 5 6 import Coordinates exposing (Coordinates) ··· 24 25 import UI.List 25 26 import UI.Navigation exposing (..) 26 27 import UI.Page as Page 28 + import UI.Ports as Ports 27 29 import UI.Reply exposing (Reply(..)) 28 30 import UI.Sources.Form as Form 29 31 import UI.Sources.Page as Sources exposing (..) ··· 64 66 | FinishedProcessing 65 67 | Process 66 68 | ReportProcessingError Json.Value 69 + | StopProcessing 67 70 ----------------------------------------- 68 71 -- Children 69 72 ----------------------------------------- ··· 126 129 "Could not decode processing error" 127 130 |> ShowStickyErrorNotification 128 131 |> returnReplyWithModel model 132 + 133 + StopProcessing -> 134 + case model.processingNotificationId of 135 + Just notificationId -> 136 + Alien.StopProcessing 137 + |> Alien.trigger 138 + |> Ports.toBrain 139 + |> returnCommandWithModel 140 + { model 141 + | isProcessing = [] 142 + , processingNotificationId = Nothing 143 + } 144 + |> addReply (DismissNotification { id = notificationId }) 145 + 146 + Nothing -> 147 + return model 129 148 130 149 ----------------------------------------- 131 150 -- Children ··· 286 305 287 306 else 288 307 ( Icon Icons.sync 289 - , Label "Processing sources ..." Shown 290 - , PerformMsg Bypass 308 + , Label "Stop processing ..." Shown 309 + , PerformMsg StopProcessing 291 310 ) 292 311 ] 293 312
+2
src/Library/Alien.elm
··· 52 52 | SaveTracks 53 53 | SignIn 54 54 | SignOut 55 + | StopProcessing 55 56 | StoreTracksInCache 56 57 | ToCache 57 58 | UpdateEncryptionKey ··· 103 104 , ( "SAVE_TRACKS", SaveTracks ) 104 105 , ( "SIGN_IN", SignIn ) 105 106 , ( "SIGN_OUT", SignOut ) 107 + , ( "STOP_PROCESSING", StopProcessing ) 106 108 , ( "STORE_TRACKS_IN_CACHE", StoreTracksInCache ) 107 109 , ( "TO_CACHE", ToCache ) 108 110 , ( "UPDATE_ENCRYPTION_KEY", UpdateEncryptionKey )