fix(squidwtf): resolve Song nullable warning in metadata fallback

This commit is contained in:
joshpatra committed 2026-05-22 19:57:19 -04:00
1 parent 1cb54fa7a6
commit ed32992867
2 files changed
+6 -6

No files matched your search

+1 -1
View File
@@ -9,5 +9,5 @@ public static class AppVersion
/// <summary> /// <summary>
/// Current application version. /// Current application version.
/// </summary> /// </summary>
public const string Version = "2.0.1"; public const string Version = "2.0.2";
} }
@@ -594,9 +594,9 @@ public class SquidWTFMetadataService : TrackParserBase, IMusicMetadataService
try try
{ {
return await _fallbackHelper.RaceTopEndpointsAsync( return await _fallbackHelper.RaceTopEndpointsAsync<Song?>(
raceCount, raceCount,
(baseUrl, ct) => FetchSongAsync(baseUrl, externalId, ct), async (baseUrl, ct) => await FetchSongAsync(baseUrl, externalId, ct),
cancellationToken); cancellationToken);
} }
catch (Exception ex) catch (Exception ex)
@@ -608,9 +608,9 @@ public class SquidWTFMetadataService : TrackParserBase, IMusicMetadataService
} }
} }
return await _fallbackHelper.TryWithFallbackAsync( return await _fallbackHelper.TryWithFallbackAsync<Song?>(
baseUrl => FetchSongAsync(baseUrl, externalId, cancellationToken), async baseUrl => await FetchSongAsync(baseUrl, externalId, cancellationToken),
(Song?)null); null);
} }
private async Task<Song> FetchSongAsync(string baseUrl, string externalId, CancellationToken cancellationToken) private async Task<Song> FetchSongAsync(string baseUrl, string externalId, CancellationToken cancellationToken)