public override void OfflineStatusUpdated(SpotifySession session) { OfflineSyncStatus status = new OfflineSyncStatus(); session.OfflineSyncGetStatus(ref status); if (status.syncing) { Console.WriteLine("Offline status: queued:{0}:{1} done:{2}:{3} copied:{4}:{5} nocopy:{6} err:{7}", status.queued_tracks, status.queued_bytes, status.done_tracks, status.done_bytes, status.copied_tracks, status.copied_bytes, status.willnotcopy_tracks, status.error_tracks); } else { Console.WriteLine("Offline status: Idle"); } }
public OfflineSyncStatus GetOfflineSyncStatus() { AssertHandle(); var syncStatus = new OfflineSyncStatus(); lock (Spotify.Mutex) { Spotify.SpotifyOfflineSyncStatus offlineSyncStatus = new Spotify.SpotifyOfflineSyncStatus(); Spotify.sp_offline_sync_get_status(Handle, ref offlineSyncStatus); syncStatus.CopiedBytes = offlineSyncStatus.CopiedBytes; syncStatus.CopiedTracks = offlineSyncStatus.CopiedTracks; syncStatus.DoneBytes = offlineSyncStatus.DoneBytes; syncStatus.DoneTracks = offlineSyncStatus.DoneTracks; syncStatus.ErrorTracks = offlineSyncStatus.ErrorTracks; syncStatus.IsSyncing = offlineSyncStatus.Syncing; syncStatus.QueuedBytes = offlineSyncStatus.QueuedBytes; syncStatus.QueuedTracks = offlineSyncStatus.QueuedTracks; } return(syncStatus); }
public OfflineSyncStatus GetOfflineSyncStatus() { AssertHandle(); var syncStatus = new OfflineSyncStatus(); lock (Spotify.Mutex) { Spotify.SpotifyOfflineSyncStatus offlineSyncStatus = new Spotify.SpotifyOfflineSyncStatus(); Spotify.sp_offline_sync_get_status(Handle, ref offlineSyncStatus); syncStatus.CopiedBytes = offlineSyncStatus.CopiedBytes; syncStatus.CopiedTracks = offlineSyncStatus.CopiedTracks; syncStatus.DoneBytes = offlineSyncStatus.DoneBytes; syncStatus.DoneTracks = offlineSyncStatus.DoneTracks; syncStatus.ErrorTracks = offlineSyncStatus.ErrorTracks; syncStatus.IsSyncing = offlineSyncStatus.Syncing; syncStatus.QueuedBytes = offlineSyncStatus.QueuedBytes; syncStatus.QueuedTracks = offlineSyncStatus.QueuedTracks; } return syncStatus; }