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.

Housekeeping 🧹

+124 -134
+1 -1
src/Applications/Brain.elm
··· 156 156 157 157 158 158 subscriptions : Model -> Sub Msg 159 - subscriptions model = 159 + subscriptions _ = 160 160 Sub.batch 161 161 [ Ports.fromAlien alien 162 162 , Ports.makeArtworkTrackUrls MakeArtworkTrackUrls
+1 -1
src/Applications/Brain/Sources/Processing/State.elm
··· 168 168 case result of 169 169 Ok response -> 170 170 case model.processingStatus of 171 - Processing ( source, tracks ) rest -> 171 + Processing ( _, tracks ) rest -> 172 172 return 173 173 { model | processingStatus = Processing ( context.source, tracks ) rest } 174 174 (Steps.takeTreeStep context response tracks model.currentTime)
+1 -1
src/Applications/Brain/Tracks/State.elm
··· 237 237 result 238 238 |> Result.withDefault [] 239 239 |> List.foldl 240 - (\{ path, sourceId } ( dict, acc ) -> 240 + (\{ sourceId } ( dict, acc ) -> 241 241 if List.member sourceId acc then 242 242 ( dict, acc ) 243 243
+1
src/Applications/Brain/User/State.elm
··· 561 561 case model.authMethod of 562 562 -- 🚀 563 563 Just (Dropbox { accessToken, refreshToken }) -> 564 + -- TODO: Refresh token 564 565 [ ( "data", json ) 565 566 , ( "file", file ) 566 567 , ( "token", Json.string accessToken )
+1 -1
src/Applications/UI.elm
··· 525 525 526 526 527 527 subscriptions : Model -> Sub Msg 528 - subscriptions model = 528 + subscriptions _ = 529 529 Sub.batch 530 530 [ Ports.fromAlien alien 531 531
+1 -1
src/Applications/UI/Authentication/State.elm
··· 713 713 confirmInput : Manager 714 714 confirmInput model = 715 715 case lens.get model of 716 - InputScreen (Ipfs i) { value } -> 716 + InputScreen (Ipfs _) { value } -> 717 717 pingOtherIpfs (String.chopEnd "/" value) model 718 718 719 719 InputScreen (RemoteStorage r) { value } ->
+1 -1
src/Applications/UI/Authentication/View.elm
··· 146 146 -- Content 147 147 ----------------------------------------- 148 148 , case state of 149 - InputScreen method opts -> 149 + InputScreen _ opts -> 150 150 inputScreen opts 151 151 152 152 NewEncryptionKeyScreen method pass ->
+1 -1
src/Applications/UI/ContextMenu.elm
··· 30 30 31 31 top = 32 32 coordinates.y 33 - |> max (250 / 2 + 12) 33 + |> max (height / 2 + 12) 34 34 in 35 35 brick 36 36 [ style "left" (String.fromFloat left ++ "px")
+1 -1
src/Applications/UI/DnD.elm
··· 98 98 -- Response 99 99 ------------------------------------ 100 100 , case msg of 101 - Start context -> 101 + Start _ -> 102 102 { initiated = True } 103 103 104 104 _ ->
+2 -2
src/Applications/UI/Navigation.elm
··· 133 133 localItem tabindex_ { amount } ( Icon icon, Label labelText labelType, action ) = 134 134 slab 135 135 (case action of 136 - NavigateToPage page -> 136 + NavigateToPage _ -> 137 137 Html.a 138 138 139 139 OpenLinkInNewPage _ -> 140 140 Html.a 141 141 142 - PerformMsg msg -> 142 + PerformMsg _ -> 143 143 Html.button 144 144 ) 145 145 [ case action of
+6 -7
src/Applications/UI/Playlists/State.elm
··· 56 56 model.playlists 57 57 58 58 Nothing -> 59 - (::) 60 - { autoGenerated = False 61 - , name = properPlaylistName 62 - , public = False 63 - , tracks = tracks 64 - } 65 - model.playlists 59 + { autoGenerated = False 60 + , name = properPlaylistName 61 + , public = False 62 + , tracks = tracks 63 + } 64 + :: model.playlists 66 65 67 66 newModel = 68 67 { model
+6 -7
src/Applications/UI/Queue/Fill.elm
··· 160 160 161 161 cleanAutoGenerated : Bool -> String -> List Item -> List Item 162 162 cleanAutoGenerated shuffle trackId future = 163 - case shuffle of 164 - True -> 165 - List.filterNot 166 - (\i -> i.manualEntry == False && itemTrackId i == trackId) 167 - future 163 + if shuffle then 164 + List.filterNot 165 + (\i -> i.manualEntry == False && itemTrackId i == trackId) 166 + future 168 167 169 - False -> 170 - future 168 + else 169 + future 171 170 172 171 173 172
+4 -5
src/Applications/UI/Queue/State.elm
··· 143 143 } 144 144 in 145 145 -- Fill using the appropiate method 146 - case m.shuffle of 147 - False -> 148 - { m | playingNext = Fill.ordered timestamp nonMissingTracks fillState } 146 + if m.shuffle then 147 + { m | playingNext = Fill.shuffled timestamp nonMissingTracks fillState } 149 148 150 - True -> 151 - { m | playingNext = Fill.shuffled timestamp nonMissingTracks fillState } 149 + else 150 + { m | playingNext = Fill.ordered timestamp nonMissingTracks fillState } 152 151 ) 153 152 |> preloadNext 154 153
+1 -1
src/Applications/UI/Queue/View.elm
··· 274 274 275 275 276 276 historyItem : Int -> Queue.Item -> UI.List.Item UI.Msg 277 - historyItem idx ({ identifiedTrack, manualEntry } as item) = 277 + historyItem idx ({ identifiedTrack } as item) = 278 278 let 279 279 ( _, track ) = 280 280 identifiedTrack
+1 -1
src/Applications/UI/Settings.elm
··· 267 267 chunk 268 268 [ "flex", "flex-wrap" ] 269 269 (List.map 270 - (\( filename, backdropLabel ) -> 270 + (\( filename, _ ) -> 271 271 let 272 272 isActive = 273 273 chosenBackground == Just filename
+2 -2
src/Applications/UI/Sources/View.elm
··· 48 48 , sources = model.sources 49 49 } 50 50 51 - Edit sourceId -> 51 + Edit _ -> 52 52 lazyForm model <| Form.edit 53 53 54 54 New -> ··· 60 60 NewThroughRedirect _ _ -> 61 61 lazyForm model <| Form.new { onboarding = False } 62 62 63 - Rename sourceId -> 63 + Rename _ -> 64 64 lazyForm model <| Form.rename 65 65 ) 66 66
+2 -2
src/Applications/UI/Tracks/ContextMenu.elm
··· 71 71 -> List (ContextMenu.Item Msg) 72 72 alternativeMenuActions timestamp sources tracks = 73 73 case tracks of 74 - [ ( i, t ) ] -> 74 + [ ( _, t ) ] -> 75 75 [ Item 76 76 { icon = Icons.link 77 77 , label = "Copy temporary url" ··· 98 98 -> ContextMenu.Item Msg 99 99 cacheAction { cached, cachingInProgress } tracks = 100 100 case tracks of 101 - [ ( i, t ) as track ] -> 101 + [ ( _, t ) ] -> 102 102 if List.member t.id cached then 103 103 Item 104 104 { icon = Icons.offline_bolt
+3 -3
src/Applications/UI/Tracks/Covers.elm
··· 26 26 in 27 27 tracks.arranged 28 28 |> List.indexedFoldr 29 - (\idx identifiedTrack { covers, gathering } -> 29 + (\_ identifiedTrack { covers, gathering } -> 30 30 let 31 31 group = 32 32 groupFn identifiedTrack ··· 308 308 makeCoverWithFallback sortBy_ closedGathering fallback :: collection 309 309 310 310 311 - makeCoverWithFallback sortBy_ gathering fallback = 311 + makeCoverWithFallback _ gathering fallback = 312 312 let 313 313 amountOfTracks = 314 314 List.length gathering.accIds ··· 322 322 |> Maybe.map Tuple.first 323 323 |> Maybe.withDefault fallback 324 324 325 - ( identifiers, track ) = 325 + ( _, track ) = 326 326 identifiedTrack 327 327 328 328 ( largestAlbumSequence, largestArtistSequence ) =
+2 -5
src/Applications/UI/Tracks/Scene/Covers.elm
··· 90 90 List.length deps.covers 91 91 in 92 92 brick 93 - ((::) 94 - (tabindex (ifThenElse deps.isVisible 0 -1)) 95 - viewAttributes 96 - ) 93 + (tabindex (ifThenElse deps.isVisible 0 -1) :: viewAttributes) 97 94 [ "flex-basis-0" 98 95 , "flex-grow" 99 96 , "outline-none" ··· 794 791 795 792 796 793 metadataView : ItemViewOptions -> ItemDependencies -> Cover -> Html Msg 797 - metadataView { clickable, horizontal } { cachedCovers, sortBy } cover = 794 + metadataView { clickable, horizontal } { sortBy } cover = 798 795 let 799 796 { identifiedTrackCover } = 800 797 cover
+6 -9
src/Applications/UI/Tracks/Scene/List.elm
··· 51 51 view : Dependencies -> List IdentifiedTrack -> InfiniteList.Model -> Bool -> Maybe Queue.Item -> Maybe String -> SortBy -> SortDirection -> List Int -> Maybe (DnD.Model Int) -> Html Msg 52 52 view deps harvest infiniteList favouritesOnly nowPlaying searchTerm sortBy sortDirection selectedTrackIndexes maybeDnD = 53 53 brick 54 - ((::) 55 - (tabindex (ifThenElse deps.isVisible 0 -1)) 56 - viewAttributes 57 - ) 54 + (tabindex (ifThenElse deps.isVisible 0 -1) :: viewAttributes) 58 55 [ "flex-basis-0" 59 56 , "flex-grow" 60 57 , "outline-none" ··· 484 481 485 482 486 483 playlistItemView : Bool -> Maybe Queue.Item -> Maybe String -> List Int -> DnD.Model Int -> Bool -> Bool -> DerivedColors -> Int -> Int -> IdentifiedTrack -> Html Msg 487 - playlistItemView favouritesOnly nowPlaying searchTerm selectedTrackIndexes dnd showAlbum darkMode derivedColors _ idx identifiedTrack = 484 + playlistItemView favouritesOnly nowPlaying _ selectedTrackIndexes dnd showAlbum darkMode derivedColors _ idx identifiedTrack = 488 485 let 489 486 ( identifiers, track ) = 490 487 identifiedTrack ··· 700 697 701 698 702 699 rowStyles : Int -> { isMissing : Bool, isNowPlaying : Bool, isSelected : Bool } -> DerivedColors -> List (Html.Attribute msg) 703 - rowStyles idx { isMissing, isNowPlaying, isSelected } derivedColors = 700 + rowStyles _ { isMissing, isNowPlaying } derivedColors = 704 701 let 705 702 bgColor = 706 703 if isNowPlaying then ··· 740 737 favouriteColumn : String -> Bool -> { isFavourite : Bool, indexInList : Int, isNowPlaying : Bool, isSelected : Bool } -> DerivedColors -> Html Msg 741 738 favouriteColumn columnWidth favouritesOnly identifiers derivedColors = 742 739 brick 743 - ((++) 740 + (List.append 744 741 [ style "width" columnWidth 745 742 , identifiers.indexInList 746 743 |> ToggleFavourite ··· 767 764 768 765 769 766 favouriteColumnStyles : Bool -> { isFavourite : Bool, indexInList : Int, isNowPlaying : Bool, isSelected : Bool } -> DerivedColors -> List (Html.Attribute msg) 770 - favouriteColumnStyles favouritesOnly { isFavourite, isNowPlaying, isSelected } derivedColors = 767 + favouriteColumnStyles favouritesOnly { isFavourite, isNowPlaying } derivedColors = 771 768 let 772 769 color = 773 770 if isNowPlaying && isFavourite then ··· 805 802 806 803 807 804 otherColumn : String -> Bool -> String -> Html msg 808 - otherColumn width isLast text_ = 805 + otherColumn width _ text_ = 809 806 brick 810 807 (otherColumnStyles width) 811 808 [ "pl-2"
+5 -6
src/Applications/UI/Tracks/View.elm
··· 237 237 , title "Toggle favourites-only" 238 238 ] 239 239 [ "cursor-pointer" ] 240 - [ case favouritesOnly of 241 - True -> 242 - Icons.favorite 16 (Color UI.Kit.colorKit.base08) 240 + [ if favouritesOnly then 241 + Icons.favorite 16 (Color UI.Kit.colorKit.base08) 243 242 244 - False -> 245 - Icons.favorite_border 16 Inherit 243 + else 244 + Icons.favorite_border 16 Inherit 246 245 ] 247 246 248 247 -- 3 ··· 349 348 350 349 351 350 noTracksView : List String -> Int -> Int -> Int -> Html UI.Msg 352 - noTracksView processingContext amountOfSources amountOfTracks amountOfFavourites = 351 + noTracksView processingContext amountOfSources amountOfTracks _ = 353 352 chunk 354 353 [ "no-tracks-view" 355 354
+2 -1
src/Applications/UI/User/State/Import.elm
··· 263 263 ] 264 264 ) 265 265 266 - Err err -> 266 + Err _ -> 267 + -- TODO: Error handling 267 268 Return.singleton model
+14 -17
src/Applications/UI/View.elm
··· 298 298 299 299 vessel : List (Html Msg) -> Html Msg 300 300 vessel = 301 - (>>) 302 - (brick 303 - [ style "-webkit-mask-image" "-webkit-radial-gradient(white, black)" ] 304 - [ "bg-white" 305 - , "flex" 306 - , "flex-col" 307 - , "flex-grow" 308 - , "overflow-hidden" 309 - , "relative" 310 - , "rounded" 301 + brick 302 + [ style "-webkit-mask-image" "-webkit-radial-gradient(white, black)" ] 303 + [ "bg-white" 304 + , "flex" 305 + , "flex-col" 306 + , "flex-grow" 307 + , "overflow-hidden" 308 + , "relative" 309 + , "rounded" 311 310 312 - -- Dark mode 313 - ------------ 314 - , "dark:bg-darkest-hour" 315 - ] 316 - ) 317 - (bricky 311 + -- Dark mode 312 + ------------ 313 + , "dark:bg-darkest-hour" 314 + ] 315 + >> bricky 318 316 [ style "min-height" "296px" ] 319 317 [ "flex" 320 318 , "flex-grow" ··· 326 324 , "lg:max-w-insulation" 327 325 , "lg:min-w-3xl" 328 326 ] 329 - )
+2 -2
src/Library/Common.elm
··· 64 64 Http.NetworkError_ -> 65 65 Err Http.NetworkError 66 66 67 - Http.BadStatus_ m body -> 67 + Http.BadStatus_ _ body -> 68 68 Err (Http.BadBody body) 69 69 70 - Http.GoodStatus_ m body -> 70 + Http.GoodStatus_ _ body -> 71 71 Ok body 72 72 73 73
+4 -5
src/Library/Conditional.elm
··· 5 5 6 6 ifThenElse : Bool -> a -> a -> a 7 7 ifThenElse bool x y = 8 - case bool of 9 - True -> 10 - x 8 + if bool then 9 + x 11 10 12 - False -> 13 - y 11 + else 12 + y
+1 -1
src/Library/Sources/Services/Azure/Authorization.elm
··· 49 49 -> String 50 50 -> List ( String, String ) 51 51 -> String 52 - presignedUrl storageMethod computation httpMethod hoursToLive currentTime srcData pathToFile params = 52 + presignedUrl storageMethod computation _ _ currentTime srcData pathToFile params = 53 53 let 54 54 azure = 55 55 srcData
+1 -1
src/Library/Sources/Services/AzureBlob.elm
··· 164 164 165 165 -} 166 166 makeTrackUrl : Time.Posix -> SourceData -> HttpMethod -> String -> String 167 - makeTrackUrl currentTime srcData method pathToFile = 167 + makeTrackUrl currentTime srcData _ pathToFile = 168 168 presignedUrl Blob Read Get 48 currentTime srcData pathToFile []
+1 -1
src/Library/Sources/Services/AzureFile.elm
··· 168 168 169 169 -} 170 170 makeTrackUrl : Time.Posix -> SourceData -> HttpMethod -> String -> String 171 - makeTrackUrl currentTime srcData method pathToFile = 171 + makeTrackUrl currentTime srcData _ pathToFile = 172 172 presignedUrl File Read Get 48 currentTime srcData pathToFile []
+2 -2
src/Library/Sources/Services/Dropbox.elm
··· 124 124 125 125 -} 126 126 makeTree : SourceData -> Marker -> Time.Posix -> (Result Http.Error String -> msg) -> Cmd msg 127 - makeTree srcData marker currentTime resultMsg = 127 + makeTree srcData marker _ resultMsg = 128 128 let 129 129 accessToken = 130 130 Dict.fetch "accessToken" "" srcData ··· 226 226 227 227 -} 228 228 makeTrackUrl : Time.Posix -> SourceData -> HttpMethod -> String -> String 229 - makeTrackUrl currentTime srcData method pathToFile = 229 + makeTrackUrl _ srcData _ pathToFile = 230 230 "dropbox://" ++ Dict.fetch "accessToken" "" srcData ++ "@" ++ pathToFile
+3 -3
src/Library/Sources/Services/Google.elm
··· 142 142 queryParams = 143 143 case maybeCode of 144 144 -- Exchange authorization code for access token & request token 145 - Just authCode -> 145 + Just _ -> 146 146 [ ( "client_id", Dict.fetch "clientId" "" srcData ) 147 147 , ( "client_secret", Dict.fetch "clientSecret" "" srcData ) 148 148 , ( "code", Dict.fetch "authCode" "" srcData ) ··· 182 182 183 183 -} 184 184 makeTree : SourceData -> Marker -> Time.Posix -> (Result Http.Error String -> msg) -> Cmd msg 185 - makeTree srcData marker currentTime resultMsg = 185 + makeTree srcData marker _ resultMsg = 186 186 let 187 187 accessToken = 188 188 Dict.fetch "accessToken" "" srcData ··· 289 289 290 290 -} 291 291 makeTrackUrl : Time.Posix -> SourceData -> HttpMethod -> String -> String 292 - makeTrackUrl currentTime srcData method path = 292 + makeTrackUrl _ srcData _ path = 293 293 let 294 294 file = 295 295 String.Path.file path
+7 -1
src/Library/String/Path.elm
··· 26 26 p ++ sep 27 27 28 28 29 + {-| Drop an amount of path segments from the right side. 30 + 31 + >>> dropRight 5 "a/b/c/d/e/f" 32 + "a" 33 + 34 + -} 29 35 dropRight : Int -> String -> String 30 36 dropRight int path = 31 37 path 32 38 |> String.split sep 33 - |> (\l -> List.take (List.length l - 1) l) 39 + |> (\l -> List.take (List.length l - int) l) 34 40 |> String.join sep 35 41 36 42
+2 -2
src/Library/Tracks.elm
··· 342 342 |> List.indexedFoldr 343 343 (\idx t ( acc, remaining ) -> 344 344 case List.partition ((==) (Just idx)) remaining of 345 - ( match :: _, rem ) -> 345 + ( _ :: _, rem ) -> 346 346 ( acc, rem ) 347 347 348 348 ( _, rem ) -> ··· 369 369 toPlaylistTracks : List IdentifiedTrack -> List PlaylistTrack 370 370 toPlaylistTracks = 371 371 List.map 372 - (\( i, t ) -> 372 + (\( _, t ) -> 373 373 { album = t.tags.album 374 374 , artist = t.tags.artist 375 375 , title = t.tags.title
+11 -12
src/Library/Tracks/Collection/Internal/Harvest.elm
··· 42 42 ----------- 43 43 , case deps.selectedPlaylist of 44 44 Just playlist -> 45 - case playlist.autoGenerated of 46 - True -> 47 - \( _, t ) -> 48 - t.path 49 - |> String.split "/" 50 - |> List.head 51 - |> Maybe.withDefault "" 52 - |> (==) playlist.name 45 + if playlist.autoGenerated then 46 + \( _, t ) -> 47 + t.path 48 + |> String.split "/" 49 + |> List.head 50 + |> Maybe.withDefault "" 51 + |> (==) playlist.name 53 52 54 - False -> 55 - \( i, _ ) -> 56 - Maybe.isJust i.indexInPlaylist 53 + else 54 + \( i, _ ) -> 55 + Maybe.isJust i.indexInPlaylist 57 56 58 57 Nothing -> 59 58 always True ··· 120 119 ) 121 120 ) 122 121 ( Dict.empty, ( 0, Tracks.emptyIdentifiers ), [] ) 123 - |> (\( a, b, c ) -> c) 122 + |> (\( _, _, c ) -> c) 124 123 |> (\h -> { collection | harvested = List.reverse h }) 125 124 |> (\c -> ( deps, c )) 126 125
+15 -17
src/Library/Tracks/Collection/Internal/Identify.elm
··· 67 67 -> ( List IdentifiedTrack, List String ) 68 68 -> ( List IdentifiedTrack, List String ) 69 69 identifyTrack enabledSourceIds favourites track = 70 - case List.member track.sourceId enabledSourceIds of 71 - True -> 72 - partTwo favourites track 70 + if List.member track.sourceId enabledSourceIds then 71 + partTwo favourites track 73 72 74 - False -> 75 - identity 73 + else 74 + identity 76 75 77 76 78 77 partTwo : ··· 105 104 , track 106 105 ) 107 106 in 108 - case isFav of 107 + if isFav then 109 108 -- 110 109 -- A favourite 111 110 -- 112 - True -> 113 - ( identifiedTrack :: acc 114 - , remainingFavourites 115 - |> List.findIndex isFavourite_ 116 - |> Maybe.map (\idx -> List.removeAt idx remainingFavourites) 117 - |> Maybe.withDefault remainingFavourites 118 - ) 111 + ( identifiedTrack :: acc 112 + , remainingFavourites 113 + |> List.findIndex isFavourite_ 114 + |> Maybe.map (\idx -> List.removeAt idx remainingFavourites) 115 + |> Maybe.withDefault remainingFavourites 116 + ) 119 117 118 + else 120 119 -- 121 120 -- Not a favourite 122 121 -- 123 - False -> 124 - ( identifiedTrack :: acc 125 - , remainingFavourites 126 - ) 122 + ( identifiedTrack :: acc 123 + , remainingFavourites 124 + ) 127 125 128 126 129 127
+10 -11
src/Library/Tracks/Favourites.elm
··· 56 56 , title = t.tags.title 57 57 } 58 58 in 59 - case i.isFavourite of 60 - True -> 61 - -- Remove from list 62 - List.filterNot 63 - (match favourite) 64 - favourites 59 + if i.isFavourite then 60 + -- Remove from list 61 + List.filterNot 62 + (match favourite) 63 + favourites 65 64 66 - False -> 67 - -- Add to list 68 - List.append 69 - favourites 70 - [ favourite ] 65 + else 66 + -- Add to list 67 + List.append 68 + favourites 69 + [ favourite ] 71 70 72 71 73 72