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.

Improve missing-tracks handling

+35 -16
+26 -8
src/Applications/UI/Tracks/Scene/Covers.elm
··· 662 662 coverView : ItemViewOptions -> ItemDependencies -> Cover -> Html Msg 663 663 coverView { clickable, horizontal } { cachedCovers, nowPlaying } cover = 664 664 let 665 + nowPlayingId = 666 + Maybe.unwrap "" (.identifiedTrack >> Tuple.second >> .id) nowPlaying 667 + 668 + album = 669 + cover.identifiedTrackCover 670 + |> Tuple.second 671 + |> .tags 672 + |> .album 673 + 674 + missingTracks = 675 + album == Tracks.missingAlbumPlaceholder 676 + 665 677 maybeBlobUrlFromCache = 666 678 cachedCovers 667 679 |> Maybe.withDefault Dict.empty 668 680 |> Dict.get cover.key 669 681 670 682 hasBackgroundImage = 671 - Maybe.isJust maybeBlobUrlFromCache 683 + Maybe.isJust maybeBlobUrlFromCache && not missingTracks 672 684 673 - nowPlayingId = 674 - Maybe.unwrap "" (.identifiedTrack >> Tuple.second >> .id) nowPlaying 685 + bgOrDataAttributes = 686 + case ( missingTracks, maybeBlobUrlFromCache ) of 687 + ( True, _ ) -> 688 + [] 675 689 676 - bgOrDataAttributes = 677 - case maybeBlobUrlFromCache of 678 - Just blobUrl -> 690 + ( False, Just blobUrl ) -> 679 691 [ A.style "background-image" ("url('" ++ blobUrl ++ "')") 680 692 ] 681 693 682 - Nothing -> 694 + ( False, Nothing ) -> 683 695 if Maybe.isJust cachedCovers then 684 696 let 685 697 ( identifiers, track ) = ··· 787 799 788 800 ( _, track ) = 789 801 identifiedTrackCover 802 + 803 + missingTracks = 804 + track.tags.album == Tracks.missingAlbumPlaceholder 790 805 in 791 806 brick 792 807 (if clickable then ··· 832 847 ] 833 848 [ case sortBy of 834 849 Album -> 835 - if cover.variousArtists then 850 + if missingTracks then 851 + text "Missing tracks" 852 + 853 + else if cover.variousArtists then 836 854 text "Various Artists" 837 855 838 856 else
+3 -7
src/Applications/UI/Tracks/State.elm
··· 362 362 , largestArtistSequence = Nothing 363 363 } 364 364 , covers = 365 - case group of 366 - "<missing>" -> 367 - covers 368 - 369 - _ -> 370 - collection 365 + collection 371 366 } 372 367 373 368 else ··· 1151 1146 cover = 1152 1147 makeCoverWithFallback sortBy_ closedGathering fallback 1153 1148 in 1154 - { collection = cover :: collection 1149 + { collection = 1150 + cover :: collection 1155 1151 , selectedCover = 1156 1152 case ( previouslySelectedCover, closedGathering.selectedCover ) of 1157 1153 ( Nothing, _ ) ->
+5
src/Library/Tracks.elm
··· 237 237 } 238 238 239 239 240 + missingAlbumPlaceholder : String 241 + missingAlbumPlaceholder = 242 + "⌁" 243 + 244 + 240 245 pathParts : Track -> { filename : String, parentDirectory : String } 241 246 pathParts { path } = 242 247 let
+1 -1
src/Library/Tracks/Collection/Internal/Identify.elm
··· 143 143 , nr = 0 144 144 , artist = fav.artist 145 145 , title = fav.title 146 - , album = missingId 146 + , album = Tracks.missingAlbumPlaceholder 147 147 , genre = Nothing 148 148 , picture = Nothing 149 149 , year = Nothing