Updates based on review

This commit is contained in:
1hitsong
2022-09-10 14:29:30 -04:00
parent 5f5347aee3
commit 2e260e5319
4 changed files with 46 additions and 44 deletions

View File

@@ -12,7 +12,6 @@ using Jellyfin.Api.ModelBinders;
using Jellyfin.Api.Models.UserDtos;
using Jellyfin.Data.Enums;
using Jellyfin.Extensions;
using Kfstorm.LrcParser;
using MediaBrowser.Controller.Dto;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.Audio;
@@ -422,13 +421,13 @@ namespace Jellyfin.Api.Controllers
return NotFound(new { Results = lyricsList.ToArray() });
}
List<Lyrics> result = ItemHelper.GetLyricData(item);
if (string.IsNullOrEmpty(result.ElementAt(0).Error))
var result = ItemHelper.GetLyricData(item);
if (result is not null)
{
return Ok(new { Results = result });
return Ok(result);
}
return NotFound(new { Results = result.ToArray() });
return NotFound();
}
}
}