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.

Closes #229

+433 -349
+1 -1
src/Applications/UI.elm
··· 194 194 , cachedTracks = [] 195 195 , cachedTracksOnly = False 196 196 , cachingTracksInProgress = [] 197 - , covers = [] 197 + , covers = { arranged = [], harvested = [] } 198 198 , favourites = [] 199 199 , favouritesOnly = False 200 200 , grouping = Nothing
+372
src/Applications/UI/Tracks/Covers.elm
··· 1 + module UI.Tracks.Covers exposing (..) 2 + 3 + import Base64 4 + import Conditional exposing (ifThenElse) 5 + import List.Extra as List 6 + import Maybe.Extra as Maybe 7 + import Tracks exposing (..) 8 + 9 + 10 + 11 + -- 🔱 12 + 13 + 14 + generate : 15 + SortBy 16 + -> Maybe Cover 17 + -> Tracks.Collection 18 + -> { collection : CoverCollection, selectedCover : Maybe Cover } 19 + generate sortBy previouslySelectedCover tracks = 20 + let 21 + groupFn = 22 + coverGroup sortBy 23 + 24 + makeCoverFn = 25 + makeCover sortBy 26 + in 27 + tracks.arranged 28 + |> List.indexedFoldr 29 + (\idx identifiedTrack { covers, gathering } -> 30 + let 31 + group = 32 + groupFn identifiedTrack 33 + 34 + ( identifiers, track ) = 35 + identifiedTrack 36 + 37 + { artist, album } = 38 + track.tags 39 + in 40 + if group /= gathering.previousGroup then 41 + -- New group, make cover for previous group 42 + let 43 + { collection, selectedCover } = 44 + makeCoverFn gathering covers previouslySelectedCover 45 + in 46 + { gathering = 47 + { acc = [ identifiedTrack ] 48 + , accIds = [ track.id ] 49 + , previousGroup = group 50 + , previousTrack = track 51 + , selectedCover = selectedCover 52 + 53 + -- 54 + , currentAlbumSequence = Just ( identifiedTrack, 1 ) 55 + , largestAlbumSequence = Nothing 56 + 57 + -- 58 + , currentAlbumFavsSequence = Just ( identifiedTrack, ifThenElse identifiers.isFavourite 1 0 ) 59 + , largestAlbumFavsSequence = Nothing 60 + 61 + -- 62 + , currentArtistSequence = Just ( identifiedTrack, 1 ) 63 + , largestArtistSequence = Nothing 64 + } 65 + , covers = 66 + collection 67 + } 68 + 69 + else 70 + -- Same group 71 + { gathering = 72 + { acc = identifiedTrack :: gathering.acc 73 + , accIds = track.id :: gathering.accIds 74 + , previousGroup = group 75 + , previousTrack = track 76 + , selectedCover = gathering.selectedCover 77 + 78 + -- Album sequence 79 + ----------------- 80 + , currentAlbumSequence = 81 + if album /= gathering.previousTrack.tags.album then 82 + Just ( identifiedTrack, 1 ) 83 + 84 + else 85 + increaseSequence gathering.currentAlbumSequence 86 + 87 + -- 88 + , largestAlbumSequence = 89 + if album /= gathering.previousTrack.tags.album then 90 + resolveLargestSequence 91 + gathering.currentAlbumSequence 92 + gathering.largestAlbumSequence 93 + 94 + else 95 + gathering.largestAlbumSequence 96 + 97 + -- Album favourites sequence 98 + ---------------------------- 99 + , currentAlbumFavsSequence = 100 + if album /= gathering.previousTrack.tags.album then 101 + Just ( identifiedTrack, ifThenElse identifiers.isFavourite 1 0 ) 102 + 103 + else if identifiers.isFavourite then 104 + increaseSequence gathering.currentAlbumFavsSequence 105 + 106 + else 107 + gathering.currentAlbumFavsSequence 108 + 109 + -- 110 + , largestAlbumFavsSequence = 111 + if album /= gathering.previousTrack.tags.album then 112 + resolveLargestSequence 113 + gathering.currentAlbumFavsSequence 114 + gathering.largestAlbumFavsSequence 115 + 116 + else 117 + gathering.largestAlbumFavsSequence 118 + 119 + -- Artist sequence 120 + ------------------ 121 + , currentArtistSequence = 122 + if artist /= gathering.previousTrack.tags.artist then 123 + Just ( identifiedTrack, 1 ) 124 + 125 + else 126 + increaseSequence gathering.currentArtistSequence 127 + 128 + -- 129 + , largestArtistSequence = 130 + if artist /= gathering.previousTrack.tags.artist then 131 + resolveLargestSequence 132 + gathering.currentArtistSequence 133 + gathering.largestArtistSequence 134 + 135 + else 136 + gathering.largestArtistSequence 137 + } 138 + , covers = 139 + covers 140 + } 141 + ) 142 + { covers = 143 + [] 144 + , gathering = 145 + { acc = [] 146 + , accIds = [] 147 + , previousGroup = "" 148 + , previousTrack = emptyTrack 149 + , selectedCover = Nothing 150 + 151 + -- 152 + , currentAlbumSequence = Nothing 153 + , largestAlbumSequence = Nothing 154 + , currentAlbumFavsSequence = Nothing 155 + , largestAlbumFavsSequence = Nothing 156 + , currentArtistSequence = Nothing 157 + , largestArtistSequence = Nothing 158 + } 159 + } 160 + |> (\{ covers, gathering } -> 161 + makeCoverFn gathering covers previouslySelectedCover 162 + ) 163 + |> (\{ collection, selectedCover } -> 164 + { collection = { arranged = collection, harvested = [] } 165 + , selectedCover = selectedCover 166 + } 167 + ) 168 + 169 + 170 + harvest : SortBy -> Tracks.Collection -> CoverCollection -> List Cover 171 + harvest sortBy tracks covers = 172 + let 173 + groupFn = 174 + coverGroup sortBy 175 + 176 + ( _, groups ) = 177 + List.foldr 178 + (\identifiedTrack ( previousGroup, acc ) -> 179 + let 180 + group = 181 + groupFn identifiedTrack 182 + in 183 + ( group 184 + , if group /= previousGroup then 185 + group :: acc 186 + 187 + else 188 + acc 189 + ) 190 + ) 191 + ( "", [] ) 192 + tracks.harvested 193 + in 194 + List.filter 195 + (\cover -> List.member cover.group groups) 196 + covers.arranged 197 + 198 + 199 + 200 + -- ⚗️ 201 + 202 + 203 + coverGroup : SortBy -> IdentifiedTrack -> String 204 + coverGroup sort ( identifiers, { tags } as track ) = 205 + (case sort of 206 + Artist -> 207 + tags.artist 208 + 209 + Album -> 210 + -- There is the possibility of albums with the same name, 211 + -- such as "Greatests Hits". 212 + -- To make sure we treat those as different albums, 213 + -- we prefix the album by its parent directory. 214 + identifiers.parentDirectory ++ tags.album 215 + 216 + PlaylistIndex -> 217 + "" 218 + 219 + Title -> 220 + tags.title 221 + ) 222 + |> String.trim 223 + |> String.toLower 224 + 225 + 226 + coverKey : Bool -> Track -> String 227 + coverKey isVariousArtists { tags } = 228 + if isVariousArtists then 229 + tags.album 230 + 231 + else 232 + tags.artist ++ " --- " ++ tags.album 233 + 234 + 235 + makeCover sortBy_ gathering collection previouslySelectedCover = 236 + let 237 + closedGathering = 238 + { gathering 239 + | largestAlbumSequence = 240 + resolveLargestSequence 241 + gathering.currentAlbumSequence 242 + gathering.largestAlbumSequence 243 + 244 + -- 245 + , largestAlbumFavsSequence = 246 + resolveLargestSequence 247 + gathering.currentAlbumFavsSequence 248 + gathering.largestAlbumFavsSequence 249 + 250 + -- 251 + , largestArtistSequence = 252 + resolveLargestSequence 253 + gathering.currentArtistSequence 254 + gathering.largestArtistSequence 255 + } 256 + in 257 + case closedGathering.acc of 258 + [] -> 259 + { collection = collection 260 + , selectedCover = closedGathering.selectedCover 261 + } 262 + 263 + fallback :: _ -> 264 + let 265 + cover = 266 + makeCoverWithFallback sortBy_ closedGathering fallback 267 + in 268 + { collection = 269 + cover :: collection 270 + , selectedCover = 271 + case ( previouslySelectedCover, closedGathering.selectedCover ) of 272 + ( Nothing, _ ) -> 273 + Nothing 274 + 275 + ( Just _, Just _ ) -> 276 + closedGathering.selectedCover 277 + 278 + ( Just sc, Nothing ) -> 279 + case sortBy_ of 280 + Artist -> 281 + if cover.group == sc.group then 282 + Just cover 283 + 284 + else 285 + Nothing 286 + 287 + _ -> 288 + if cover.key == sc.key then 289 + Just cover 290 + 291 + else 292 + Nothing 293 + } 294 + 295 + 296 + makeCoverWithFallback sortBy_ gathering fallback = 297 + let 298 + amountOfTracks = 299 + List.length gathering.accIds 300 + 301 + group = 302 + gathering.previousGroup 303 + 304 + identifiedTrack = 305 + gathering.largestAlbumFavsSequence 306 + |> Maybe.orElse gathering.largestAlbumSequence 307 + |> Maybe.map Tuple.first 308 + |> Maybe.withDefault fallback 309 + 310 + ( identifiers, track ) = 311 + identifiedTrack 312 + 313 + ( largestAlbumSequence, largestArtistSequence ) = 314 + ( Maybe.unwrap 0 Tuple.second gathering.largestAlbumSequence 315 + , Maybe.unwrap 0 Tuple.second gathering.largestArtistSequence 316 + ) 317 + 318 + ( sameAlbum, sameArtist ) = 319 + ( largestAlbumSequence == amountOfTracks 320 + , largestArtistSequence == amountOfTracks 321 + ) 322 + 323 + isVariousArtists = 324 + False 325 + || (amountOfTracks > 4 && largestArtistSequence < 3) 326 + || (String.toLower track.tags.artist == "va") 327 + in 328 + { key = Base64.encode (coverKey isVariousArtists track) 329 + , identifiedTrackCover = identifiedTrack 330 + 331 + -- 332 + , focus = 333 + case sortBy_ of 334 + Artist -> 335 + "artist" 336 + 337 + _ -> 338 + "album" 339 + 340 + -- 341 + , group = group 342 + , sameAlbum = sameAlbum 343 + , sameArtist = sameArtist 344 + 345 + -- 346 + , trackIds = gathering.accIds 347 + , tracks = gathering.acc 348 + , variousArtists = isVariousArtists 349 + } 350 + 351 + 352 + 353 + -- ⚗️ ░░ SEQUENCES 354 + 355 + 356 + increaseSequence = 357 + Maybe.map (Tuple.mapSecond ((+) 1)) 358 + 359 + 360 + resolveLargestSequence curr state = 361 + case ( curr, state ) of 362 + ( Just ( _, c ), Just ( _, s ) ) -> 363 + ifThenElse (c > s) curr state 364 + 365 + ( Just _, Nothing ) -> 366 + curr 367 + 368 + ( Nothing, Just _ ) -> 369 + state 370 + 371 + ( Nothing, Nothing ) -> 372 + Nothing
+52 -346
src/Applications/UI/Tracks/State.elm
··· 34 34 import UI.Ports as Ports 35 35 import UI.Queue.State as Queue 36 36 import UI.Tracks.ContextMenu as Tracks 37 + import UI.Tracks.Covers as Covers 37 38 import UI.Tracks.Scene.Covers 38 39 import UI.Tracks.Scene.List 39 40 import UI.Tracks.Types as Tracks exposing (..) ··· 316 317 317 318 generateCovers : Manager 318 319 generateCovers model = 319 - let 320 - groupFn = 321 - coverGroup model.sortBy 322 - 323 - makeCoverFn = 324 - makeCover model.sortBy 325 - in 326 - model.tracks.harvested 327 - |> List.indexedFoldr 328 - (\idx identifiedTrack { covers, gathering } -> 329 - let 330 - group = 331 - groupFn identifiedTrack 332 - 333 - ( identifiers, track ) = 334 - identifiedTrack 335 - 336 - { artist, album } = 337 - track.tags 338 - in 339 - if group /= gathering.previousGroup then 340 - -- New group, make cover for previous group 341 - let 342 - { collection, selectedCover } = 343 - makeCoverFn gathering covers model.selectedCover 344 - in 345 - { gathering = 346 - { acc = [ identifiedTrack ] 347 - , accIds = [ track.id ] 348 - , previousGroup = group 349 - , previousTrack = track 350 - , selectedCover = selectedCover 351 - 352 - -- 353 - , currentAlbumSequence = Just ( identifiedTrack, 1 ) 354 - , largestAlbumSequence = Nothing 355 - 356 - -- 357 - , currentAlbumFavsSequence = Just ( identifiedTrack, ifThenElse identifiers.isFavourite 1 0 ) 358 - , largestAlbumFavsSequence = Nothing 359 - 360 - -- 361 - , currentArtistSequence = Just ( identifiedTrack, 1 ) 362 - , largestArtistSequence = Nothing 363 - } 364 - , covers = 365 - collection 366 - } 367 - 368 - else 369 - -- Same group 370 - { gathering = 371 - { acc = identifiedTrack :: gathering.acc 372 - , accIds = track.id :: gathering.accIds 373 - , previousGroup = group 374 - , previousTrack = track 375 - , selectedCover = gathering.selectedCover 376 - 377 - -- Album sequence 378 - ----------------- 379 - , currentAlbumSequence = 380 - if album /= gathering.previousTrack.tags.album then 381 - Just ( identifiedTrack, 1 ) 382 - 383 - else 384 - increaseSequence gathering.currentAlbumSequence 385 - 386 - -- 387 - , largestAlbumSequence = 388 - if album /= gathering.previousTrack.tags.album then 389 - resolveLargestSequence 390 - gathering.currentAlbumSequence 391 - gathering.largestAlbumSequence 392 - 393 - else 394 - gathering.largestAlbumSequence 395 - 396 - -- Album favourites sequence 397 - ---------------------------- 398 - , currentAlbumFavsSequence = 399 - if album /= gathering.previousTrack.tags.album then 400 - Just ( identifiedTrack, ifThenElse identifiers.isFavourite 1 0 ) 401 - 402 - else if identifiers.isFavourite then 403 - increaseSequence gathering.currentAlbumFavsSequence 404 - 405 - else 406 - gathering.currentAlbumFavsSequence 407 - 408 - -- 409 - , largestAlbumFavsSequence = 410 - if album /= gathering.previousTrack.tags.album then 411 - resolveLargestSequence 412 - gathering.currentAlbumFavsSequence 413 - gathering.largestAlbumFavsSequence 414 - 415 - else 416 - gathering.largestAlbumFavsSequence 417 - 418 - -- Artist sequence 419 - ------------------ 420 - , currentArtistSequence = 421 - if artist /= gathering.previousTrack.tags.artist then 422 - Just ( identifiedTrack, 1 ) 423 - 424 - else 425 - increaseSequence gathering.currentArtistSequence 426 - 427 - -- 428 - , largestArtistSequence = 429 - if artist /= gathering.previousTrack.tags.artist then 430 - resolveLargestSequence 431 - gathering.currentArtistSequence 432 - gathering.largestArtistSequence 433 - 434 - else 435 - gathering.largestArtistSequence 436 - } 437 - , covers = 438 - covers 439 - } 440 - ) 441 - { covers = 442 - [] 443 - , gathering = 444 - { acc = [] 445 - , accIds = [] 446 - , previousGroup = "" 447 - , previousTrack = emptyTrack 448 - , selectedCover = Nothing 449 - 450 - -- 451 - , currentAlbumSequence = Nothing 452 - , largestAlbumSequence = Nothing 453 - , currentAlbumFavsSequence = Nothing 454 - , largestAlbumFavsSequence = Nothing 455 - , currentArtistSequence = Nothing 456 - , largestArtistSequence = Nothing 457 - } 458 - } 459 - |> (\{ covers, gathering } -> 460 - let 461 - { collection, selectedCover } = 462 - makeCoverFn gathering covers model.selectedCover 463 - in 320 + model.tracks 321 + |> Covers.generate 322 + model.sortBy 323 + model.selectedCover 324 + |> (\{ collection, selectedCover } -> 464 325 { model 465 326 | covers = collection 466 327 , selectedCover = selectedCover 467 328 } 468 329 ) 469 - |> Return.communicate 470 - (Ports.loadAlbumCovers ()) 471 - |> andThen 472 - (case model.scene of 473 - Covers -> 474 - Common.forceTracksRerender 475 - 476 - List -> 477 - Return.singleton 478 - ) 330 + |> Return.singleton 479 331 480 332 481 333 gotCachedCover : Json.Value -> Manager ··· 509 361 reviseCollection Collection.harvest 510 362 511 363 364 + harvestCovers : Manager 365 + harvestCovers model = 366 + let 367 + covers = 368 + model.covers 369 + in 370 + { covers | harvested = Covers.harvest model.sortBy model.tracks covers } 371 + |> (\c -> { model | covers = c }) 372 + |> Return.communicate 373 + (Ports.loadAlbumCovers ()) 374 + |> andThen 375 + (case model.scene of 376 + Covers -> 377 + Common.forceTracksRerender 378 + 379 + List -> 380 + Return.singleton 381 + ) 382 + 383 + 512 384 infiniteListMsg : InfiniteList.Model -> Manager 513 385 infiniteListMsg infiniteList model = 514 386 return ··· 765 637 Covers -> 766 638 UI.Tracks.Scene.Covers.scrollToNowPlaying 767 639 model.viewport.width 768 - model.covers 640 + model.covers.harvested 769 641 770 642 List -> 771 643 UI.Tracks.Scene.List.scrollToNowPlaying model.tracks.harvested ··· 968 840 model.tracks.untouched 969 841 newCollection.untouched 970 842 971 - harvestChanged = 843 + arrangementChanged = 972 844 if collectionChanged then 973 845 True 974 846 975 847 else 976 848 Collection.identifiedTracksChanged 977 - model.tracks.harvested 978 - newCollection.harvested 849 + model.tracks.arranged 850 + newCollection.arranged 979 851 980 - arrangementChanged = 981 - if collectionChanged || harvestChanged then 852 + harvestChanged = 853 + if arrangementChanged then 982 854 True 983 855 984 856 else 985 857 Collection.identifiedTracksChanged 986 - model.tracks.arranged 987 - newCollection.arranged 858 + model.tracks.harvested 859 + newCollection.harvested 988 860 989 861 searchChanged = 990 862 newScrollContext /= model.tracks.scrollContext ··· 1008 880 } 1009 881 in 1010 882 (if collectionChanged then 1011 - andThen Common.generateDirectoryPlaylists 1012 - >> andThen Queue.reset 1013 - >> andThen generateCovers 883 + whenCollectionChanges 884 + 885 + else if arrangementChanged then 886 + whenArrangementChanges 1014 887 1015 888 else if harvestChanged then 1016 - andThen Queue.reset >> andThen generateCovers 1017 - 1018 - else if arrangementChanged then 1019 - andThen generateCovers 889 + whenHarvestChanges 1020 890 1021 891 else 1022 892 identity ··· 1036 906 else 1037 907 Cmd.none 1038 908 ) 909 + 910 + 911 + whenHarvestChanges = 912 + andThen Queue.reset >> andThen harvestCovers 913 + 914 + 915 + whenArrangementChanges = 916 + andThen generateCovers >> whenHarvestChanges 917 + 918 + 919 + whenCollectionChanges = 920 + andThen Common.generateDirectoryPlaylists >> whenArrangementChanges 1039 921 1040 922 1041 923 scrollContext : Model -> String ··· 1075 957 Nothing -> 1076 958 andThen (Common.toggleLoadingScreen Off) 1077 959 ) 1078 - 1079 - 1080 - 1081 - -- ⚗️ ░░ COVERS 1082 - 1083 - 1084 - coverGroup : SortBy -> IdentifiedTrack -> String 1085 - coverGroup sort ( identifiers, { tags } as track ) = 1086 - (case sort of 1087 - Artist -> 1088 - tags.artist 1089 - 1090 - Album -> 1091 - -- There is the possibility of albums with the same name, 1092 - -- such as "Greatests Hits". 1093 - -- To make sure we treat those as different albums, 1094 - -- we prefix the album by its parent directory. 1095 - identifiers.parentDirectory ++ tags.album 1096 - 1097 - PlaylistIndex -> 1098 - "" 1099 - 1100 - Title -> 1101 - tags.title 1102 - ) 1103 - |> String.trim 1104 - |> String.toLower 1105 - 1106 - 1107 - coverKey : Bool -> Track -> String 1108 - coverKey isVariousArtists { tags } = 1109 - if isVariousArtists then 1110 - tags.album 1111 - 1112 - else 1113 - tags.artist ++ " --- " ++ tags.album 1114 - 1115 - 1116 - makeCover sortBy_ gathering collection previouslySelectedCover = 1117 - let 1118 - closedGathering = 1119 - { gathering 1120 - | largestAlbumSequence = 1121 - resolveLargestSequence 1122 - gathering.currentAlbumSequence 1123 - gathering.largestAlbumSequence 1124 - 1125 - -- 1126 - , largestAlbumFavsSequence = 1127 - resolveLargestSequence 1128 - gathering.currentAlbumFavsSequence 1129 - gathering.largestAlbumFavsSequence 1130 - 1131 - -- 1132 - , largestArtistSequence = 1133 - resolveLargestSequence 1134 - gathering.currentArtistSequence 1135 - gathering.largestArtistSequence 1136 - } 1137 - in 1138 - case closedGathering.acc of 1139 - [] -> 1140 - { collection = collection 1141 - , selectedCover = closedGathering.selectedCover 1142 - } 1143 - 1144 - fallback :: _ -> 1145 - let 1146 - cover = 1147 - makeCoverWithFallback sortBy_ closedGathering fallback 1148 - in 1149 - { collection = 1150 - cover :: collection 1151 - , selectedCover = 1152 - case ( previouslySelectedCover, closedGathering.selectedCover ) of 1153 - ( Nothing, _ ) -> 1154 - Nothing 1155 - 1156 - ( Just _, Just _ ) -> 1157 - closedGathering.selectedCover 1158 - 1159 - ( Just sc, Nothing ) -> 1160 - case sortBy_ of 1161 - Artist -> 1162 - if cover.group == sc.group then 1163 - Just cover 1164 - 1165 - else 1166 - Nothing 1167 - 1168 - _ -> 1169 - if cover.key == sc.key then 1170 - Just cover 1171 - 1172 - else 1173 - Nothing 1174 - } 1175 - 1176 - 1177 - makeCoverWithFallback sortBy_ gathering fallback = 1178 - let 1179 - amountOfTracks = 1180 - List.length gathering.accIds 1181 - 1182 - group = 1183 - gathering.previousGroup 1184 - 1185 - identifiedTrack = 1186 - gathering.largestAlbumFavsSequence 1187 - |> Maybe.orElse gathering.largestAlbumSequence 1188 - |> Maybe.map Tuple.first 1189 - |> Maybe.withDefault fallback 1190 - 1191 - ( identifiers, track ) = 1192 - identifiedTrack 1193 - 1194 - ( largestAlbumSequence, largestArtistSequence ) = 1195 - ( Maybe.unwrap 0 Tuple.second gathering.largestAlbumSequence 1196 - , Maybe.unwrap 0 Tuple.second gathering.largestArtistSequence 1197 - ) 1198 - 1199 - ( sameAlbum, sameArtist ) = 1200 - ( largestAlbumSequence == amountOfTracks 1201 - , largestArtistSequence == amountOfTracks 1202 - ) 1203 - 1204 - isVariousArtists = 1205 - False 1206 - || (amountOfTracks > 4 && largestArtistSequence < 3) 1207 - || (String.toLower track.tags.artist == "va") 1208 - in 1209 - { key = Base64.encode (coverKey isVariousArtists track) 1210 - , identifiedTrackCover = identifiedTrack 1211 - 1212 - -- 1213 - , focus = 1214 - case sortBy_ of 1215 - Artist -> 1216 - "artist" 1217 - 1218 - _ -> 1219 - "album" 1220 - 1221 - -- 1222 - , group = group 1223 - , sameAlbum = sameAlbum 1224 - , sameArtist = sameArtist 1225 - 1226 - -- 1227 - , trackIds = gathering.accIds 1228 - , tracks = gathering.acc 1229 - , variousArtists = isVariousArtists 1230 - } 1231 - 1232 - 1233 - 1234 - -- ⚗️ ░░ COVERS → SEQUENCES 1235 - 1236 - 1237 - increaseSequence = 1238 - Maybe.map (Tuple.mapSecond ((+) 1)) 1239 - 1240 - 1241 - resolveLargestSequence curr state = 1242 - case ( curr, state ) of 1243 - ( Just ( _, c ), Just ( _, s ) ) -> 1244 - ifThenElse (c > s) curr state 1245 - 1246 - ( Just _, Nothing ) -> 1247 - curr 1248 - 1249 - ( Nothing, Just _ ) -> 1250 - state 1251 - 1252 - ( Nothing, Nothing ) -> 1253 - Nothing
+1 -1
src/Applications/UI/Tracks/View.elm
··· 70 70 UI.Tracks.Scene.Covers.view 71 71 { bgColor = model.extractedBackdropColor 72 72 , cachedCovers = model.cachedCovers 73 - , covers = model.covers 73 + , covers = model.covers.harvested 74 74 , darkMode = model.darkMode 75 75 , favouritesOnly = model.favouritesOnly 76 76 , infiniteList = model.infiniteList
+1 -1
src/Applications/UI/Types.elm
··· 155 155 , cachedTracks : List String 156 156 , cachedTracksOnly : Bool 157 157 , cachingTracksInProgress : List String 158 - , covers : List Tracks.Cover 158 + , covers : { arranged : List Tracks.Cover, harvested : List Tracks.Cover } 159 159 , favourites : List Favourite 160 160 , favouritesOnly : Bool 161 161 , grouping : Maybe Grouping
+6
src/Library/Tracks.elm
··· 122 122 ( CollectionDependencies, Collection ) 123 123 124 124 125 + type alias CoverCollection = 126 + { arranged : List Cover 127 + , harvested : List Cover 128 + } 129 + 130 + 125 131 126 132 -- GROUPING & SORTING 127 133