Commit Diff


commit - 612dcebd7ae4f62ddb284a5d6b3a933e7da3c11a
commit + a70f22f7593ebae3974c4b7cd56e40dbb68de2e5
blob - 780fc302b14e3cb2651baa973253ecef1e00a645
blob + 35a9968656c3a42f9c24cc094564bc0388ec5461
--- src/Sync.purs
+++ src/Sync.purs
@@ -153,7 +153,8 @@ parseLastfmResponse json = case decodeJson json of
         LastfmTrackSingle' t -> [ t ]
     in
       Just { tracks, totalPages: totalPages }
-  Left _ -> Nothing
+  Left _ ->
+    Nothing
 
 lastfmTrackToListen :: Json -> Maybe Listen
 lastfmTrackToListen json = case decodeJson json of
@@ -176,7 +177,8 @@ lastfmTrackToListen json = case decodeJson json of
               }
           }
       }
-  Left _ -> Nothing
+  Left _ ->
+    Nothing
 
 recordSyncSuccess :: String -> String -> Int -> Aff Unit
 recordSyncSuccess slug source n = do
blob - 9a7d897306710338cc1b3e175f6f14e7ac9d78f4
blob + f87ba08592217eecd2a5d8d62040628c3c5902f4
--- src/Types.purs
+++ src/Types.purs
@@ -254,10 +254,14 @@ instance decodeJsonLastfmRecentTracks :: DecodeJson La
     attr <- obj .: "@attr"
     trackResult <- obj .:? "track"
     tracks <- case trackResult of
-      Nothing -> pure $ LastfmTrackArray' []
-      Just trackJson -> case toArray trackJson of
-        Just arr -> pure $ LastfmTrackArray' arr
-        Nothing -> pure $ LastfmTrackSingle' trackJson
+      Nothing ->
+        pure $ LastfmTrackArray' []
+      Just trackJson ->
+        case toArray trackJson of
+          Just arr ->
+            pure $ LastfmTrackArray' arr
+          Nothing ->
+            pure $ LastfmTrackSingle' trackJson
     pure $ LastfmRecentTracks { track: tracks, attr }
 
 newtype LastfmResponse = LastfmResponse