Skip to content

Commit

Permalink
Removed nuget for SpotifyAPI, added local SpotifyAPI; fixing JSON err…
Browse files Browse the repository at this point in the history
…ors. Changes to SpotifyAPI have been merged.

Fixed Musixmatch - Lyrics failure.  If statuscode not success, return empty string and continue.
  • Loading branch information
Lewis-Fam committed Mar 30, 2024
1 parent 6ab0a08 commit 65cd4f9
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
12 changes: 12 additions & 0 deletions SpotiSharp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Spotisharp.Client", "Spotisharp.Client\Spotisharp.Client.csproj", "{D20E1A4B-1D21-400D-8ACD-3CEF67061CCB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SpotifyAPI.Web", "..\..\..\dev\github-clones\SpotifyAPI-NET\SpotifyAPI.Web\SpotifyAPI.Web.csproj", "{84B3DCFF-D9B9-48BC-9A5A-00C0C892BA25}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SpotifyAPI.Web.Auth", "..\..\..\dev\github-clones\SpotifyAPI-NET\SpotifyAPI.Web.Auth\SpotifyAPI.Web.Auth.csproj", "{F8C9680B-0FEA-4D96-8FA6-EC4A0D7941AA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -15,6 +19,14 @@ Global
{D20E1A4B-1D21-400D-8ACD-3CEF67061CCB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D20E1A4B-1D21-400D-8ACD-3CEF67061CCB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D20E1A4B-1D21-400D-8ACD-3CEF67061CCB}.Release|Any CPU.Build.0 = Release|Any CPU
{84B3DCFF-D9B9-48BC-9A5A-00C0C892BA25}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{84B3DCFF-D9B9-48BC-9A5A-00C0C892BA25}.Debug|Any CPU.Build.0 = Debug|Any CPU
{84B3DCFF-D9B9-48BC-9A5A-00C0C892BA25}.Release|Any CPU.ActiveCfg = Release|Any CPU
{84B3DCFF-D9B9-48BC-9A5A-00C0C892BA25}.Release|Any CPU.Build.0 = Release|Any CPU
{F8C9680B-0FEA-4D96-8FA6-EC4A0D7941AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F8C9680B-0FEA-4D96-8FA6-EC4A0D7941AA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F8C9680B-0FEA-4D96-8FA6-EC4A0D7941AA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F8C9680B-0FEA-4D96-8FA6-EC4A0D7941AA}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
6 changes: 5 additions & 1 deletion Spotisharp.Client/Services/MusixmatchService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ public static async Task<string> SearchLyricsFromText(string query)
string searchQuery = _siteUrl + "/search/" + query;
using (HttpClient client = new HttpClient())
{
string response = await client.GetStringAsync(searchQuery);
var responseMessage = await client.GetAsync(searchQuery);
if (!responseMessage.IsSuccessStatusCode)
return string.Empty;

var response = await responseMessage.Content.ReadAsStringAsync();
HtmlDocument htmlDoc = new HtmlDocument();
htmlDoc.LoadHtml(response);

Expand Down
13 changes: 10 additions & 3 deletions Spotisharp.Client/Spotisharp.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,24 @@
<Content Include="icon.ico" />
</ItemGroup>

<ItemGroup>
<None Include="bin\Debug\net6.0\ffmpeg.exe" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="HtmlAgilityPack" Version="1.11.45" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="6.0.0" />
<!--<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="6.0.1" />-->
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
<PackageReference Include="SpotifyAPI.Web" Version="6.3.0" />
<PackageReference Include="SpotifyAPI.Web.Auth" Version="6.3.0" />
<PackageReference Include="taglib-sharp-netstandard2.0" Version="2.1.0" />
<PackageReference Include="VideoLibrary" Version="3.2.2" />
<PackageReference Include="VideoLibrary" Version="3.2.3" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\dev\github-clones\SpotifyAPI-NET\SpotifyAPI.Web.Auth\SpotifyAPI.Web.Auth.csproj" />
<ProjectReference Include="..\..\..\..\dev\github-clones\SpotifyAPI-NET\SpotifyAPI.Web\SpotifyAPI.Web.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 65cd4f9

Please sign in to comment.