Closed NQuirmbach closed 10 years ago
It's a bit hard to say without any more context/testing. What version of SpotiFire are you using? The source-code or the one from NuGet?
At first i tried it with the source-code and then created a version with the nugget-package (v. 0.1.41.0).
Unfortunately both versions dont work. Here is my code so far, just a simple console-application for testing purpose.
I'm using VS 2012 with .NET Framework 4.5.
static void Main(string[] args)
{
DoWork().Wait();
}
static async Task DoWork()
{
try
{
Session session = await Spotify.CreateSession(applicationKey, cache, settings, "SpotifyRemote");
Error error = await session.Login("*****************", "*******************", false);
if (error != Error.OK)
{
return;
}
PlaylistContainer playlistContainer = await session.PlaylistContainer;
for (int i = 0; i < playlistContainer.Playlists.Count; i++)
{
Playlist playlist = await playlistContainer.Playlists[i];
}
}
catch (Exception ex)
{
ConsoleExt.WriteLine("An Error occured! {0}", ConsoleColor.Red, ex);
}
}
}
Does it not return for all the playlists?
No, it just freezes the code and never returns a value. I noticed a weird thing: I can load the starred playlist.
Playlist starred = await session.Starred;
But the line
Playlist playlist = await playlistContainer.Playlists[i];
just freezes the code.
@NQuirmbach Some more question to answer:
Program.cs
);i
it stalls on, also check with some random values of i
)Closing this because of no further feedback from the issuer.
Hey,
first of all i would like to thank you for this library, it's exactly what i was looking for.
But i have one issue:
The line await playlistContainer.Playlists[i] never returns. Do you have any idea what might be the problem here?