mirror of
https://github.com/SoPat712/allstarr.git
synced 2026-10-08 14:05:02 -04:00
fix(squidwtf): resolve Song nullable warning in metadata fallback
This commit is contained in:
2 files changed
+6
-6
No files matched your search
@@ -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)
|
||||||
|
|||||||
Reference in new issue
Block a user