commit a70f22f7593ebae3974c4b7cd56e40dbb68de2e5
parent 612dcebd7ae4f62ddb284a5d6b3a933e7da3c11a
Author: mtmn <miro@haravara.org>
Date: Mon, 1 Jun 2026 22:05:39 +0200
chore: fix whines
Diffstat:
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/src/Sync.purs b/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
diff --git a/src/Types.purs b/src/Types.purs
@@ -254,10 +254,14 @@ instance decodeJsonLastfmRecentTracks :: DecodeJson LastfmRecentTracks where
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