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>
/// Current application version.
/// </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
{
return await _fallbackHelper.RaceTopEndpointsAsync(
return await _fallbackHelper.RaceTopEndpointsAsync<Song?>(
raceCount,
(baseUrl, ct) => FetchSongAsync(baseUrl, externalId, ct),
async (baseUrl, ct) => await FetchSongAsync(baseUrl, externalId, ct),
cancellationToken);
}
catch (Exception ex)
@@ -608,9 +608,9 @@ public class SquidWTFMetadataService : TrackParserBase, IMusicMetadataService
}
}
return await _fallbackHelper.TryWithFallbackAsync(
baseUrl => FetchSongAsync(baseUrl, externalId, cancellationToken),
(Song?)null);
return await _fallbackHelper.TryWithFallbackAsync<Song?>(
async baseUrl => await FetchSongAsync(baseUrl, externalId, cancellationToken),
null);
}
private async Task<Song> FetchSongAsync(string baseUrl, string externalId, CancellationToken cancellationToken)