torshy/torshify — Issue #1: Playlist tracks ToLink().AsUri() returns spotify:local...
Author: sekotin
Created: 2011-12-25 11:50:09+00:00
State: open

I have a playlist where I have tracks that can be played in the official Spotify client and in Torshify client too.

However, if I use ToLink().AsUri() for these tracks in the code, the URI starts with spotify:local even that these tracks are not located on my harddisk (shared playlist). If I try to load these tracks using session.FromLink(URI) I get

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at Torshify.Core.Native.Spotify.sp_track_add_ref(IntPtr trackPtr)
at Torshify.Core.Native.NativeTrack.Initialize()
at Torshify.Core.Managers.TrackManager.Get(ISession session, IntPtr handle)
at Torshify.Core.Native.NativeTrackAndOffsetLink.LinkAndOffset..ctor(ISession session, IntPtr linkPtr, Int32 offset)
at Torshify.Core.Native.NativeTrackAndOffsetLink.b__0()
at Torshify.Core.Lazy`1.get_Value()
at Torshify.Core.Native.NativeTrackAndOffsetLink.get_Object()
at Torshify.Core.Native.NativeTrackAndOffsetLink.Torshify.ILink.get_Object()

I also tried Spotify.sp_playlist_set_autolink_tracks(Handle, true); in NativePlaylist Initialize()-method but it didn't make any difference. Any suggestions?