mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-24 23:16:28 +00:00
Changed Host to 127.0.0.1 and added SSL workaround
This commit is contained in:
parent
5e12df71a4
commit
281b684f5f
@ -4,7 +4,6 @@ using SpotifyAPI.Local.Models;
|
|||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace SpotifyAPI.Example
|
namespace SpotifyAPI.Example
|
||||||
@ -96,7 +95,7 @@ namespace SpotifyAPI.Example
|
|||||||
|
|
||||||
SpotifyUri uri = track.TrackResource.ParseUri();
|
SpotifyUri uri = track.TrackResource.ParseUri();
|
||||||
|
|
||||||
trackInfoBox.Text = $"Track Info - {uri.Id}";
|
trackInfoBox.Text = $@"Track Info - {uri.Id}";
|
||||||
|
|
||||||
bigAlbumPicture.Image = await track.GetAlbumArtAsync(AlbumArtSize.Size640);
|
bigAlbumPicture.Image = await track.GetAlbumArtAsync(AlbumArtSize.Size640);
|
||||||
smallAlbumPicture.Image = await track.GetAlbumArtAsync(AlbumArtSize.Size160);
|
smallAlbumPicture.Image = await track.GetAlbumArtAsync(AlbumArtSize.Size160);
|
||||||
@ -125,6 +124,7 @@ namespace SpotifyAPI.Example
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
timeLabel.Text = $@"{FormatTime(e.TrackTime)}/{FormatTime(_currentTrack.Length)}";
|
timeLabel.Text = $@"{FormatTime(e.TrackTime)}/{FormatTime(_currentTrack.Length)}";
|
||||||
|
if(e.TrackTime < _currentTrack.Length)
|
||||||
timeProgressBar.Value = (int)e.TrackTime;
|
timeProgressBar.Value = (int)e.TrackTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,6 +9,9 @@ namespace SpotifyAPI.Local
|
|||||||
|
|
||||||
public ExtendedWebClient()
|
public ExtendedWebClient()
|
||||||
{
|
{
|
||||||
|
// TODO Remove once SSL Issues are resolved #115
|
||||||
|
ServicePointManager.ServerCertificateValidationCallback = (s, certificate, chain, sslPolicyErrors) => true;
|
||||||
|
|
||||||
Timeout = 2000;
|
Timeout = 2000;
|
||||||
Headers.Add("Origin", "https://embed.spotify.com");
|
Headers.Add("Origin", "https://embed.spotify.com");
|
||||||
Headers.Add("Referer", "https://embed.spotify.com/?uri=spotify:track:5Zp4SWOpbuOdnsxLqwgutt");
|
Headers.Add("Referer", "https://embed.spotify.com/?uri=spotify:track:5Zp4SWOpbuOdnsxLqwgutt");
|
||||||
|
@ -13,7 +13,7 @@ namespace SpotifyAPI.Local
|
|||||||
public string OauthKey { get; private set; }
|
public string OauthKey { get; private set; }
|
||||||
public string CfidKey { get; private set; }
|
public string CfidKey { get; private set; }
|
||||||
|
|
||||||
public const string Host = "SpotifyAPI.spotilocal.com";
|
public const string Host = "127.0.0.1"; //Localhost since domain fails to resolve on some hosts
|
||||||
|
|
||||||
internal Boolean Init()
|
internal Boolean Init()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user