private async Task AssureVideoPlaybackIsInitalized() { if (SubsonicService.IsVideoPlaybackInitialized) { return; } await SubsonicService.GetRandomSongs(1).Execute(); SubsonicService.IsVideoPlaybackInitialized = true; }
public async Task <IActionResult> GetRandomSongs(SubsonicRequest request) { var authResult = await AuthenticateUser(request).ConfigureAwait(false); if (authResult != null) { return(authResult); } var result = await SubsonicService.GetRandomSongs(request, SubsonicUser).ConfigureAwait(false); return(BuildResponse(request, result, "randomSongs")); }