33using LyricsScraperNET . Models . Responses ;
44using LyricsScraperNET . Network ;
55using LyricsScraperNET . Providers . Abstract ;
6+ using LyricsScraperNET . Providers . Models ;
67using Microsoft . Extensions . Logging ;
78using Microsoft . Extensions . Logging . Abstractions ;
89using Microsoft . Extensions . Options ;
1213
1314namespace LyricsScraperNET . Providers . LyricsFreak
1415{
15- internal class LyricsFreakProvider : ExternalProviderBase
16+ public sealed class LyricsFreakProvider : ExternalProviderBase
1617 {
1718 private ILogger < LyricsFreakProvider > ? _logger ;
1819 private readonly IExternalUriConverter _uriConverter ;
@@ -83,7 +84,7 @@ protected override async Task<SearchResult> SearchLyricAsync(string artist, stri
8384 if ( WebClient == null || Parser == null )
8485 {
8586 _logger ? . LogWarning ( $ "LyricsFreak. Please set up WebClient and Parser first") ;
86- return new SearchResult ( Models . ExternalProviderType . LyricsFreak ) ;
87+ return new SearchResult ( ExternalProviderType . LyricsFreak ) ;
8788 }
8889
8990 // 1. Open the artist's page.
@@ -96,15 +97,15 @@ protected override async Task<SearchResult> SearchLyricAsync(string artist, stri
9697 if ( htmlResponse . Contains ( PageNotFoundText ) )
9798 {
9899 _logger ? . LogWarning ( $ "LyricsFreak. Artist's page not found (404). [{ artist } ]. Song name: [{ song } ]") ;
99- return new SearchResult ( Models . ExternalProviderType . LyricsFreak ) ;
100+ return new SearchResult ( ExternalProviderType . LyricsFreak ) ;
100101 }
101102
102103 // 2. Find song on the artist page and get link to the web page.
103104 var songHref = GetSongHrefFromHtmlBody ( htmlResponse , song ) ;
104105 if ( string . IsNullOrEmpty ( songHref ) )
105106 {
106107 _logger ? . LogWarning ( $ "LyricsFreak. Can't find song Uri for artist: [{ artist } ]. Song name: [{ song } ]") ;
107- return new SearchResult ( Models . ExternalProviderType . LyricsFreak ) ;
108+ return new SearchResult ( ExternalProviderType . LyricsFreak ) ;
108109 }
109110 var songUri = new Uri ( LyricsFreakUriConverter . BaseUrl + songHref ) ;
110111
@@ -121,12 +122,12 @@ protected async override Task<SearchResult> SearchLyricAsync(Uri uri, Cancellati
121122 if ( string . IsNullOrEmpty ( songLyrics ) )
122123 {
123124 _logger ? . LogWarning ( $ "LyricsFreak. Can't find lyrics for song's uri: [{ uri } ]") ;
124- return new SearchResult ( Models . ExternalProviderType . LyricsFreak ) ;
125+ return new SearchResult ( ExternalProviderType . LyricsFreak ) ;
125126 }
126127
127128 var lyricsText = Parser . Parse ( songLyrics ) ;
128129
129- return new SearchResult ( lyricsText , Models . ExternalProviderType . LyricsFreak ) ;
130+ return new SearchResult ( lyricsText , ExternalProviderType . LyricsFreak ) ;
130131 }
131132
132133 #endregion
0 commit comments