diff --git a/MediaBrowser.Controller/Lyrics/ILyricManager.cs b/MediaBrowser.Controller/Lyrics/ILyricManager.cs
index dad0250f6..5920bcc62 100644
--- a/MediaBrowser.Controller/Lyrics/ILyricManager.cs
+++ b/MediaBrowser.Controller/Lyrics/ILyricManager.cs
@@ -12,7 +12,7 @@ public interface ILyricManager
///
/// The media item.
/// Lyrics for passed item.
- LyricResponse GetLyrics(BaseItem item);
+ LyricResponse? GetLyrics(BaseItem item);
///
/// Checks if requested item has a matching local lyric file.
diff --git a/MediaBrowser.Providers/Lyric/LrcLyricProvider.cs b/MediaBrowser.Providers/Lyric/LrcLyricProvider.cs
index 9bacfc296..db87d9236 100644
--- a/MediaBrowser.Providers/Lyric/LrcLyricProvider.cs
+++ b/MediaBrowser.Providers/Lyric/LrcLyricProvider.cs
@@ -87,7 +87,12 @@ public class LrcLyricProvider : ILyricProvider
for (int i = 0; i < sortedLyricData.Count; i++)
{
- var timeData = sortedLyricData[i].TimeTags.ToArray()[0].Value;
+ var timeData = sortedLyricData[i].TimeTags.First().Value;
+ if (timeData is null)
+ {
+ continue;
+ }
+
long ticks = TimeSpan.FromMilliseconds((double)timeData).Ticks;
lyricList.Add(new Controller.Lyrics.Lyric(sortedLyricData[i].Text, ticks));
}
diff --git a/MediaBrowser.Providers/Lyric/LyricManager.cs b/MediaBrowser.Providers/Lyric/LyricManager.cs
index 06f913d07..0de008db7 100644
--- a/MediaBrowser.Providers/Lyric/LyricManager.cs
+++ b/MediaBrowser.Providers/Lyric/LyricManager.cs
@@ -22,7 +22,7 @@ public class LyricManager : ILyricManager
}
///
- public LyricResponse GetLyrics(BaseItem item)
+ public LyricResponse? GetLyrics(BaseItem item)
{
foreach (ILyricProvider provider in _lyricProviders)
{