JohnnyCrazy / SpotifyAPI-NET

:sound: A Client for the Spotify Web API, written in C#/.NET
http://johnnycrazy.github.io/SpotifyAPI-NET/
MIT License
1.5k stars 307 forks source link

.NET Framework support #893

Closed Hi-ImKyle closed 11 months ago

Hi-ImKyle commented 1 year ago

image .NET Framework doesn't actually look like its supported. Any chance it will or is it a remnant of what you did support but dropped for X reasons?

Tried installing the library through nuget but there are no builds targeting .NET Framework according to nuget.

JohnnyCrazy commented 1 year ago

Which exact Version of .NET framework are you targeting?

Hi-ImKyle commented 1 year ago

4.8

EDIT: I can go all the way to 6.2.2 for SpotifyAPI but anything past that, nuget throws up a warning that it doesn't offer a .NET Framework compatible build

JohnnyCrazy commented 1 year ago

Mh, true, I think Support got dropped when we removed Support for net Standard 2.0.

We do use some language + framework Features only available in Standard 2.1, but we used some Compiler flags back then to disable them for 2.0.

Let me investigate a bit what it would take to get Support for that back.

Hi-ImKyle commented 1 year ago

Also does no one offer a local API anymore? I'll be honest, the only reason I'm using this library is because it's the only maintained one. I just want the currently playing track/position. Seems overkill to have a Web API endpoint just for that when the currently playing song is always playing locally... I don't like the idea of sending a currently playing song request every second or less just to get the track position..

WXRIW commented 1 year ago

Also does no one offer a local API anymore? I'll be honest, the only reason I'm using this library is because it's the only maintained one. I just want the currently playing track/position. Seems overkill to have a Web API endpoint just for that when the currently playing song is always playing locally... I don't like the idea of sending a currently playing song request every second or less just to get the track position..

You can use GSMTC (Windows 10 1809 or above required) to get the session info, but sadly there are some drawbacks.

  1. The session does not contain Spotify ID and ISRC.
  2. Spotify has weak support on GSMTC, so it's not working properly every time, a restart for Spotify might be needed if it's not working.

My app Lyricify is using GSMTC (Media Session) for playback status enhancement, since Current Playback API are returning 429 error very often.

Inzaniity commented 1 year ago

I just want to chime in that I also would like to upgrade to the latest version on my .net framework application. Sadly it's too much effort to port to .net standard/core or whatever naming MS now uses.

JohnnyCrazy commented 11 months ago

Just released 7.0.2, which re-adds support for .net standard 2.0. This will allow it to be used in the following .NET Framework versions:

4.6.1 2, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

Some functionalities, like PaginateAll, are not available due to missing support.

Let me know if that works out for everyone 👍🏼