aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Dto
diff options
context:
space:
mode:
author1hitsong <3330318+1hitsong@users.noreply.github.com>2022-09-15 19:45:26 -0400
committer1hitsong <3330318+1hitsong@users.noreply.github.com>2022-09-15 19:45:26 -0400
commitd9be3874ba3842d5888c5cbbe583614ed990849e (patch)
treef9a5264a402548f531e83891a70dd0a2bd7fc35d /Emby.Server.Implementations/Dto
parent7520a1998569f0ba58008016c10de21d66b6b836 (diff)
Auto stash before merge of "lyric-lrc-file-support" and "origin/lyric-lrc-file-support"
Diffstat (limited to 'Emby.Server.Implementations/Dto')
-rw-r--r--Emby.Server.Implementations/Dto/DtoService.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.cs
index 96717cff53..bed82a4bbb 100644
--- a/Emby.Server.Implementations/Dto/DtoService.cs
+++ b/Emby.Server.Implementations/Dto/DtoService.cs
@@ -19,6 +19,7 @@ using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.Audio;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.LiveTv;
+using MediaBrowser.Controller.Lyrics;
using MediaBrowser.Controller.Persistence;
using MediaBrowser.Controller.Playlists;
using MediaBrowser.Controller.Providers;
@@ -51,6 +52,8 @@ namespace Emby.Server.Implementations.Dto
private readonly IMediaSourceManager _mediaSourceManager;
private readonly Lazy<ILiveTvManager> _livetvManagerFactory;
+ private readonly IEnumerable<ILyricsProvider> _lyricProviders;
+
public DtoService(
ILogger<DtoService> logger,
ILibraryManager libraryManager,
@@ -60,7 +63,8 @@ namespace Emby.Server.Implementations.Dto
IProviderManager providerManager,
IApplicationHost appHost,
IMediaSourceManager mediaSourceManager,
- Lazy<ILiveTvManager> livetvManagerFactory)
+ Lazy<ILiveTvManager> livetvManagerFactory,
+ IEnumerable<ILyricsProvider> lyricProviders)
{
_logger = logger;
_libraryManager = libraryManager;
@@ -71,6 +75,7 @@ namespace Emby.Server.Implementations.Dto
_appHost = appHost;
_mediaSourceManager = mediaSourceManager;
_livetvManagerFactory = livetvManagerFactory;
+ _lyricProviders = lyricProviders;
}
private ILiveTvManager LivetvManager => _livetvManagerFactory.Value;
@@ -142,7 +147,7 @@ namespace Emby.Server.Implementations.Dto
}
else if (item is Audio)
{
- dto.HasLocalLyricsFile = ItemHelper.HasLyricFile(item.Path);
+ dto.HasLyrics = MediaBrowser.Controller.Lyrics.LyricInfo.HasLyricFile(_lyricProviders, item.Path);
}
if (item is IItemByName itemByName